rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

Can't Start Name Server on Ubuntu

Open qiaofeng1227 opened this issue 5 years ago • 5 comments

BUG REPORT

  1. 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

  1. Please tell us about your environment: OS:Ubuntu20.04 JDK:1.8 RocketMQ:4.8.0

  2. 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 $@

qiaofeng1227 avatar Feb 23 '21 01:02 qiaofeng1227

Can you provide more error info?

fengyiluo avatar Feb 23 '21 10:02 fengyiluo

BUG REPORT

  1. 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

  1. Please tell us about your environment: OS:Ubuntu20.04 JDK:1.8 RocketMQ:4.8.0
  2. 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 $@

According to ur solution, is it can not execute sh command on Ubuntu?

lizhiboo avatar Feb 23 '21 12:02 lizhiboo

any more error information?

ShannonDing avatar Feb 23 '21 13:02 ShannonDing

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.

vxinv avatar Feb 24 '21 11:02 vxinv

same problem here, and to solve this you just need change sh to bash

FYI Difference between single and double square brackets in Bash

afewnotes avatar Mar 08 '21 03:03 afewnotes