Can't Start Name Server on Ubuntu
BUG REPORT
- Please describe the issue you observed:
steps:
download the rocketmq-all-4.8.0-source-release.zip
execute the following commands to unpack 4.8.0 source release
Start Name Server on shell "nohup sh bin/mqnamesrv &"
mqnamesrv can't start!
Error executing the following script:
sh ${ROCKETMQ_HOME}/bin/runserver.sh
-
Please tell us about your environment: OS:Ubuntu20.04 JDK:1.8 RocketMQ:4.8.0
-
Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
Our Solution:
Edit file /rocketmq/bin/mqnamesrv, sh ${ROCKETMQ_HOME}/bin/runserver.sh org.apache.rocketmq.namesrv.NamesrvStartup $@ Replace with bash ${ROCKETMQ_HOME}/bin/runserver.sh org.apache.rocketmq.namesrv.NamesrvStartup $@
Can you provide more error info?
BUG REPORT
- Please describe the issue you observed:
steps: download the rocketmq-all-4.8.0-source-release.zip execute the following commands to unpack 4.8.0 source release Start Name Server on shell "nohup sh bin/mqnamesrv &"
mqnamesrv can't start!
Error executing the following script:
sh ${ROCKETMQ_HOME}/bin/runserver.sh
- Please tell us about your environment: OS:Ubuntu20.04 JDK:1.8 RocketMQ:4.8.0
- Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
Our Solution: Edit file /rocketmq/bin/mqnamesrv,
sh ${ROCKETMQ_HOME}/bin/runserver.sh org.apache.rocketmq.namesrv.NamesrvStartup $@Replace withbash ${ROCKETMQ_HOME}/bin/runserver.sh org.apache.rocketmq.namesrv.NamesrvStartup $@
According to ur solution, is it can not execute sh command on Ubuntu?
any more error information?
yes I also encountered the same problem info -------------------------------------- /server/rocketmq-all-4.8.0-bin-release/bin/runserver.sh: 70: /server/rocketmq-all-4.8.0-bin-release/bin/runserver.sh: [[: not found Unrecognized option: -Xlog:gc*:file=/dev/shm/rmq_srv_gc_%p_%t.log:time,tags:filecount=5,filesize=30M Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
same problem here, and to solve this you just need change sh to bash
FYI Difference between single and double square brackets in Bash