6

我按照教程安装 ActiveMQ http://servicebus.blogspot.com/2011/02/installing-apache-active-mq-on-ubuntu.html

我不太明白教程的这一部分

Now, you must create the data/jmx.password and data/jmx.access files

我应该如何解决这个问题?

我尝试通过以下方式运行服务

sudo /etc/init.d/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
INFO: changing to user 'activemq' to invoke java
No directory, logging in with HOME=/
INFO: pidfile created : '/opt/activemq/data/activemq-iandjx-GA-MA785GMT-USB3.pid' (pid 
'6092')

但我仍然无法连接到

http://localhost:8161

提前致谢。

sudo apt-get install activemq我当时也试过

activemq

这给了我

INFO: Loading '/usr/share/activemq/activemq-options'
INFO: Using java '/usr/lib/jvm/java-6-openjdk//bin/java'
mkdir: missing operand
Try `mkdir --help' for more information.
/usr/bin/activemq: 399: /usr/bin/activemq: /usr/lib/jvm/java-6-openjdk//bin/java -Xms512M -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true                -Dactivemq.classpath="/var/lib/activemq/conf;"               -Dactivemq.home="/usr/share/activemq"               -Dactivemq.base="/var/lib/activemq/"               -Dactivemq.conf="/var/lib/activemq/conf"               -Dactivemq.data="/var/lib/activemq/data"                              -jar "/usr/share/activemq/bin/run.jar" : not found
Tasks provided by the sysv init script:
    restart         - stop running instance (if there is one), start new instance
    console         - start broker in foreground, useful for debugging purposes
    status          - check if activemq process is running
    setup           - create the specified configuration file for this init script
                      (see next usage section)

Configuration of this script:
    The configuration of this script can be placed on /etc/default/activemq or /home/iandjx/.activemqrc.
    To use additional configurations for running multiple instances on the same operating system
    rename or symlink script to a name matching to activemq-instance-<INSTANCENAME>.
    This changes the configuration location to /etc/default/activemq-instance-<INSTANCENAME> and
    $HOME/.activemqrc-instance-<INSTANCENAME>. Configuration files in /etc have higher precedence.
4

5 回答 5

2

要以交互模式启动服务器,请转到 /bin 并运行./activemq console

于 2012-11-06T05:35:51.230 回答
1

检查 /etc/default/activemq 的这一行并记下用户名和密码:

ACTIVEMQ_SUNJMX_CONTROL="--jmxurl service:jmx:rmi:///jndi/rmi://127.0.0.1:1099/j
mxrmi --jmxuser USERNAME --jmxpassword PASSWORD"

您的 jmx.password 文件应包含用户名/密码对

USERNAME PASSWORD

您的 jmx.access 文件应包含用户名,后跟 readwrite

USERNAME readwrite
于 2014-11-04T20:10:15.587 回答
1

activemq 启动

应该可以启动它。

活动MQ状态

应该告诉服务是否正在运行。

您可能必须运行一次以创建 PID 文件,然后重新运行以使其工作,如此答案中的描述:Activemq will not start on my Ubuntu VM

如果它正在运行并且您无法连接到 Web 控制台,请检查此其他 Q/A:ActiveMQ 控制台不可用

于 2013-04-09T12:46:46.850 回答
0

sudo是必要的。

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')
于 2015-03-30T12:55:33.980 回答
0

打开文件 vim /etc/default/activemq 和注释行 #ACTIVEMQ_USER="activemq"

现在转到 apache-activemq 中的 bin 文件夹并使用命令 ./activemq start 运行它

于 2018-02-21T10:41:24.023 回答