连接到ActiveMQ表单grails
我正在尝试从Grails应用程序连接到远程ActiveMQ服务器。 但我得到了这个错误:连接到ActiveMQ表单grails,grails,groovy,activemq,Grails,Groovy,Activemq,我正在尝试从Grails应用程序连接到远程ActiveMQ服务器。 但我得到了这个错误: ERROR failover.FailoverTransport - Failed to connect to transport after: 5 attempt(s) could not refresh JMS Connection for destination 'queue' - retrying in 5000 ms. Cause: The JMS connection has failed:
ERROR failover.FailoverTransport - Failed to connect to transport after: 5 attempt(s)
could not refresh JMS Connection for destination 'queue' - retrying in 5000 ms.
Cause: The JMS connection has failed: connect timed out
ActiveMQ服务器的传输配置为:
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
这是一个网络问题,该机器无法访问activeMQ服务器。现在一切都好了,它与我最初发布的conf一起工作。它与其他客户机一起工作吗?aka:没有防火墙问题等?当我在本地主机上尝试时,它可以工作,我检查了端口是否打开,我不认为防火墙是问题所在,有时绑定不起作用很抱歉很晚才重播,但这是一个网络问题,该机无法访问activeMQ服务器。现在一切都好了,而且它使用了我最初发布的conf。
beans = {
jmsConnectionFactory(SingleConnectionFactory) {
targetConnectionFactory = { ActiveMQConnectionFactory cf ->
brokerURL = "failover:(tcp://brokerIpAddress:61616?connectionTimeout=5000)?maxReconnectDelay=5000&startupMaxReconnectAttempts=5"
}
}}