activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drvillo <f.viv...@gmail.com>
Subject Re: [Spam: 5.0] Cannot shutdown cleanly [still]
Date Tue, 27 Feb 2007 09:54:13 GMT

Hi James

I'm fine with the traces, but the problem is that they
don't stop...there's something AMQ is still busy doing,
and I can't figure out how to stop it. the 
Active Sessions = X
actually decreases with time, but when that reaches 1 it
stays like that forever (forever is ~minutes )

I'm using -Dactivemq.broker.disable-clean-shutdown=true
but it seems not to make any difference if I remove it...


Do you have an idea of which threads are actually still busy?

BTW: trunk now has got rid of the messages, I guess you already
patched the log level for these messages.

Thanks a lot
Francesco


James.Strachan wrote:
> 
> On 1/30/07, drvillo <f.vivoli@gmail.com> wrote:
>> Hi
>>
>> after more than a month I haven't been able to solve this...
>> I'm currently destroying jencks' JCAConnectors and JCAContainer,
>> which also stop ActiveMQResourceAdapter as a side effect.
>> Then I stop the broker via stop(), followed by the
>> applicationcontext.stop().
>>
>> Nevertheless I always get the trace below.
> 
> The trace below is just an information warning that a stream closed.
> You could always patch the code to log EOFException messages at DEBUG
> level?
> 
> James
> 
> 
>> IMHO the problem is that the
>> ActiveMQConnection tries to send
>>
>> asyncSendPacket(new ShutdownInfo());
>>
>> but the broker has already shut down the Transport...
>> Is there anyone out there that manages to stop a context cleanly after
>> having exchanged some messages?If I start and stop the broker without
>> any message being sent it just stops fine...
>>
>> FIY I'm using the tcp transport.
>> I hope to get some feedback on this, it's quite hard to present a service
>> that exit with 100s lines of exceptions...
>>
>> Thanks a lot!
>> Francesco
>>
>> [.0.1:61617] WARN  org.apache.activemq.ra.ActiveMQManagedConnection -
>> Connection failed: javax.jms.JMSException: java.io.EOFException
>> [.0.1:61617] WARN
>> org.apache.geronimo.connector.outbound.GeronimoConnectionEventListener -
>> connectionErrorOccurred called with null
>> javax.jms.JMSException: java.io.EOFException
>>         at
>> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
>>         at
>> org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1527)
>>         at
>> org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1543)
>>         at
>> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:96)
>>         at
>> org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:114)
>>         at
>> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:96)
>>         at
>> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:96)
>>         at
>> org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:147)
>>         at
>> org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:150)
>>         at
>> org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:97)
>>         at
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:150)
>>         at java.lang.Thread.run(Thread.java:613)
>> Caused by: java.io.EOFException
>>         at java.io.DataInputStream.readInt(DataInputStream.java:358)
>>         at
>> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:267)
>>         at
>> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:156)
>>         at
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
>>         ... 1 more
>> [.0.1:61617] INFO  org.apache.activemq.ra.ActiveMQManagedConnection -
>> Error
>> occured during close of a JMS connection.
>> javax.jms.JMSException: The transport is not running.
>>         at
>> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:58)
>>         at
>> org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1167)
>>         at
>> org.apache.activemq.ActiveMQConnection.close(ActiveMQConnection.java:580)
>>         at
>> org.apache.activemq.ra.ActiveMQManagedConnection.destroy(ActiveMQManagedConnection.java:225)
>>         at
>> org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.returnConnection(MCFConnectionInterceptor.java:57)
>>         at
>> org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterceptor.returnConnection(LocalXAResourceInsertionInterceptor.java:50)
>>         at
>> org.apache.geronimo.connector.outbound.SinglePoolMatchAllConnectionInterceptor.internalReturn(SinglePoolMatchAllConnectionInterceptor.java:138)
>>         at
>> org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.returnConnection(AbstractSinglePoolConnectionInterceptor.java:119)
>>         at
>> org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.returnConnection(TransactionEnlistingInterceptor.java:94)
>>         at
>> org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.returnConnection(TransactionCachingInterceptor.java:93)
>>         at
>> org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.returnConnection(ConnectionHandleInterceptor.java:71)
>>         at
>> org.apache.geronimo.connector.outbound.TCCLInterceptor.returnConnection(TCCLInterceptor.java:50)
>>         at
>> org.apache.geronimo.connector.outbound.GeronimoConnectionEventListener.connectionErrorOccurred(GeronimoConnectionEventListener.java:81)
>>         at
>> org.apache.activemq.ra.ActiveMQManagedConnection.fireErrorOccurredEvent(ActiveMQManagedConnection.java:192)
>>         at
>> org.apache.activemq.ra.ActiveMQManagedConnection.onException(ActiveMQManagedConnection.java:416)
>>         at
>> org.apache.activemq.ActiveMQConnection$4.run(ActiveMQConnection.java:1532)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>>         at java.lang.Thread.run(Thread.java:613)
>> Caused by: java.io.IOException: The transport is not running.
>>         at
>> org.apache.activemq.transport.TransportSupport.checkStarted(TransportSupport.java:103)
>>         at
>> org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:117)
>>         at
>> org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141)
>>         at
>> org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:80)
>>         at
>> org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:93)
>>         at
>> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:43)
>>         at
>> org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
>>         at
>> org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1165)
>>         ... 17 more
>> [.0.1:61617] WARN  org.apache.activemq.ra.ActiveMQManagedConnection -
>> Connection failed: javax.jms.JMSException: java.io.EOFException
>>
>>
>>
>>
>>
>> drvillo wrote:
>> >
>> > Hi all
>> >
>> > using AMQ head, with jencks 1.3, and running and embedded broker:
>> >
>> > I can't find a way of shutting the service down, meaning the broker and
>> > the spring context
>> > without exceptions.
>> >
>> > Since I've read that I'm supposed to stop all the clients before
>> shutting
>> > down the broker
>> > actually I'm doing this:
>> >
>> >
>> >
>> >     public void onTearDown() throws Exception {
>> >
>> >         JCAConnector con = (JCAConnector)
>> > testSupport.getBean("inboundConnectorStage1");
>> >
>> >         con.destroy();
>> >         con = (JCAConnector)
>> > testSupport.getBean("mockInboundConnectorStage2");
>> >         con.destroy();
>> >         JCAContainer cont = (JCAContainer)
>> > testSupport.getBean("jencksJCAContainer");
>> >         cont.destroy();
>> >
>> >         XBeanBrokerService broker = (XBeanBrokerService)
>> > testSupport.getBean("broker");
>> >         broker.stop();
>> >     }
>> >
>> > followed by an
>> > applicationContext.close();
>> >
>> > The two JCAConnectors above are the only ones started.
>> >
>> > Nevertheless the logs show that a ServerSession is requested after
>> > destroying them:
>> >
>> > DEBUG org.apache.activemq.broker.region.AbstractRegion - Removing
>> > consumer: ID:obimac.local-49248-1166791529603-3:1:-1:2
>> > DEBUG org.apache.activemq.broker.region.AbstractRegion - Removing
>> > consumer: ID:obimac.local-49248-1166791529603-3:1:-1:1
>> > DEBUG org.apache.activemq.broker.TransportConnection - Stopping
>> > connection: /127.0.0.1:49250
>> > DEBUG org.apache.activemq.broker.TransportConnection - Stopped
>> connection:
>> > /127.0.0.1:49250
>> > DEBUG org.apache.activemq.broker.region.AbstractRegion - Removing
>> > consumer: ID:obimac.local-49248-1166791529603-3:0:-1:2
>> > DEBUG org.apache.activemq.broker.region.AbstractRegion - Removing
>> > consumer: ID:obimac.local-49248-1166791529603-3:0:-1:1
>> > DEBUG org.apache.activemq.broker.TransportConnection - Stopping
>> > connection: /127.0.0.1:49251
>> > DEBUG org.apache.activemq.broker.TransportConnection - Stopped
>> connection:
>> > /127.0.0.1:49251
>> > DEBUG org.apache.activemq.ra.ServerSessionPoolImpl - ServerSession
>> > requested.
>> > DEBUG org.apache.activemq.ra.ServerSessionPoolImpl - ServerSession
>> > requested.
>> > INFO  org.apache.activemq.broker.BrokerService - ActiveMQ Message
>> Broker
>> > (brokerConfigTest, ID:obimac.local-49248-1166791529603-0:0) is shutting
>> > down
>> > DEBUG org.apache.activemq.broker.TransportConnection - Stopping
>> > connection: /127.0.0.1:49252
>> > DEBUG org.apache.activemq.broker.TransportConnection - Stopped
>> connection:
>> > /127.0.0.1:49252
>> > INFO  org.apache.activemq.broker.TransportConnector - Connector tcp
>> > Stopped
>> > WARN  org.apache.activemq.ra.ActiveMQManagedConnection - Connection
>> > failed: javax.jms.JMSException: java.io.EOFException
>> > DEBUG org.apache.activemq.ra.ActiveMQManagedConnection - Cause:
>> > javax.jms.JMSException: java.io.EOFException
>> >       at
>> >
>> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
>> >       at
>> >
>> org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1527)
>> >       at
>> >
>> org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1543)
>> >       at
>> >
>> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:96)
>> >       at
>> >
>> org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:114)
>> >       at
>> >
>> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:96)
>> >       at
>> >
>> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:96)
>> >       at
>> >
>> org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:147)
>> >       at
>> >
>> org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:150)
>> >       at
>> >
>> org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:97)
>> >       at
>> >
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:150)
>> >       at java.lang.Thread.run(Thread.java:613)
>> > Caused by: java.io.EOFException
>> >       at java.io.DataInputStream.readInt(DataInputStream.java:358)
>> >       at
>> >
>> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:267)
>> >       at
>> >
>> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:156)
>> >       at
>> >
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
>> >       ... 1 more
>> > INFO  org.apache.activemq.broker.BrokerService - ActiveMQ JMS Message
>> > Broker (brokerConfigTest, ID:obimac.local-49248-1166791529603-0:0)
>> stopped
>> > WARN
>> > org.apache.geronimo.connector.outbound.GeronimoConnectionEventListener
>> -
>> > connectionErrorOccurred called with null
>> > javax.jms.JMSException: java.io.EOFException
>> >       at
>> >
>> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
>> >       at
>> >
>> org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1527)
>> >       at
>> >
>> org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1543)
>> >       at
>> >
>> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:96)
>> >       at
>> >
>> org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:114)
>> >       at
>> >
>> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:96)
>> >       at
>> >
>> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:96)
>> >       at
>> >
>> org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:147)
>> >       at
>> >
>> org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:150)
>> >       at
>> >
>> org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:97)
>> >       at
>> >
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:150)
>> >       at java.lang.Thread.run(Thread.java:613)
>> > Caused by: java.io.EOFException
>> >       at java.io.DataInputStream.readInt(DataInputStream.java:358)
>> >       at
>> >
>> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:267)
>> >       at
>> >
>> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:156)
>> >       at
>> >
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
>> >       ... 1 more
>> > INFO 
>> org.springframework.context.support.ClassPathXmlApplicationContext -
>> > Closing application context
>> >
>> [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=4167406]
>> > DEBUG
>> > org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor
>> -
>> > returning connectionnull
>> > INFO 
>> org.springframework.beans.factory.support.DefaultListableBeanFactory
>> > - Destroying singletons in
>> > {org.springframework.beans.factory.support.DefaultListableBeanFactory
>> > defining beans
>> >
>> [transactionContextManager,geronimo,transactionManager,connectionManager,jmsResourceAdapter,jmsManagedConnectionFactory,jmsConnectionFactory,jencksJCAContainer,broker,stage1Queue,stage2Queue,stage3Queue,dataSource,hcDao,wdDao,wdServiceTarget,wdService,dbHelper,controller,sendSeed,hstcntBundle,hostcountProperties,resolver,service,inboundConnectorStage1,stage1,sendStage1,stage2,mockInboundConnectorStage2];
>> > root of BeanFactory hierarchy}
>> > INFO  org.apache.activemq.ra.ActiveMQManagedConnection - Error occured
>> > during close of a JMS connection.
>> > javax.jms.JMSException: The transport is not running.
>> >       at
>> >
>> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:58)
>> >       at
>> >
>> org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1167)
>> >       at
>> >
>> org.apache.activemq.ActiveMQConnection.close(ActiveMQConnection.java:580)
>> >       at
>> >
>> org.apache.activemq.ra.ActiveMQManagedConnection.destroy(ActiveMQManagedConnection.java:225)
>> >       at
>> >
>> org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.returnConnection(MCFConnectionInterceptor.java:57)
>> >       at
>> >
>> org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterceptor.returnConnection(LocalXAResourceInsertionInterceptor.java:50)
>> >       at
>> >
>> org.apache.geronimo.connector.outbound.SinglePoolMatchAllConnectionInterceptor.internalReturn(SinglePoolMatchAllConnectionInterceptor.java:138)
>> >       at
>> >
>> org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.returnConnection(AbstractSinglePoolConnectionInterceptor.java:119)
>> >       at
>> >
>> org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.returnConnection(TransactionEnlistingInterceptor.java:94)
>> >       at
>> >
>> org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.returnConnection(TransactionCachingInterceptor.java:93)
>> >       at
>> >
>> org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.returnConnection(ConnectionHandleInterceptor.java:71)
>> >       at
>> >
>> org.apache.geronimo.connector.outbound.TCCLInterceptor.returnConnection(TCCLInterceptor.java:50)
>> >       at
>> >
>> org.apache.geronimo.connector.outbound.GeronimoConnectionEventListener.connectionErrorOccurred(GeronimoConnectionEventListener.java:81)
>> >       at
>> >
>> org.apache.activemq.ra.ActiveMQManagedConnection.fireErrorOccurredEvent(ActiveMQManagedConnection.java:192)
>> >       at
>> >
>> org.apache.activemq.ra.ActiveMQManagedConnection.onException(ActiveMQManagedConnection.java:416)
>> >       at
>> >
>> org.apache.activemq.ActiveMQConnection$4.run(ActiveMQConnection.java:1532)
>> >       at
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>> >       at
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>> >       at java.lang.Thread.run(Thread.java:613)
>> > Caused by: java.io.IOException: The transport is not running.
>> >       at
>> >
>> org.apache.activemq.transport.TransportSupport.checkStarted(TransportSupport.java:103)
>> >       at
>> >
>> org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:117)
>> >       at
>> >
>> org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141)
>> >       at
>> >
>> org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:80)
>> >       at
>> >
>> org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:93)
>> >       at
>> >
>> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:43)
>> >       at
>> >
>> org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
>> >       at
>> >
>> org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1165)
>> >       ... 17 more
>> > INFO  org.apache.xbean.spring.context.ResourceXmlApplicationContext -
>> > Closing application context
>> >
>> [org.apache.xbean.spring.context.ResourceXmlApplicationContext;hashCode=12706611]
>> > DEBUG org.apache.xbean.spring.context.ResourceXmlApplicationContext -
>> > Publishing event in context
>> >
>> [org.apache.xbean.spring.context.ResourceXmlApplicationContext;hashCode=12706611]:
>> >
>> org.springframework.context.event.ContextClosedEvent[source=org.apache.xbean.spring.context.ResourceXmlApplicationContext:
>> > display name
>> >
>> [org.apache.xbean.spring.context.ResourceXmlApplicationContext;hashCode=12706611];
>> > startup date [Fri Dec 22 13:45:28 CET 2006]; child of
>> > [org.springframework.context.support.ClassPathXmlApplicationContext:
>> > display name
>> >
>> [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=4167406];
>> > startup date [Fri Dec 22 13:45:27 CET 2006]; root of context
>> hierarchy]]
>> > INFO 
>> org.springframework.beans.factory.support.DefaultListableBeanFactory
>> > - Destroying singletons in
>> > {org.springframework.beans.factory.support.DefaultListableBeanFactory
>> > defining beans [org.apache.activemq.xbean.XBeanBrokerService]; parent:
>> > org.springframework.beans.factory.support.DefaultListableBeanFactory
>> > defining beans
>> >
>> [transactionContextManager,geronimo,transactionManager,connectionManager,jmsResourceAdapter,jmsManagedConnectionFactory,jmsConnectionFactory,jencksJCAContainer,broker,stage1Queue,stage2Queue,stage3Queue,dataSource,hcDao,wdDao,wdServiceTarget,wdService,dbHelper,controller,sendSeed,hstcntBundle,hostcountProperties,resolver,service,inboundConnectorStage1,stage1,sendStage1,stage2,mockInboundConnectorStage2];
>> > root of BeanFactory hierarchy}
>> >
>> >
>> >
>> >
>> > Is there any way of having a clean shutdown?
>> > With the vm transport a useShutdownHook=true would do the job, but with
>> > tcp I can't get any further...
>> >
>> > Thanks for any suggestion,
>> > Francesco
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Cannot-shutdown-cleanly-tf2870519.html#a8713472
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Cannot-shutdown-cleanly-tf2870519s2354.html#a9178620
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message