Issue Details (XML | Word | Printable)

Key: AMQ-1482
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Rob Davies
Reporter: Kevin W Edwards
Votes: 16
Watchers: 16
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

Channel was inactive for too long.

Created: 31/Oct/07 07:38 AM   Updated: 17/Jul/08 06:35 AM
Component/s: Connector
Affects Version/s: 5.1.0
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Windows XP, Eclipse, OSGi
Issue Links:
Related
 


 Description  « Hide
603422 [AcitveMQ Connection Worker: tcp://localhost/127.0.0.1:61616] ERROR JMS Connection Service - exception occurred in JMS connection; restarting
javax.jms.JMSException: Channel was inactive for too long.
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
at org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1638)
at org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1655)
at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
at org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:116)
at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
at org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:143)
at org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:155)
at org.apache.activemq.transport.InactivityMonitor.readCheck(InactivityMonitor.java:100)
at org.apache.activemq.transport.InactivityMonitor$1.run(InactivityMonitor.java:50)
at org.apache.activemq.thread.Scheduler$SchedulerTimerTask.run(Scheduler.java:36)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
Caused by: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long.
... 5 more

 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Kevin W Edwards added a comment - 31/Oct/07 07:45 AM
It appears that the channel is inactive for too long,
Then a check confirms that the Consumer is closed
And then an error is thrown stating that the socket is closed.
The consumer messages reoccur a number of times,
Eventually, (we have a connection manager that monitors and handles regaining a connection to AMQ, our connection manager will successfully regain a connection...

Below is a more complete stack trace:
60219 [AcitveMQ Connection Worker: tcp://localhost/127.0.0.1:61616] ERROR JMS Connection Service - exception occurred in JMS connection; restarting
javax.jms.JMSException: Channel was inactive for too long.
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
at org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1638)
at org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1655)
at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
at org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:116)
at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
at org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:143)
at org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:155)
at org.apache.activemq.transport.InactivityMonitor.readCheck(InactivityMonitor.java:100)
at org.apache.activemq.transport.InactivityMonitor$1.run(InactivityMonitor.java:50)
at org.apache.activemq.thread.Scheduler$SchedulerTimerTask.run(Scheduler.java:36)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
Caused by: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long.
... 5 more
60219 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60219 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60219 [AcitveMQ Connection Worker: tcp://localhost/127.0.0.1:61616] ERROR JMS Connection Service - exception occurred in JMS connection; restarting
javax.jms.JMSException: socket closed
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
at org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1638)
at org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1655)
at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
at org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:116)
at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
at org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:143)
at org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:155)
at org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:95)
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:180)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
at org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
at java.io.DataInputStream.readInt(Unknown Source)
at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:268)
at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:196)
at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:188)
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:176)
... 1 more
60234 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60234 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60234 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60234 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60234 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60234 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60234 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60234 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60234 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60234 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60234 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60234 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60234 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60250 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60250 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60250 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60250 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60250 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)
60250 [JmsConnectionManager] INFO JMS Connection Service - JMS connection to broker created successfully
60250 [testAgentID:JMS Receiver Thread] ERROR Test Agent - error receiving JMS message
javax.jms.IllegalStateException: The Consumer is closed
at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:672)
at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:502)
at net.fractech.ops.daq.agent.AbstractAgent.run(AbstractAgent.java:108)
at java.lang.Thread.run(Unknown Source)


Sébastien Bucci added a comment - 31/Jan/08 02:12 AM
I don't know if i can close this issue.
But in the current SNAPSHOT 5.1, it's resolved.

Denis Abramov added a comment - 21/Feb/08 10:17 PM
Not true, I just checked SNAPSHOT 5.1 and issue is still there

George Daswani added a comment - 02/Apr/08 09:47 AM
This issue is definitely still there. Just tried the latest 5.1 snapshot available - apache-activemq-5.1-20080401.230627-74.tar.gz and the following error still on a client after a while

Channel was inactive for too long: machine/192.168.1.10:61616
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
at org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1670)
at org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1687)
at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:99)
at org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:114)


Rob Davies added a comment - 14/Apr/08 09:11 AM
I can't reproduce this on the latest 5.1 snapshot - please provide a junit test case.
There's been a lot of work in this area recently - so I'm keen to verify that it is fixed or still an issue

Kevin Yaussy added a comment - 17/Apr/08 12:20 PM
Please see AMQ-1671, as it may be related?

Rob Davies added a comment - 16/May/08 12:13 PM
I can't reproduce this - is it now fixed?

Justin Pitts added a comment - 16/May/08 12:21 PM
I have reproduced it on 5.1, using the PooledConnectionFactory in conjuntion with Spring's SimpleMessageListenerContainer. If I dont use the PooledConnectionFactory, I don't see the inactivity issue.

Klaus Kurz added a comment - 10/Jun/08 12:30 AM
Info:
  • I am sending continous ~300 msg/sec over the ActiveMQ for log shipping.
  • with the 5.0.0 version I got...
    {{
    WARN ActiveMQConnection - Async exception with no exception listener: org.apache.activemq.transport.InactivityIOException:
    Channel was inactive for too long: /x.x.x.x:61616
    org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long: /x.x.x.x:61616
    at org.apache.activemq.transport.InactivityMonitor$4.run(InactivityMonitor.java:108)
    WARN ActiveMQConnection - Async exception with no exception listener: java.net.SocketException: Socket closed
    java.net.SocketException: Socket closed
    ...
    }}
    after some minutes runtime.
  • with version 5.1.0 it is running now for 14 hours without this error.

Kevin W Edwards added a comment - 10/Jun/08 05:59 AM
I believe this was a config/setup error

Jeremy Haile added a comment - 17/Jul/08 06:35 AM
Kevin, can you please share what the config/setup error was? We are experiencing this problem on 5.1.0 using the PooledConnectionFactory:

[09:36:37,011,LoggingSimpleMappingExceptionResolver] An Unexpected Error has occured
org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: Channel was inactive for too long: localhost/127.0.0.1:61616; nested exception is org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long: localhost/127.0.0.1:61616
at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:289)
at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:172)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:450)
at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:514)
at org.springframework.jms.core.JmsTemplate.convertAndSend(JmsTemplate.java:624)
at org.springframework.jms.core.JmsTemplate.convertAndSend(JmsTemplate.java:612)
at wildfire.event.JmsEventPublisher.publish(JmsEventPublisher.java:99)