Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Activemq将不会在我的Ubuntu虚拟机上启动_Activemq_Virtual Machine - Fatal编程技术网

Activemq将不会在我的Ubuntu虚拟机上启动

Activemq将不会在我的Ubuntu虚拟机上启动,activemq,virtual-machine,Activemq,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: Loadi

我试图在我的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    

以前有人遇到过这种错误吗?

看起来我又在回答我的一个问题,但这可能会对将来的人有所帮助

步骤

  • 最后,我通过运行命令“/bin/activemq setup newConfig”(排除引号)创建了一个配置文件,从而使activemq正常工作
  • 然后,我替换了位于etc/default/的当前配置文件“activemq”。(在使用newConfig覆盖原始activemq文件之前,我对其进行了备份)
  • 运行“/bin/activemq start”,它将创建一个PID文件
  • 创建文件后,重新运行“/bin/activemq start”以最终启动代理

  • 然后,您可以通过导航到“”来测试安装http://localhost:8161/admin/或者如果你在Ubuntu 14.04中保留了默认端口等,那么通过执行“netstat-an | grep 6161616”,我必须在/etc/activemq/instances中创建一个链接

    sudo ln -s ../instances-available/main/
    
    类似于apache2设置

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

    sudo是必需的

    bin$sudo./activemq启动 bin$sudo./activemq状态
    信息:加载“/opt/runtime/apache-activemq-5.11.1/bin/env”信息:使用java“/usr/bin/java”activemq正在运行(pid“29887”)

    我在Debian上安装activemq 5.13,在/opt中下载并解压缩,然后转到/opt/apache-activemq-5.13.1/run“/bin/activemq start”,然后出现以下错误:

    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
    
    我所做的是使用“uname-a”检查Debian版本:

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

    ./bin/linux-x86-64/activemq start
    
    它表明:

    Starting ActiveMQ Broker...
    

    然后我就可以访问这个网站了:使用用户名“admin”和密码“admin”

    进行了更多的工作。我能够从bin文件运行“java-jarrun.jarstart”。虽然我很确定运行run.jar本身并不是一个最佳实践,但当我尝试ubuntu 12.04的ubuntu包时,我遇到了与您相同的错误,这些步骤并没有解决这个问题。但是,在使用tar.gz版本时,您的步骤完美地解决了此错误谢谢!我还使用了您的步骤在ubuntu 13.10上安装了ActiveMQ 5.8。谢谢您,它帮助了我们。我们使用bash脚本自动下载和安装Activemq和可用服务,无论我们的脚本有多完美,当我们尝试运行vagrant up并在新创建的实例上运行脚本时,Activemq都不会启动,直到我们手动输入命令。感谢这篇文章,我们意识到了为什么。在ubuntu 18.04中,它使用下面的命令
    sudo/etc/init.d/activemq start
    ,如果您有定义
    activemq\u用户的
    /etc/default/activemq
    ,则必须以root用户身份启动脚本。因此,实际上,当user=activemq处于active-mq.service时,使用
    sudo
    或删除
    /etc/default/activemq
    都会遇到完全相同的问题。将其替换为root,现在一切都开始了。谢谢,谢谢。它帮助了我
    Starting ActiveMQ Broker...