JMS-即使可以连接到远程提供程序,也无法创建会话工厂

时间:2018-08-01 09:30:47

标签: java jboss jms spring-jms jms-topic

我制作了一个罐子以连接到JMS提供程序,它在服务器(a)上可以正常工作,但在服务器(b)上不能正常工作。

我确认通过telnet从服务器(b)到JMS提供程序的连接正常,如下所示:

    -> telnet -d 10.127.161.247 4447
Trying 10.127.161.247...
Connected to 10.127.161.247.

引发的日志和异常如下:

2018/08/01 11:19:47:921 - Processing command line arguments...
2018/08/01 11:19:47:927 - Preparing the output...  Writing to file = true
2018/08/01 11:19:50:315 - Trying to establish connection, attempt: 0
2018/08/01 11:19:52:132 - Connecting to provider: remote://10.127.161.247:4447 using user: oad_user
2018/08/01 11:19:52:132 - Creating a regular (non-secure) connection factory...
2018/08/01 11:19:53:073 - Opening a connection to the JMS provider...
2018/08/01 11:20:24:192 - Attempt failed: Failed to create session factory
javax.jms.JMSException: Failed to create session factory
        at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:675)
        at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createTopicConnection(ActiveMQConnectionFactory.java:267)
        at com.alcatel.ossgw.client.jms.JmsSubscriberClient.prepareConnection(JmsSubscriberClient.java:334)
        at com.alcatel.ossgw.client.jms.JmsSubscriberClient.connect(JmsSubscriberClient.java:274)
        at com.alcatel.ossgw.client.jms.JmsSubscriberClient.listen(JmsSubscriberClient.java:97)
        at com.alcatel.ossgw.client.jms.JmsSubscriberClient.main(JmsSubscriberClient.java:536)
Caused by: ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ119007: Cannot connect to server(s). Tried with all available servers.]
        at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:818)
        at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:67

我不知道如何调试这样的问题,因为我是JMS的新手,对于任何评论和想法,我将不胜感激。

非常感谢

1 个答案:

答案 0 :(得分:1)

你有没有发现为什么会发生这种情况? 我有一个相关的问题,一个活动的 JMS 连接突然断开,系统开始抛出这个异常,直到系统重新启动完成,然后它再次连接,没有失败。