activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: When will activemq-core 5.9 be present in maven central repo?
Date Thu, 05 Dec 2013 21:07:30 GMT
well if you're pooling your connections here, it's possible the broker
gets shut down first before all the client connections are properly
shut down? then you would see that error...

On Thu, Dec 5, 2013 at 1:39 PM, edbras <zooi@debrasjes.com> wrote:
> It's hard to create an isolated test app, found it hard where to start (a
> client app that is bit large).
> But I did some more digging and found the following:
>
> In the unit tests I create a global Spring ApplicationContext and call the
> method ctx.registerShutdownHook() on the context such that all beans are
> informed when the jvm is shutdown (Spring uses a separate Thread to monitor
> the JVM shutdown.
>
> I removed the error when I don't call "ctx.registerShutdownHook()" and added
> "useShutdownHook="false"" to the broker spring config (see:  LINKE
> <http://stackoverflow.com/questions/9591203/unable-to-shutdown-embedded-activemq-service-using-the-built-in-brokerservice-st>
> ).
>
> Notes:
> 1) Other combinations of these settings result in the exception.
> 2) I am not sure this is correct as currently my beans aren't informed of
> the jvm shutdown such that they can't do any clean up.
> 3) If I enable the shutdown hook on the Spring context it will kind of end
> up in the same exception but through a different path. Spring will call the
> destory method on the XBeanBrokerService bean, the broker will perform a
> async stop and try shutdown all TransportConnection instances, see
> screenshots. <http://activemq.2283324.n4.nabble.com/file/n4675222/1.png>
> <http://activemq.2283324.n4.nabble.com/file/n4675222/2.png>
>
> 4) If I enable the shutdown hook on the broker, I end like shown in the
> screenshots. Also an async stop is performed but called through the brokers
> own hook (a hook in the XBeanBrokerService).
> <http://activemq.2283324.n4.nabble.com/file/n4675222/1.png>
> <http://activemq.2283324.n4.nabble.com/file/n4675222/2.png>
>
>
> I can't really discover something strange as a exception is thrown to inform
> others (as far as I understand it).
> I hope this helps to solve it.
> More info, let me know?
>
>
> --------------------------------------------- ERROR with Broker shutdown
> hook.
> 21:39:19.701 [ActiveMQ ShutdownHook] activemq.broker=localhost INFO
> o.a.a.broker.TransportConnector - Connector vm://localhost stopped
> 21:39:19.703 [xecutor: vm://localhost#0] activemq.broker=localhost WARN
> o.s.j.c.CachingConnectionFactory - Encountered a JMSException - resetting
> the underlying JMS Connection
> javax.jms.JMSException: peer (vm://localhost#1) stopped.
>         at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:54)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1983)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:2002)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:101)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:126)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:101)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at org.apache.activemq.transport.vm.VMTransport.stop(VMTransport.java:205)
> ~[activemq-broker-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.ResponseCorrelator.stop(ResponseCorrelator.java:132)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.broker.TransportConnection.doStop(TransportConnection.java:1071)
> ~[activemq-broker-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.broker.TransportConnection$4.run(TransportConnection.java:1037)
> ~[activemq-broker-5.9.0.jar:5.9.0]
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> ~[na:1.7.0_25]
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> ~[na:1.7.0_25]
>         at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
> Caused by: org.apache.activemq.transport.TransportDisposedIOException: peer
> (vm://localhost#1) stopped.
>
>
> --------------------------------------------- ERROR with Spring context
> shutdown hook.
> 21:25:50.817 [Thread-7]  INFO  o.a.x.s.c.ResourceXmlApplicationContext -
> Closing
> org.apache.xbean.spring.context.ResourceXmlApplicationContext@1b5298a5:
> startup date [Thu Dec 05 21:25:23 CET 2013]; parent:
> org.springframework.context.support.ClassPathXmlApplicationContext@26a0cac2
> 21:25:50.818 [Thread-7]  INFO  o.s.b.f.s.DefaultListableBeanFactory -
> Destroying singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@4adf10c3:
> defining beans [com.ited.spring.EncryptablePropertyResolver#0,jmsBroker];
> parent:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@48d9d366
> 21:25:50.820 [Thread-7] activemq.broker=localhost INFO
> o.a.activemq.broker.BrokerService - Apache ActiveMQ 5.9.0 (localhost,
> ID:XXX-59838-1386275125608-0:1) is shutting down
> 21:26:58.820 [Thread-7] activemq.broker=localhost INFO
> o.a.a.broker.TransportConnection - The connection to 'vm://localhost#0' is
> taking a long time to shutdown.
> 21:27:03.820 [Thread-7] activemq.broker=localhost INFO
> o.a.a.broker.TransportConnection - The connection to 'vm://localhost#0' is
> taking a long time to shutdown.
> 21:27:07.342 [xecutor: vm://localhost#0] activemq.broker=localhost WARN
> o.s.j.c.CachingConnectionFactory - Encountered a JMSException - resetting
> the underlying JMS Connection
> javax.jms.JMSException: peer (vm://localhost#1) stopped.
>         at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:54)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1983)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:2002)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:101)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:126)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:101)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at org.apache.activemq.transport.vm.VMTransport.stop(VMTransport.java:205)
> ~[activemq-broker-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.ResponseCorrelator.stop(ResponseCorrelator.java:132)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.broker.TransportConnection.doStop(TransportConnection.java:1071)
> ~[activemq-broker-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.broker.TransportConnection$4.run(TransportConnection.java:1037)
> ~[activemq-broker-5.9.0.jar:5.9.0]
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> ~[na:1.7.0_25]
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> ~[na:1.7.0_25]
>         at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
> Caused by: org.apache.activemq.transport.TransportDisposedIOException: peer
> (vm://localhost#1) stopped.
>         ... 9 common frames omitted
> 21:27:07.350 [Thread-7] activemq.broker=localhost INFO
> o.a.a.broker.TransportConnector - Connector vm://localhost stopped
> 21:27:07.361 [Thread-7]  INFO  o.a.a.s.kahadb.plist.PListStoreImpl -
> PListStore:[D:\data\bv\dev\activemq\data\localhost\tmp_storage] stopped
> 21:27:07.361 [Thread-7]  INFO  o.a.a.store.kahadb.KahaDBStore - Stopping
> async queue tasks
> 21:27:07.361 [Thread-7]  INFO  o.a.a.store.kahadb.KahaDBStore - Stopping
> async topic tasks
> 21:27:07.361 [Thread-7]  INFO  o.a.a.store.kahadb.KahaDBStore - Stopped
> KahaDB
> 21:27:07.669 [Thread-7]  INFO  o.a.activemq.broker.BrokerService - Apache
> ActiveMQ 5.9.0 (localhost, ID:XXX-59838-1386275125608-0:1) uptime 1 minute
> 21:27:07.669 [Thread-7]  INFO  o.a.activemq.broker.BrokerService - Apache
> ActiveMQ 5.9.0 (localhost, ID:XXX-59838-1386275125608-0:1) is shutdown
> 21:27:07.671 [Thread-7]  INFO  o.s.s.c.ThreadPoolTaskScheduler - Shutting
> down ExecutorService 'taskScheduler'
> 21:27:14.726 [xecutor: vm://localhost#0] activemq.broker=localhost ERROR
> c.bv.core.misc.JmsExceptionListener - Error received in JMS exception
> listener, origin: onExp
> javax.jms.JMSException: peer (vm://localhost#1) stopped.
>         at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:54)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1983)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:2002)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:101)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:126)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:101)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at org.apache.activemq.transport.vm.VMTransport.stop(VMTransport.java:205)
> ~[activemq-broker-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.transport.ResponseCorrelator.stop(ResponseCorrelator.java:132)
> ~[activemq-client-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.broker.TransportConnection.doStop(TransportConnection.java:1071)
> ~[activemq-broker-5.9.0.jar:5.9.0]
>         at
> org.apache.activemq.broker.TransportConnection$4.run(TransportConnection.java:1037)
> ~[activemq-broker-5.9.0.jar:5.9.0]
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> ~[na:1.7.0_25]
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> ~[na:1.7.0_25]
>         at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
> Caused by: org.apache.activemq.transport.TransportDisposedIOException: peer
> (vm://localhost#1) stopped.
>         ... 9 common frames omitted
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/When-will-activemq-core-5-9-be-present-in-maven-central-repo-tp4675087p4675222.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta

Mime
View raw message