Activemq无法在我的Ubuntu VM上启动

Orw*_*erg 10 activemq-classic virtual-machine

我正在尝试在我的ubuntu虚拟机上运行activemq,但一直遇到启动它的问题.我试过没有运气下载二进制文件和源代码.目前我已下载源代码,运行"mvn clean install -Dmaven.test.skip = true"并且mvn报告安装成功.然后我在我的.m2文件夹中找到apache-activemq-5.5.1-bin.tar.gz并将其解压缩到我的home/USERNAME目录并尝试运行"bash 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: 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    
Run Code Online (Sandbox Code Playgroud)

有没有人遇到过这种类型的错误?

Orw*_*erg 17

看起来我再次回答了我的一个问题,但也许这将有助于将来的某些人.

脚步.

  1. 我最终通过运行命令"./bin/activemq setup newConfig"创建配置文件来使activemq工作(不包括引号)
  2. 然后我替换了位于etc/default /的当前配置文件"activemq".(我在用newConfig覆盖之前备份了原始的activemq文件).
  3. 运行"./bin/activemq start",这将创建一个PID文件.
  4. 创建文件后重新运行"./bin/activemq start"以最终启动代理.

然后,如果保留默认端口等,则可以通过导航到"http:// localhost:8161/admin /"或执行"netstat -an | grep 61616"来测试安装.

  • 当我为ubuntu 12.04尝试ubuntu软件包时,我遇到了同样的错误,并且步骤没有解决.但是,在使用tar.gz版本时,您的步骤可以完美地解决此错误 (3认同)

Pin*_* Li 10

我安装Debian的,下载的ActiveMQ 5.13并解压缩到/ opt,然后我去/opt/apache-activemq-5.13.1/run"./bin/activemq开始",然后会出现这样的错误:

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
Run Code Online (Sandbox Code Playgroud)

我做的是使用"uname -a"检查Debian版本:

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

我发现我的debian是64位系统.所以我跑了

./bin/linux-x86-64/activemq start
Run Code Online (Sandbox Code Playgroud)

表明:

Starting ActiveMQ Broker...
Run Code Online (Sandbox Code Playgroud)

然后我可以访问该站点:http:// localhost:8161/admin /用户名"admin"和密码"admin"


Bob*_*Bob 8

使用Ubuntu 14.04,我必须在/ etc/activemq/instances-enabled中创建一个链接

sudo ln -s ../instances-available/main/
Run Code Online (Sandbox Code Playgroud)

类似于apache2设置

然后启动服务器 /etc/init.d/activemq start