You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Scott M Messner (JIRA)" <ji...@apache.org> on 2015/07/29 18:51:05 UTC

[jira] [Commented] (AMQ-5250) temp queue not working after long run of activemq

    [ https://issues.apache.org/jira/browse/AMQ-5250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14646394#comment-14646394 ] 

Scott M Messner commented on AMQ-5250:
--------------------------------------

I believe I found a way to reproduce this error but I don't quite understand what's happening so I'll leave you guys with the code and you can tell me if you need more info:

My test consists of ServiceA sending a message and waiting for a response from ServiceB
ServiceB sends 5 response messages the 5th of which will be a Shutdown command.

I've added a 30 second sleep to induce a FailOverTransport timeout error.
The first pass through the test runs fine, throwing the timeout error, but continuing gracefully (bravo ActiveMQ)
Running the test a second time will immediately throw the JMSException seen below. 

2015-07-29 18:34:35 INFO  FailoverTransport:1030 - Successfully connected to tcp://xxx.xxx.xxx.xxx:61616
2015-07-29 18:34:35 INFO  FailoverTransport:1030 - Successfully connected to tcp://xxx.xxx.xxx.xxx:61616
2015-07-29 18:34:38 INFO  FailoverTransport:1030 - Successfully connected to tcp://xxx.xxx.xxx.xxx:61616
2015-07-29 18:34:38 INFO  FailoverTransport:1030 - Successfully connected to tcp://xxx.xxx.xxx.xxx:61616
2015-07-29 18:34:38 ERROR TempDestinationTestServiceB:83 - Error treating message
com.blackstrype.mom.MOMException: sendReplyMapMessage JMSException : Cannot publish to a deleted Destination: temp-queue://ID:titoBox-64611-1438187511326-7:1:1
	at com.blackstrype.mom.CloudMOM.sendReplyMapMessage(CloudMOM.java:556)
	at com.blackstrype.mom.test.tempdest.TempDestinationTestServiceB$SandboxListener.onMessage(TempDestinationTestServiceB.java:72)
	at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1321)
	at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131)
	at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202)
	at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:129)
	at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:47)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: javax.jms.InvalidDestinationException: Cannot publish to a deleted Destination: temp-queue://ID:titoBox-64611-1438187511326-7:1:1
	at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1735)
	at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:289)
	at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:224)
	at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:300)
	at com.blackstrype.mom.CloudMOM.sendReplyMapMessage(CloudMOM.java:554)
	... 9 more
2015-07-29 18:34:38 INFO  TempDestinationTestServiceA:144 - Message response received: id=0, body=Response 0 to: 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv'.
2015-07-29 18:35:08 INFO  TempDestinationTestServiceA:144 - Message response received: id=1, body=Response 1 to: 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv'.
2015-07-29 18:35:38 INFO  TempDestinationTestServiceA:144 - Message response received: id=2, body=Response 2 to: 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv'.
2015-07-29 18:35:45 WARN  FailoverTransport:255 - Transport (tcp://YYY.YYY.YYY.YYY:61616) failed, reason:  org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>30000) long: tcp://YYY.YYY.YYY.YYY:61616, attempting to automatically reconnect
2015-07-29 18:35:45 WARN  FailoverTransport:255 - Transport (tcp://YYY.YYY.YYY.YYY:61616) failed, reason:  org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>30000) long: tcp://YYY.YYY.YYY.YYY:61616, attempting to automatically reconnect
2015-07-29 18:35:49 INFO  FailoverTransport:1032 - Successfully reconnected to tcp://xxx.xxx.xxx.xxx:61616
2015-07-29 18:35:49 INFO  FailoverTransport:1032 - Successfully reconnected to tcp://xxx.xxx.xxx.xxx:61616
2015-07-29 18:36:08 INFO  TempDestinationTestServiceA:144 - Message response received: id=3, body=Response 3 to: 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv'.
2015-07-29 18:36:38 INFO  TempDestinationTestServiceA:141 - Received 5 in 120.00 seconds
2015-07-29 18:36:38 INFO  TempDestinationTestServiceA:144 - Message response received: id=4, body=SHUTDOWN
2015-07-29 18:36:38 INFO  TempDestinationTest:77 - Sent: 5, Received: 5
2015-07-29 18:36:38 INFO  TempDestinationTest:79 - Result is: 0

Amusingly, my test continues successfully because ServiceB will reconsume the message and then finish sending the 5 responses.
If I reduce the sleep to 20 seconds, there are no timeouts and the second pass runs without issues. I leave it to you guys now!

> temp queue not working after long run of activemq
> -------------------------------------------------
>
>                 Key: AMQ-5250
>                 URL: https://issues.apache.org/jira/browse/AMQ-5250
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.9.0
>            Reporter: Rural Hunter
>             Fix For: WAITING_FOR_TEST
>
>
> We encounterred a problem when using temp queue for request/reply pattern. It worked normally but after a long time lets say several weeks, the applications using temp queue started to report errors:
> 2014-06-25 08:25:59 [WARNING] Message back to the server fails!
> javax.jms.InvalidDestinationException: Cannot publish to a deleted Destination: temp-queue://ID:myserver-45345-1403492084155-1:1:259
> at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1748)
> at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:289)
> at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:224)
> at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:300)
> I created a test application to test the temp when the problem happened and found this: On each connection, the temp queue worked once and the second time it failed. I also tried to monitor messages in ActiveMQ.Advisory.TempQueue. But I could only receive one message after I subsribed on it everytime. 
> I checked the activemq log and there was nothing about the problem. Other applications not using temp queue worked fine. This happened twice in recent month. I just had to restart activemq to fix it.
> I saw a same error in mailing list but not sure if it's the same problem:
> http://activemq.2283324.n4.nabble.com/Getting-a-quot-Cannot-publish-to-a-deleted-Destination-quot-but-eventually-works-after-a-couple-of-rs-td4682497.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)