我有一个典型的客户端 - 服务器系统,中间有ActiveMQ。客户端将请求放入队列并等待为每个请求创建的临时队列中的响应。 ActiveMQ和我的服务器组件在同一工作站上运行。这个系统工作正常21天,但随后所有请求都开始永久失败(没有一个请求被成功处理)。我在服务器日志中看到以下内容:
2015-08-12 11:35:46,242 WARN Execution of JMS message listener failed, and no ErrorHandler has been set. [DefaultMessageListenerContainer][org.springframework.jms.listener.DefaultMessageListenerContainer#1-23]
javax.jms.InvalidDestinationException: Cannot publish to a deleted Destination: temp-queue://ID:<QUEUE_ID>
at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1841) ~[activemq-all-5.11.1.jar:5.11.1]
at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:288) ~[activemq-all-5.11.1.jar:5.11.1]
at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:223) ~[activemq-all-5.11.1.jar:5.11.1]
at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241) ~[activemq-all-5.11.1.jar:5.11.1]
请求通常执行得非常快(~1 ms),因此很难在客户端发生超时。同时我在activemq中看到了几个错误:
//It is my first server application
2015-08-12 11:35:46,242 | WARN | Transport Connection to: tcp://127.0.0.1:64322 failed: java.net.SocketException: Software caused connection abort: recv failed | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///127.0.0.1:64322@61616
//It is my second server application
2015-08-12 11:35:46,242 | WARN | Transport Connection to: tcp://127.0.0.1:64323 failed: java.io.EOFException | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///127.0.0.1:64323@61616
//Client (maybe he just closed application)
2015-08-12 11:36:20,311 | WARN | Transport Connection to: tcp://<client_ip>:60550 failed: java.net.SocketException: Connection reset | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///<client_ip>:60550@61616
2015-08-12 11:36:20,311 | INFO | temp-queue://ID:<QUEUE_ID> purged of 0 messages | org.apache.activemq.broker.region.Queue | ActiveMQ BrokerService[localhost] Task-141551
所有应用程序都停止并在2小时后再次启动。既然现在没有更多的错误。我试图重现这一点,但没有成功。谁能给我一个线索,这可能是造成这种行为的原因?
我的环境:
Windows Server 2008(禁用Windows防火墙)
Java 1.8.0_20
ActiveMQ 5.11.1