【发布时间】:2017-02-11 20:53:54
【问题描述】:
我正在尝试在 puppetmaster(开源 puppet)上设置 mcollective/activemq。我遇到了 ActiveMQ 无法识别 Stomp 协议的问题。这是我的/etc/activemq/instances-enabled/activemq/activemq.xml 文件中应该启用 stomp+ssl 的相关 sn-p:
<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>
当我通过service activemq start 启动 ActiveMQ 时,我注意到守护程序最终没有运行(我不认为它是一个进程)。然后我尝试运行service activemq console activemq,看起来问题是它找不到 stomp Transport 方案。这是我在输出中看到的第一个错误(并且该错误在整个输出中持续存在):
错误 |无法启动 Apache ActiveMQ([本地主机, ID:my-servers-hostname.example.com-40447-1475514312306-0:1],java.io.IOException:传输 连接器无法注册 JMX:java.io.IOException:传输 无法识别方案:[stomp+ssl])
ActiveMQ 可以很好地识别 openwire。仅使用 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 session creation with stomp+ssl://mcollective@localhost:61614 failed: Connection refused - connect(2) for “本地主机”端口 61614
也许我需要调整我的 mco 配置以使用 openwire 而不是 stomp?我不确定该配置将在何处或哪个文件中。不确定为什么它无法识别 stomp,但我想知道我的选择是什么。是否可以仅使用 openwire+ssl 来使用 MCollective/ActiveMQ,或者如果我想使用 mco,是否需要使用 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
【问题讨论】:
-
你找到解决办法了吗?
标签: activemq puppet stomp ubuntu-16.04 mcollective