Windows installed rocketmq mining pit full record

1. Download decompression rocketmq

这里写图片描述

2. Configure ROCKETMQ_HOME environment variable

Variable name: ROCKETMQ_HOME   Variable value: rocketmq decompression path

这里写图片描述

3. Start nameserver     From cmd.exe, go to the "rocketmq decompression path /bin" directory and execute "start mqnamesrv.cmd". If the following window pops up, you cannot allocate enough memory. 这里写图片描述

needs to modify the jvm related parameters, set "JAVA_OPT=%JAVA_OPT% -server -Xms2g -Xmx2g -Xmn1g", the parameters are changed to small. The same reason as the broker. The two files are located at: "rocketmq decompression path /bin/runserver.cmd", "rocketmq decompression path /bin/runbroker.cmd"

After the modification is completed, start again, after success:

这里写图片描述

4. Broker Still in the current directory, execute "start mqbroker.cmd -n 127.0.0.1:9876 autoCreateTopicEnable=true". There are three issues that can occur when starting a broker:      (1) Invalid maximum direct memory size: -XX:MaxDirectMemorySize=15g

这里写图片描述

Solution: Modify the parameters of runbroker.cmd and change the value of -XX:MaxDirectMemorySize=15g.

(2) could not find or can not load the main class

这里写图片描述

解: Change set "JAVA_OPT=%JAVA_OPT% -cp %CLASSPATH%" in runbroker.cmd to: set "JAVA_OPT=%JAVA_OPT% -cp "%CLASSPATH%""(3) Flashback command line

这里写图片描述

解: Delete C:\Users\"current system user name"\store All files.

After the successful launch of the broker:

这里写图片描述