Activemq will not start on my Ubuntu VM

匿名 (未验证) 提交于 2019-12-03 02:16:02

问题:

I'm trying to run activemq on my ubuntu virtual machine but have constantly been running into issues getting it to start up. I've tried downloading the binary and source with no luck. Currently I have downloaded the source, run "mvn clean install -Dmaven.test.skip=true" and mvn reported successful installation. I then hunted around in my .m2 folder found apache-activemq-5.5.1-bin.tar.gz and extracted it to my home/USERNAME dir and attempted to run "bash bin/activemq start" only to receive the following error.

INFO: Loading '/etc/default/activemq' INFO: Using java '/usr/bin/java' INFO: Starting - inspect logfiles specified in logging.properties  and log4j.properties      to get details bin/activemq: line 370: /usr/bin/java -Xms256M -Xmx256M -Dorg.apache.activemq.UseDedicatedTaskRunner=true  -Djava.util.logging.config.file=logging.properties  -Dcom.sun.management.jmxremote  -Dactivemq.classpath="/home/jacob/activeMq1/apache-activemq-5.5.1/conf;"  -Dactivemq.home="/home/jacob/activeMq1/apache-activemq-5.5.1"   -Dactivemq.base="/home/jacob/activeMq1/apache-activemq-5.5.1" -jar "/home/jacob/activeMq1/apache-activemq-5.5.1/bin/run.jar" start >/dev/null 2>&1 &   RET="$?"; APID="$!";  echo $APID > /home/jacob/activeMq1/apache-activemq-5.5.1/data/activemq.pid;  echo "INFO: pidfile created : '/home/jacob/activeMq1/apache-activemq-5.5.1/data/activemq.pid' (pid '$APID')";  exit $RET: No such file or directory     

Has any one run into this type of error before?

回答1:

Looks like I'm answering one of my questions again, but maybe this will help someone in the future.

steps.

  1. I ended up getting activemq to work by creating a configuration file via running the command "./bin/activemq setup newConfig" (exclude the quotes)
  2. I then replaced the current config file "activemq" which was located at etc/default/. (I made a backup of the original activemq file before overwriting it with newConfig).
  3. Run "./bin/activemq start" which will create a PID file.
  4. After the file is created re-run "./bin/activemq start" to finally start up the broker.

You can then test the install by navigating to "http://localhost:8161/admin/" or by doing a "netstat -an | grep 61616" if you kept the default ports etc.



回答2:

I install activemq 5.13 on Debian, download and unzip in /opt, then I go to /opt/apache-activemq-5.13.1/run "./bin/activemq start", then appear this error:

xx@debian:/opt/apache-activemq-5.13.1$ ./bin/activemq start INFO: Loading '/etc/default/activemq' INFO: Using java '/usr/bin/java' INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details ./bin/activemq: 330: ./bin/activemq: "/usr/bin/java"  -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/opt/apache-activemq-5.13.1//conf/login.config   -Djava.awt.headless=true -Djava.io.tmpdir="/opt/apache-activemq-5.13.1//tmp"                -Dactivemq.classpath="/opt/apache-activemq-5.13.1//conf:/opt/apache-activemq-5.13.1//../lib/:"               -Dactivemq.home="/opt/apache-activemq-5.13.1/"               -Dactivemq.base="/opt/apache-activemq-5.13.1/"               -Dactivemq.conf="/opt/apache-activemq-5.13.1//conf"               -Dactivemq.data="/opt/apache-activemq-5.13.1//data"                              -jar "/opt/apache-activemq-5.13.1//bin/activemq.jar" start >/dev/null 2>&1 &           RET="$?"; APID="$!";           echo $APID > /opt/apache-activemq-5.13.1//data/activemq.pid;           echo "INFO: pidfile created : '/opt/apache-activemq-5.13.1//data/activemq.pid' (pid '$APID')";exit $RET: not found 

What I did is to check the Debian version using "uname -a":

Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux 

I found my debian is 64 bit system. so I run

./bin/linux-x86-64/activemq start 

It shows:

Starting ActiveMQ Broker... 

Then I can access the site:http://localhost:8161/admin/ with username "admin" and password "admin"



回答3:

with Ubuntu 14.04, I had to create a link in /etc/activemq/instances-enabled

sudo ln -s ../instances-available/main/ 

similar to apache2 setup

then started the server with /etc/init.d/activemq start



回答4:

sudo is necessary.

bin$ sudo ./activemq start

bin$ sudo ./activemq status INFO: Loading '/opt/runtime/apache-activemq-5.11.1/bin/env' INFO: Using java '/usr/bin/java' ActiveMQ is running (pid '29887')



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!