apache rockerMQ broker doesn't start

683 views Asked by At

i try to star rockerMQ broker,but i got the error message:

There is insufficient memory for the Java Runtime Environment to continue.

Native memory allocation (mmap) failed to map 8589934592 bytes for committing reserved memory.

An error report file with more information is saved as:

/usr/local/soft/rocketMQ/incubator-rocketmq/distribution/target/apache-rocketmq/hs_err_pid6034.log

Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000005c0000000, 8589934592, 0) failed; error='Cannot allocate memory' (errno=12)

and i got something from the error log file about message of memory:

Memory: 4k page, physical 4089840k(551832k free), swap 2621432k(2621432k free) vm_info: Java HotSpot(TM) 64-Bit Server VM (25.144-b01) for linux-amd64 JRE (1.8.0_144-b01), built on Jul 21 2017 21:57:33 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)

how can i let the rockerMQ broker working for me

2

There are 2 answers

0
JaskeyLam On

Try modifying the start shell scripts to make a smaller JVM heap size in your dev/test env

0
Kasthuriraajan On

You can reduce the JVM heap size. Open the distribution/bin/runbroker.sh file of your project and change the following line

JAVA_OPT="${JAVA_OPT} -server -Xms8g -Xmx8g -Xmn4g"

as

JAVA_OPT="${JAVA_OPT} -server -Xms4g -Xmx4g -Xmn2g"

now broker will only generate a 4G heap .I hope it will solve your problem.Now you can try to build and run.