我正试图在傀儡主人(开源木偶)上设置source /activemq。我遇到了一个ActiveMQ不承认Stomp协议的问题。下面是我的/etc/activemq/instances-enabled/activemq/activemq.xml文件中应该启用stomp+ssl的相关片段:
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
<transportConnector name="stomp+ssl" uri="stomp+ssl://0.0.0.0:61614?needClientAuth=true&transport.enabledProtocols=TLSv1,TLSv1.1,TLSv1.2"/>
</transportConnectors>当我通过ActiveMQ启动service activemq start时,我注意到守护进程没有运行(我不认为它是一个进程)。然后我尝试运行service activemq console activemq,看起来问题在于它找不到stomp传输方案。下面是我在输出中看到的第一个错误(该错误在整个输出中始终存在):
未能启动Apache ActiveMQ (localhost,ID:my-servers-hostname.example.com-40447-1475514312306-0:1,java.io.IOException: Transport无法在JMX: java.io.IOException中注册:传输方案未识别: stomp+ssl)
ActiveMQ可以很好地识别开线。仅使用openwire+ssl而不使用stomp+ssl时,ActiveMQ守护进程启动良好,没有任何错误。但是,当我尝试运行mco find时,会出现一个错误,因为mco似乎仍然试图使用stomp+ssl ( ActiveMQ只启用了openwire+ssl ):
错误2016/10/03 17:26:59: activemq.rb:149:in `on_ssl_connectfail的SSL会话创建带有stomp+ssl:// session @localhost: 61614失败:连接被拒绝-连接(2)用于"localhost“端口61614
也许我需要调整我的mco配置来使用开线而不是stomp?我不确定该配置将在何处或在哪个文件中。不知道为什么它不认识脚,但我想知道我的选择在这里。如果我想使用mco,那么是否可以只使用openwire+ssl来使用mco/ActiveMQ,或者是否需要使用stomp呢?我不认为这是一个端口问题,因为相关的端口是开放的服务器,我相信。
以下是安装在我的机器上的相关软件包/版本:
OS: Ubuntu 16.04 (xenial)
puppet: 4.7.0
ActiveMQ: 5.13.2
ruby-stomp: 1.3.5-1
MCollective (mco) version: 2.9.0发布于 2017-08-04 11:20:51
在我的项目中,嵌入式ActiveMQ服务器也遇到了同样的问题。结果,我需要将以下依赖项添加到pom中。
<dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-stomp</artifactId> <version>5.15.0</version> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-kahadb-store</artifactId> <version>5.15.0</version> </dependency>
在您的例子中,我认为您需要掌握这两个jars并将它们添加到您的ActiveMQ安装中。
发布于 2017-09-21 14:03:29
在由ubuntu 16+库提供的16+包中,不包括stomp传输。我不知道为什么。Yoy可以手动下载并放在/usr/share/activemq/lib中
cd /usr/share/activemq/lib
# check your actviemq version before (apt-cache policy activemq) and use the relevant version of library.
wget https://repository.apache.org/content/repositories/releases/org/apache/activemq/activemq-stomp/5.13.5/activemq-stomp-5.13.5.jar
service activemq restarthttps://stackoverflow.com/questions/39839613
复制相似问题