客户端无法在HornetQ服务器上连接

时间:2016-02-03 16:23:22

标签: jms spring-jms hornetq

我有一个spring-boot应用程序充当HornetQ服务器和~10个客户端应用程序发送和接收消息没有任何问题。 但是有一个特定的客户端拒绝连接以下异常:

org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: HQ119014: Timed out waiting for response when sending packet 30
  at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
  at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:169)
  at org.springframework.jms.core.JmsTemplate.executeLocal(JmsTemplate.java:987)
  at org.springframework.jms.core.JmsTemplate.sendAndReceive(JmsTemplate.java:923)
  at coral.rapidreconciler.agent.jms.AgentConnectionJms.connectToValc(AgentConnectionJms.java:52)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
  at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)
Caused by: javax.jms.JMSException: HQ119014: Timed out waiting for response when sending packet 30
  at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:390)
  at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:891)
  at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:800)
  at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:337)
  at org.hornetq.jms.client.HornetQConnection.authorize(HornetQConnection.java:719)
  at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:762)
  at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:112)
  at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:107)
  at org.springframework.jms.core.JmsTemplate.executeLocal(JmsTemplate.java:976)
  ... 15 common frames omitted
Caused by: org.hornetq.api.core.HornetQConnectionTimedOutException: HQ119014: Timed out waiting for response when sending packet 30
  ... 24 common frames omitted

在服务器上,此行显示在日志中:

2016-01-29 16:22:19.389  WARN 4764 --- [re-check-thread] org.hornetq.core.client                  : HQ212037: Connection failure has been detected: HQ119014: Did not receive data from /xx.xxx.xx.xxx:61350. It is likely the client has exited or crashed without closing its connection, or the network between the server and client has failed. You also might have configured connection-ttl and client-failure-check-period incorrectly. Please check user manual for more information. The connection will now be closed. [code=CONNECTION_TIMEDOUT]

发现此客户有什么问题的方向?防火墙,代理,网络,资源,版本?

1 个答案:

答案 0 :(得分:0)

然后遇到网络问题,我会做的一些事情:

1)从有问题的客户端Ping HornetQ并从HornetQ服务器ping客户端。如果您无法从任何一方ping,则可能是配置问题,例如错误的网络掩码或网关等。 Traceroute / tracert是你的朋友。

2)从有问题的客户端,尝试telnet到端口5446上的Hornetq服务器(假设你使用的是默认值)。如果端口打开,请键入一些垃圾字符并查看是否收到响应,即使垃圾得到某种响应也应指示客户端可以到达服务器。

3)开启更多日志记录,具体取决于它的配置方式,或者您在JBoss或其他应用服务器上运行的内容是否可能会改变您想要做的具体内容,如果不知道您的详细信息,则无法告诉您实现。客户端调试日志记录应该是您的朋友。