在 Xenial 上运行 Apache ActiveMQ 需要什么?

在 Xenial 上运行 Apache ActiveMQ 需要什么?

我已经安装了Active MQ:

apt-get install activemq
ln -s /etc/activemq/instances-available/main /etc/activemq/instances-enabled/main
systemctl start activemq.service

然而,服务状态是活跃(退出)

# systemctl status activemq.service
● activemq.service - Apache ActiveMQ
   Loaded: loaded (/lib/systemd/system/activemq.service; disabled; vendor preset: enabled)
   Active: active (exited) since Di 2017-11-21 13:06:41 CET; 21h ago

Nov 22 10:56:47 hostname systemd[1]: Started Apache ActiveMQ.

服务未运行:

# ps -ef | grep activemq
root     62776 41890  0 11:11 pts/1    00:00:00 grep --color=auto activemq

我没有找到任何错误消息来引导我继续前进。我没有找到activemq.service我猜测应该在某处的文件,但是如果没有文件,某些东西就会尝试启动:在我创建符号链接之前,我在这里遇到了一个错误,现在我已经创建了它,我不再收到错误。

我尝试/etc/init.d/activemq使用一些进行编辑echo test > /tmp/test。但是,它/tmp/test没有被创建,似乎没有被执行。但是编辑文件会导致警告,Warning: activemq.service changed on disk. Run 'systemctl daemon-reload' to reload units.所以它似乎是启动过程的一部分。我在这里有点困惑。 /lib/systemd/system/activemq.service存在。

我搜索了有关如何在 Xenial 上安装 ActiveMQ 的教程,但他们要么手动下载,要么除了命令之外没有提到任何其他内容apt-get

/etc/init.d/activemq console main按照作品中的说明手动运行服务/usr/share/doc/activemq/README.Debian,因此安装本身似乎没有问题:

# /etc/init.d/activemq console main
 * Starting with Console ActiveMQ instance  main                                                                                                                                                                                             INFO: Loading '/usr/share/activemq/activemq-options'
INFO: Using java '/usr/lib/jvm/default-java//bin/java'
INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C)
INFO: Creating pidfile /var/run/activemq/main.pid
Java Runtime: Oracle Corporation 1.8.0_151 /usr/lib/jvm/java-8-openjdk-amd64/jre
  Heap sizes: current=502784k  free=497520k  max=502784k
    JVM args: -Xms512M -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.awt.headless=true -Djava.io.tmpdir=/var/lib/activemq/tmp -Dactivemq.classpath=/etc/activemq/instances-enabled/main:/var/lib/activemq/../lib/: -Dactivemq.home=/usr/share/activemq -Dactivemq.base=/var/lib/activemq/main -Dactivemq.conf=/etc/activemq/instances-enabled/main -Dactivemq.data=/var/lib/activemq/data
Extensions classpath:
  [/var/lib/activemq/main/lib,/usr/share/activemq/lib,/var/lib/activemq/main/lib/camel,/var/lib/activemq/main/lib/optional,/var/lib/activemq/main/lib/web,/var/lib/activemq/main/lib/extra,/usr/share/activemq/lib/camel,/usr/share/activemq/lib/optional,/usr/share/activemq/lib/web,/usr/share/activemq/lib/extra]
ACTIVEMQ_HOME: /usr/share/activemq
ACTIVEMQ_BASE: /var/lib/activemq/main
ACTIVEMQ_CONF: /etc/activemq/instances-enabled/main
ACTIVEMQ_DATA: /var/lib/activemq/data
Loading message broker from: xbean:activemq.xml
 INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@6e3c1e69: startup date [Wed Nov 22 11:18:39 CET 2017]; root of context hierarchy
 WARN | Memory Usage for the Broker (1024mb) is more than the maximum available for the JVM: 491 mb - resetting to 70% of maximum available: 343 mb
 INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[/var/lib/activemq/main/data/kahadb]
 INFO | KahaDB is version 6
 INFO | Recovering from the journal @1:503
 INFO | Recovery replayed 272 operations from the journal in 0.072 seconds.
 INFO | PListStore:[/var/lib/activemq/main/data/localhost/tmp_storage] started
 INFO | Apache ActiveMQ 5.13.2 (localhost, ID:hostname-36913-1511345920463-0:1) is starting
 INFO | Listening for connections at: tcp://localhost:61616
 INFO | Connector openwire started
 INFO | Apache ActiveMQ 5.13.2 (localhost, ID:hostname-36913-1511345920463-0:1) started
 INFO | For help or more information please see: http://activemq.apache.org
 WARN | Store limit is 102400 mb (current store usage is 0 mb). The data directory: /var/lib/activemq/main/data/kahadb only has 94825 mb of usable space. - resetting to maximum available disk space: 94825 mb

Ctrl+C

 INFO | Apache ActiveMQ 5.13.2 (localhost, ID:hostname-36913-1511345920463-0:1) is shutting down
 INFO | Connector openwire stopped
 INFO | PListStore:[/var/lib/activemq/main/data/localhost/tmp_storage] stopped
 INFO | Stopping async queue tasks
 INFO | Stopping async topic tasks
 INFO | Stopped KahaDB
 INFO | Apache ActiveMQ 5.13.2 (localhost, ID:hostname-36913-1511345920463-0:1) uptime 5.708 seconds
 INFO | Apache ActiveMQ 5.13.2 (localhost, ID:hostname-36913-1511345920463-0:1) is shutdown

我不想手动安装它,因为我想在将来接收潜在的更新。我需要什么来运行提供的 ActiveMQ apt-get

答案1

这是一个错误。我提交了一个错误报告

相关内容