问题: nohup bin/mqnamesrv & 启动NameServer失败,使用tail -f ~/logs/rocketmqlogs/namesrv.log无日志

排除rocketmq目录下产生很多日志hs_err_pidxxx.log
在这里插入图片描述
重要信息:Out of Memory Error (os_linux.cpp:2640), pid=8937, tid=0x00007f923a086700
在这里插入图片描述

原因:

RocketMQ默认的虚拟机内存较大,启动Broker如果因为内存不足失败,需要编辑如下两个配置文件,修改JVM内存大小

编辑runbroker.sh和runserver.sh修改默认JVM大小
vi runserver.sh (配置NameServer)
vi runbroker.sh (配置Broker)

重启一下

参考设置:
JAVA_OPT="${JAVA_OPT} -server -Xms256m -Xmx256m -Xmn128m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"

#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 2147483648 bytes for committing reserved memory.
# Possible reasons:
#   The system is out of physical RAM or swap space
#   In 32 bit mode, the process size limit was hit
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Use 64 bit Java on a 64 bit OS
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (os_linux.cpp:2640), pid=8937, tid=0x00007f923a086700
#
# JRE version:  (8.0_171-b11) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.171-b11 mixed mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#

---------------  T H R E A D  ---------------

Current thread (0x00007f923400a000):  JavaThread "Unknown thread" [_thread_in_vm, id=8938, stack(0x00007f9239f87000,0x00007f923a087000)]

Stack: [0x00007f9239f87000,0x00007f923a087000],  sp=0x00007f923a0853f0,  free space=1016k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xacfffa]  VMError::report_and_die()+0x2ba
V  [libjvm.so+0x5005cb]  report_vm_out_of_memory(char const*, int, unsigned long, VMErrorType, char const*)+0x8b
V  [libjvm.so+0x92dd93]  os::Linux::commit_memory_impl(char*, unsigned long, bool)+0x123
V  [libjvm.so+0x92dfb9]  os::pd_commit_memory(char*, unsigned long, unsigned long, bool)+0x29
V  [libjvm.so+0x92527a]  os::commit_memory(char*, unsigned long, unsigned long, bool)+0x2a
V  [libjvm.so+0xacbcd9]  VirtualSpace::expand_by(unsigned long, bool)+0x199
V  [libjvm.so+0xacc82e]  VirtualSpace::initialize(ReservedSpace, unsigned long)+0xee
V  [libjvm.so+0x5fe7ed]  Generation::Generation(ReservedSpace, unsigned long, int)+0xbd
V  [libjvm.so+0x505756]  DefNewGeneration::DefNewGeneration(ReservedSpace, unsigned long, int, char const*)+0x46
V  [libjvm.so+0x5fff85]  GenerationSpec::init(ReservedSpace, int, GenRemSet*)+0x275
V  [libjvm.so+0x5eebde]  GenCollectedHeap::initialize()+0x1de
V  [libjvm.so+0xa98033]  Universe::initialize_heap()+0xf3
V  [libjvm.so+0xa9859e]  universe_init()+0x3e
V  [libjvm.so+0x642105]  init_globals()+0x65
V  [libjvm.so+0xa7cd4e]  Threads::create_vm(JavaVMInitArgs*, bool*)+0x23e
V  [libjvm.so+0x6d6e44]  JNI_CreateJavaVM+0x74
C  [libjli.so+0x797e]  JavaMain+0x9e
C  [libpthread.so.0+0x7ea5]  start_thread+0xc5


---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )

Other Threads:

=>0x00007f923400a000 (exited) JavaThread "Unknown thread" [_thread_in_vm, id=8938, stack(0x00007f9239f87000,0x00007f923a087000)]

VM state:not at safepoint (not fully initialized)

VM Mutex/Monitor currently owned by a thread: None

GC Heap History (0 events):
No events

Deoptimization events (0 events):
No events

Classes redefined (0 events):
No events

Internal exceptions (0 events):
No events

Events (0 events):
No events


Dynamic libraries:
00400000-00401000 r-xp 00000000 fd:01 133224                             /usr/local/java/jdk1.8.0_171/bin/java
00600000-00601000 rw-p 00000000 fd:01 133224                             /usr/local/java/jdk1.8.0_171/bin/java
020c1000-020e2000 rw-p 00000000 00:00 0                                  [heap]
76c800000-7ec800000 ---p 00000000 00:00 0
7f9223835000-7f92239cd000 rw-p 00000000 00:00 0
7f92239cd000-7f92241cd000 ---p 00000000 00:00 0
7f92241cd000-7f92241d8000 rw-p 00000000 00:00 0
7f92241d8000-7f922458e000 ---p 00000000 00:00 0
7f922458e000-7f92247fe000 rwxp 00000000 00:00 0
7f92247fe000-7f923358e000 ---p 00000000 00:00 0
7f923358e000-7f92335a9000 r-xp 00000000 fd:01 401077                     /usr/local/java/jdk1.8.0_171/jre/lib/amd64/libzip.so
7f92335a9000-7f92337a9000 ---p 0001b000 fd:01 401077                     /usr/local/java/jdk1.8.0_171/jre/lib/amd64/libzip.so
7f92337a9000-7f92337aa000 rw-p 0001b000 fd:01 401077                     /usr/local/java/jdk1.8.0_171/jre/lib/amd64/libzip.so
7f92337aa000-7f92337b6000 r-xp 00000000 fd:01 663465                     /usr/lib64/libnss_files-2.17.so
7f92337b6000-7f92339b5000 ---p 0000c000 fd:01 663465                     /usr/lib64/libnss_files-2.17.so
7f92339b5000-7f92339b6000 r--p 0000b000 fd:01 663465                     /usr/lib64/libnss_files-2.17.so
7f92339b6000-7f92339b7000 rw-p 0000c000 fd:01 663465                     /usr/lib64/libnss_files-2.17.so
7f92339b7000-7f92339bd000 rw-p 00000000 00:00 0
7f92339bd000-7f92339e8000 r-xp 00000000 fd:01 401071                     /usr/local/java/jdk1.8.0_171/jre/lib/amd64/libjava.so
7f92339e8000-7f9233be7000 ---p 0002b000 fd:01 401071                     /usr/local/java/jdk1.8.0_171/jre/lib/amd64/libjava.so
7f9233be7000-7f9233be9000 rw-p 0002a000 fd:01 401071                     /usr/local/java/jdk1.8.0_171/jre/lib/amd64/libjava.so
7f9233be9000-7f9233bf6000 r-xp 00000000 fd:01 401076                     /usr/local/java/jdk1.8.0_171/jre/lib/amd64/libverify.so
7f9233bf6000-7f9233df6000 ---p 0000d000 fd:01 401076                     /usr/local/java/jdk1.8.0_171/jre/lib/amd64/libverify.so
7f9233df6000-7f9233df8000 rw-p 0000d000 fd:01 401076                     /usr/local/java/jdk1.8.0_171/jre/lib/amd64/libverify.so
7f9233df8000-7f9233dff000 r-xp 00000000 fd:01 663468                     /usr/lib64/librt-2.17.so
7f9233dff000-7f9233ffe000 ---p 00007000 fd:01 663468                     /usr/lib64/librt-2.17.so
7f9233ffe000-7f9233fff000 r--p 00006000 fd:01 663468                     /usr/lib64/librt-2.17.so
7f9233fff000-7f9234000000 rw-p 00007000 fd:01 663468                     /usr/lib64/librt-2.17.so
7f9234000000-7f9234032000 rw-p 00000000 00:00 0
7f9234032000-7f9238000000 ---p 00000000 00:00 0
7f9238080000-7f9238170000 rw-p 00000000 00:00 0
7f9238170000-7f9238271000 r-xp 00000000 fd:01 663462                     /usr/lib64/libm-2.17.so
7f9238271000-7f9238470000 ---p 00101000 fd:01 663462                     /usr/lib64/libm-2.17.so
7f9238470000-7f9238471000 r--p 00100000 fd:01 663462                     /usr/lib64/libm-2.17.so
7f9238471000-7f9238472000 rw-p 00101000 fd:01 663462                     /usr/lib64/libm-2.17.so
7f9238472000-7f923914b000 r-xp 00000000 fd:01 670356                     /usr/local/java/jdk1.8.0_171/jre/lib/amd64/server/libjvm.so
7f923914b000-7f923934a000 ---p 00cd9000 fd:01 670356                     /usr/local/java/jdk1.8.0_171/jre/lib/amd64/server/libjvm.so
7f923934a000-7f9239424000 rw-p 00cd8000 fd:01 670356                     /usr/local/java/jdk1.8.0_171/jre/lib/amd64/server/libjvm.so
7f9239424000-7f923946f000 rw-p 00000000 00:00 0
7f923946f000-7f9239633000 r-xp 00000000 fd:01 657568                     /usr/lib64/libc-2.17.so
7f9239633000-7f9239832000 ---p 001c4000 fd:01 657568                     /usr/lib64/libc-2.17.so
7f9239832000-7f9239836000 r--p 001c3000 fd:01 657568                     /usr/lib64/libc-2.17.so
7f9239836000-7f9239838000 rw-p 001c7000 fd:01 657568                     /usr/lib64/libc-2.17.so
7f9239838000-7f923983d000 rw-p 00000000 00:00 0
7f923983d000-7f923983f000 r-xp 00000000 fd:01 663461                     /usr/lib64/libdl-2.17.so
7f923983f000-7f9239a3f000 ---p 00002000 fd:01 663461                     /usr/lib64/libdl-2.17.so
7f9239a3f000-7f9239a40000 r--p 00002000 fd:01 663461                     /usr/lib64/libdl-2.17.so
7f9239a40000-7f9239a41000 rw-p 00003000 fd:01 663461                     /usr/lib64/libdl-2.17.so
7f9239a41000-7f9239a57000 r-xp 00000000 fd:01 134367                     /usr/local/java/jdk1.8.0_171/lib/amd64/jli/libjli.so
7f9239a57000-7f9239c56000 ---p 00016000 fd:01 134367                     /usr/local/java/jdk1.8.0_171/lib/amd64/jli/libjli.so
7f9239c56000-7f9239c57000 rw-p 00015000 fd:01 134367                     /usr/local/java/jdk1.8.0_171/lib/amd64/jli/libjli.so
7f9239c57000-7f9239c6e000 r-xp 00000000 fd:01 657594                     /usr/lib64/libpthread-2.17.so
7f9239c6e000-7f9239e6d000 ---p 00017000 fd:01 657594                     /usr/lib64/libpthread-2.17.so
7f9239e6d000-7f9239e6e000 r--p 00016000 fd:01 657594                     /usr/lib64/libpthread-2.17.so
7f9239e6e000-7f9239e6f000 rw-p 00017000 fd:01 657594                     /usr/lib64/libpthread-2.17.so
7f9239e6f000-7f9239e73000 rw-p 00000000 00:00 0
7f9239e73000-7f9239e95000 r-xp 00000000 fd:01 657554                     /usr/lib64/ld-2.17.so
7f9239f7e000-7f9239f86000 rw-s 00000000 fd:01 657587                     /tmp/hsperfdata_root/8937
7f9239f86000-7f9239f8a000 ---p 00000000 00:00 0
7f9239f8a000-7f923a08b000 rw-p 00000000 00:00 0
7f923a08d000-7f923a092000 rw-p 00000000 00:00 0
7f923a092000-7f923a093000 r--p 00000000 00:00 0
7f923a093000-7f923a094000 rw-p 00000000 00:00 0
7f923a094000-7f923a095000 r--p 00021000 fd:01 657554                     /usr/lib64/ld-2.17.so
7f923a095000-7f923a096000 rw-p 00022000 fd:01 657554                     /usr/lib64/ld-2.17.so
7f923a096000-7f923a097000 rw-p 00000000 00:00 0
7ffe3c045000-7ffe3c066000 rw-p 00000000 00:00 0                          [stack]
7ffe3c0b1000-7ffe3c0b3000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

VM Arguments:
jvm_args: -Xms4g -Xmx4g -Xmn2g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:-UseParNewGC -verbose:gc -Xloggc:/dev/shm/rmq_srv_gc.log -XX:+PrintGCDetails -XX:-OmitStackTraceInFastThrow -XX:-UseLargePages -Djava.ext.dirs=/usr/local/java/jdk1.8.0_171/jre/lib/ext:/usr/local/rocketmq/rocket-4.4/bin/../lib
java_command: org.apache.rocketmq.namesrv.NamesrvStartup
java_class_path (initial): .:/usr/local/rocketmq/rocket-4.4/bin/../conf:
Launcher Type: SUN_STANDARD
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e added ecosystem file for PM2 4 年前
5def40a3 Add host customization support for the NodeJS version 4 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐