开发者社区> 问答> 正文

Ubuntu64位RocketMQ启动Name Server报错


启动Name Server失败:
root@ubuntu:/usr/java/alibaba-rocketmq/bin# nohup sh mqnamesrv &
[1] 3740
root@ubuntu:/usr/java/alibaba-rocketmq/bin# nohup: ignoring input and appending output to ‘nohup.out’


[1]+  Exit 1                  nohup sh mqnamesrv
root@ubuntu:/usr/java/alibaba-rocketmq/bin# tail -f nohup.out
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 2147483648 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /usr/java/alibaba-rocketmq/bin/hs_err_pid3116.log
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006ec000000, 2147483648, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 2147483648 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /usr/java/alibaba-rocketmq/bin/hs_err_pid3746.log
日志:

#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 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:2756), pid=3116, tid=139969103767296
#
# JRE version:  (7.0_79-b15) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.79-b02 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 (0x00007f4d1000a800):  JavaThread "Unknown thread" [_thread_in_vm, id=3117, stack(0x00007f4d18a5a000,0x00007f4d18b5b000)]


Stack: [0x00007f4d18a5a000,0x00007f4d18b5b000],  sp=0x00007f4d18b59400,  free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x9a32da]  VMError::report_and_die()+0x2ea
V  [libjvm.so+0x497f7b]  report_vm_out_of_memory(char const*, int, unsigned long, char const*)+0x9b
V  [libjvm.so+0x81fcce]  os::Linux::commit_memory_impl(char*, unsigned long, bool)+0xfe
V  [libjvm.so+0x820219]  os::pd_commit_memory(char*, unsigned long, unsigned long, bool)+0x29
V  [libjvm.so+0x819faa]  os::commit_memory(char*, unsigned long, unsigned long, bool)+0x2a
V  [libjvm.so+0x99eae9]  VirtualSpace::expand_by(unsigned long, bool)+0x1c9
V  [libjvm.so+0x99ec6d]  VirtualSpace::initialize(ReservedSpace, unsigned long)+0xcd
V  [libjvm.so+0x5793ff]  Generation::Generation(ReservedSpace, unsigned long, int)+0xcf
V  [libjvm.so+0x49e4e8]  DefNewGeneration::DefNewGeneration(ReservedSpace, unsigned long, int, char const*)+0x58
V  [libjvm.so+0x57aac9]  GenerationSpec::init(ReservedSpace, int, GenRemSet*)+0x2c9
V  [libjvm.so+0x56afe4]  GenCollectedHeap::initialize()+0x344
V  [libjvm.so+0x9751aa]  Universe::initialize_heap()+0xca
V  [libjvm.so+0x976379]  universe_init()+0x79
V  [libjvm.so+0x5b1d25]  init_globals()+0x65
V  [libjvm.so+0x95dc6d]  Threads::create_vm(JavaVMInitArgs*, bool*)+0x1ed
V  [libjvm.so+0x639fe4]  JNI_CreateJavaVM+0x74
C  [libjli.so+0x2f8e]  JavaMain+0x9e

展开
收起
尧小豆子 2016-06-15 09:28:17 9406 0
1 条回答
写回答
取消 提交回答
  • 同学提交的日志里有这么一段换

    # 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=

    我猜可能用的是32位系统或者32位JDK,导致没法分配大内存
    2016-06-16 11:10:38
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
RocketMQ Client-GO 介绍 立即下载
RocketMQ Prometheus Exporter 打造定制化 DevOps 平台 立即下载
基于 RocketMQ Prometheus Exporter 打造定制化 DevOps 平台 立即下载