You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by carlo cancellieri <ge...@gmail.com> on 2014/03/14 19:55:28 UTC
5.8.0 Unable to shutdown embedded broker
Hi all,
I'm having some problem during the Tomcat shutdown.
I'm using ActiveMQ-5.8 and my brokerURL are:
brokerURL=peer\://geoserver/tomcat1?soTimeout\=3000&transport.soTimeout\=3000&daemon\=true&transport.daemon\=true&broker.persist\=false&useShutdownHook\=false&maxReconnectDelay\=200
brokerURL=peer\://geoserver/tomcat2?soTimeout\=3000&transport.soTimeout\=3000&daemon\=true&transport.daemon\=true&broker.persist\=false&useShutdownHook\=false&maxReconnectDelay\=200
Note that the the destination for the producers is a VirtualTopic.
I can successfully consume the messages but on shutdown tomcats hangs.
What's wrong?
This is the stack of a Tomcat instance.
Java HotSpot(TM) Client VM[168.202.25.104:1044]
Thread [DestroyJavaVM] (Running)
Thread [pool-3-thread-1] (Running)
Daemon Thread [http-8080-5] (Running)
Daemon Thread [http-8080-4] (Running)
Daemon Thread [http-8080-3] (Running)
Daemon Thread [http-8080-2] (Running)
Daemon Thread [http-8080-1] (Running)
Daemon Thread [TP-Processor4] (Running)
Daemon Thread [http-8080-Acceptor-0] (Running)
Daemon Thread [ActiveMQ Transport: tcp:///168.202.25.104:64338@64324]
(Running)
Thread [ActiveMQ Transport: tcp://CIO174/168.202.25.104:64331@64337]
(Running)
Daemon Thread
[Notifier-MulticastDiscoveryAgent-listener:DiscoveryNetworkConnector:NC:BrokerService[tomcat1]]
(Running)
Daemon Thread
[MulticastDiscoveryAgent-listener:DiscoveryNetworkConnector:NC:BrokerService[tomcat1]:Thread-6]
(Running)
Daemon Thread
[MulticastDiscoveryAgent-advertise:tcp://CIO174:64324:Thread-5] (Running)
Daemon Thread [ActiveMQ Transport Server: tcp://0.0.0.0:0] (Running)
Daemon Thread [ActiveMQ Transport Server Thread Handler: tcp://0.0.0.0:0]
(Running)
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==
Dott. Carlo Cancellieri
@cancellieric
Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
mobile: +39 3371094494
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
Re: 5.8.0 Unable to shutdown embedded broker
Posted by carlo cancellieri <ca...@geo-solutions.it>.
Errata corridge:
Sorry, substitute 'Transaction' with 'Transport' in the previous mail.
Il 16/mar/2014 21:20 "carlo cancellieri" <ca...@geo-solutions.it>
ha scritto:
> Art,
> thanks for your prompt response. Finally I have found a workaround but I
> had to implement a wrapper of the ActiveMQConnectionFactory to handle
> Transport by my self.
> Looking at the
> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(String,
> String)
> in the 5.10-SNAPSHOT and previous versions that method instantiates a
> Transaction and pass it to the connection (I'm on the 5.9.0).
> The connection (probably this is intentional) will not take care of the
> Transaction close() since it is passed externally (and this make sense).
> Anyhow creating a connection in this way the transaction will never be
> closed.
> Now Using my implementation Tomcat can complete the shutdown.
>
> One question is this intentional or this is an issue? In this case how do
> I need to proceed to contribute? (I can easily provide a pull req if needed)
>
> Here is the implementation:
> ------------------------------------
> package it.geosolutions.geoserver.jms.impl;
>
> import javax.jms.JMSException;
>
> import org.apache.activemq.ActiveMQConnection;
> import org.apache.activemq.ActiveMQConnectionFactory;
> import org.apache.activemq.management.JMSStatsImpl;
> import org.apache.activemq.transport.Transport;
> import org.apache.activemq.util.IdGenerator;
>
> /**
> * This class was implemented as workaround to a possible ActiveMQ issue
> with
> * the Trasport handling. Here we create a simple wrapper which will take
> care
> * of transaction close using the connection.
> *
> * @author carlo cancellieri
> *
> */
> public class TransactionHandlerConnectionFactory extends
> ActiveMQConnectionFactory {
>
> public TransactionHandlerConnectionFactory(String brokerURL) {
> super(brokerURL);
> }
>
> protected ActiveMQConnection createActiveMQConnection(Transport transport,
> JMSStatsImpl stats) throws Exception {
> return new TransactionHandlingConnection(transport,
> getClientIdGenerator(), getConnectionIdGenerator(), stats);
> }
>
> /**
> * This implementation will take care of the transport stop
> *
> * @author carlo cancellieri
> *
> */
> class TransactionHandlingConnection extends ActiveMQConnection {
> protected TransactionHandlingConnection(Transport transport,
> IdGenerator clientIdGenerator,
> IdGenerator connectionIdGenerator, JMSStatsImpl factoryStats)
> throws Exception {
> super(transport, clientIdGenerator, connectionIdGenerator,
> factoryStats);
> }
>
> @Override
> public void close() throws JMSException {
> try {
> this.getTransport().stop();
> } catch (Exception e) {
> final JMSException ex = new JMSException(
> e.getLocalizedMessage());
> ex.initCause(e.getCause());
> throw ex;
> }
> super.close();
> }
>
> }
> }
> ------------------------------------
> Cheers,
> Carlo
>
> --
> ==
> Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK for
> more information.
> ==
>
> Dott. Carlo Cancellieri
> @cancellieric
> Software Engineer
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054 Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 1660272
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
Re: 5.8.0 Unable to shutdown embedded broker
Posted by carlo cancellieri <ca...@geo-solutions.it>.
Art,
Looking at ActiveMQConnection, In the close method, I see
>
> ServiceSupport.dispose(this.transport);
>
Yes, now I can see it into the finally block, so the connection handle the
passed transaction close() call.
> This in turn calls
>
> service.stop();
>
> Which ultimately closes the transport.
>
I've also deeply checked my solutions without success, It seems to be a
random error. :(
One more question:
During the tomcat shutdown phase I'm getting many of the following errors:
-----------------------------------------------------------------
INFO: Stopping Coyote HTTP/1.1 on http-8081
Exception in thread "ActiveMQ InactivityMonitor ReadCheckTimer"
java.lang.NullPointerException
at
org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:187)
at
org.apache.activemq.transport.AbstractInactivityMonitor$1.run(AbstractInactivityMonitor.java:84)
at
org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Exception in thread "ActiveMQ InactivityMonitor WriteCheckTimer"
java.lang.NullPointerException
at
org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:205)
at
org.apache.activemq.transport.AbstractInactivityMonitor$2.run(AbstractInactivityMonitor.java:119)
at
org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Exception in thread "ActiveMQ Broker[tomcat1] Scheduler"
java.lang.NullPointerException
at
org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:187)
at
org.apache.activemq.broker.region.Queue.expireMessages(Queue.java:901)
at org.apache.activemq.broker.region.Queue.access$100(Queue.java:79)
--------------------------------------------------------------------------------------------
Could this be a cause? I've seen that sometime this exception is thrown and
the counter is not decreased (this happens quite often).
Cheers,
Carlo
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/5-8-0-Unable-to-shutdown-embedded-broker-tp4679137p4679144.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
--
==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK for
more information.
==
Dott. Carlo Cancellieri
@cancellieric
Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
Re: 5.8.0 Unable to shutdown embedded broker
Posted by artnaseef <ar...@artnaseef.com>.
Are there transactions part of the problem, or is that just a typo?
Looking at ActiveMQConnection, In the close method, I see
ServiceSupport.dispose(this.transport);
This in turn calls
service.stop();
Which ultimately closes the transport.
--
View this message in context: http://activemq.2283324.n4.nabble.com/5-8-0-Unable-to-shutdown-embedded-broker-tp4679137p4679144.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: 5.8.0 Unable to shutdown embedded broker
Posted by artnaseef <ar...@artnaseef.com>.
Thanks. By the way - stopping the transport should also close it. I will check the code later.
Sent from my iPhone
> On Mar 16, 2014, at 2:16 PM, "carlo cancellieri [via ActiveMQ]" <ml...@n4.nabble.com> wrote:
>
> Art,
> Response is inline.
>
> > Hmm, what you describe sounds disturbing and counter to my experience.
> >
> > Opening a jira entry is the first step to getting any bug addressed.
> > Attaching a self-contained junit that can reproduce the problem certainly
> > helps a lot.
>
> I'll ask to my society if I can allocate some time for this task.
>
> > One question comes to mind - is a connection pool part of the setup? If
> so,
> > remember that calling close on the connection returned by the pool does
> not
> > necessarily close the underlying connection (otherwise, it wouldn't be
> much
> > of a pool). So, in that case, make sure the pool is being shutdown
> > properly; it should then make sure the connection is shutdown.
>
> Yes, I'm using a connection pool instantiated directly into the code (no
> jndi) and I'm calling clear() (which should close all the connections) then
> close() over it. This is done into a spring dispose() call (so this code is
> actually executed at the context dispose).
>
> > Again, though, if you can prove a case that closing the connection leaves
> > the transport open, please create a Jira entry - we'll need to get it
> > solved.
>
> I'll try to give u a junit test if it will be possible anyhow looking at
> the method I pointed u in the last mail it should be easy to understand
> thst the Transport is never closed since (as far as i understood) the pool
> is able ro close the connections but no one is taking care of the Transport.
> Cheers,
> Carlo
> >
> >
> >
> > --
> > View this message in context:
> http://activemq.2283324.n4.nabble.com/5-8-0-Unable-to-shutdown-embedded-broker-tp4679137p4679141.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://activemq.2283324.n4.nabble.com/5-8-0-Unable-to-shutdown-embedded-broker-tp4679137p4679142.html
> To start a new topic under ActiveMQ - User, email ml-node+s2283324n2341805h3@n4.nabble.com
> To unsubscribe from ActiveMQ - User, click here.
> NAML
--
View this message in context: http://activemq.2283324.n4.nabble.com/5-8-0-Unable-to-shutdown-embedded-broker-tp4679137p4679143.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: 5.8.0 Unable to shutdown embedded broker
Posted by carlo cancellieri <ca...@geo-solutions.it>.
Art,
Response is inline.
> Hmm, what you describe sounds disturbing and counter to my experience.
>
> Opening a jira entry is the first step to getting any bug addressed.
> Attaching a self-contained junit that can reproduce the problem certainly
> helps a lot.
I'll ask to my society if I can allocate some time for this task.
> One question comes to mind - is a connection pool part of the setup? If
so,
> remember that calling close on the connection returned by the pool does
not
> necessarily close the underlying connection (otherwise, it wouldn't be
much
> of a pool). So, in that case, make sure the pool is being shutdown
> properly; it should then make sure the connection is shutdown.
Yes, I'm using a connection pool instantiated directly into the code (no
jndi) and I'm calling clear() (which should close all the connections) then
close() over it. This is done into a spring dispose() call (so this code is
actually executed at the context dispose).
> Again, though, if you can prove a case that closing the connection leaves
> the transport open, please create a Jira entry - we'll need to get it
> solved.
I'll try to give u a junit test if it will be possible anyhow looking at
the method I pointed u in the last mail it should be easy to understand
thst the Transport is never closed since (as far as i understood) the pool
is able ro close the connections but no one is taking care of the Transport.
Cheers,
Carlo
>
>
>
> --
> View this message in context:
http://activemq.2283324.n4.nabble.com/5-8-0-Unable-to-shutdown-embedded-broker-tp4679137p4679141.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: 5.8.0 Unable to shutdown embedded broker
Posted by artnaseef <ar...@artnaseef.com>.
Hmm, what you describe sounds disturbing and counter to my experience.
Opening a jira entry is the first step to getting any bug addressed.
Attaching a self-contained junit that can reproduce the problem certainly
helps a lot.
One question comes to mind - is a connection pool part of the setup? If so,
remember that calling close on the connection returned by the pool does not
necessarily close the underlying connection (otherwise, it wouldn't be much
of a pool). So, in that case, make sure the pool is being shutdown
properly; it should then make sure the connection is shutdown.
Again, though, if you can prove a case that closing the connection leaves
the transport open, please create a Jira entry - we'll need to get it
solved.
--
View this message in context: http://activemq.2283324.n4.nabble.com/5-8-0-Unable-to-shutdown-embedded-broker-tp4679137p4679141.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: 5.8.0 Unable to shutdown embedded broker
Posted by carlo cancellieri <ca...@geo-solutions.it>.
Art,
thanks for your prompt response. Finally I have found a workaround but I
had to implement a wrapper of the ActiveMQConnectionFactory to handle
Transport by my self.
Looking at the
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(String,
String)
in the 5.10-SNAPSHOT and previous versions that method instantiates a
Transaction and pass it to the connection (I'm on the 5.9.0).
The connection (probably this is intentional) will not take care of the
Transaction close() since it is passed externally (and this make sense).
Anyhow creating a connection in this way the transaction will never be
closed.
Now Using my implementation Tomcat can complete the shutdown.
One question is this intentional or this is an issue? In this case how do I
need to proceed to contribute? (I can easily provide a pull req if needed)
Here is the implementation:
------------------------------------
package it.geosolutions.geoserver.jms.impl;
import javax.jms.JMSException;
import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.management.JMSStatsImpl;
import org.apache.activemq.transport.Transport;
import org.apache.activemq.util.IdGenerator;
/**
* This class was implemented as workaround to a possible ActiveMQ issue
with
* the Trasport handling. Here we create a simple wrapper which will take
care
* of transaction close using the connection.
*
* @author carlo cancellieri
*
*/
public class TransactionHandlerConnectionFactory extends
ActiveMQConnectionFactory {
public TransactionHandlerConnectionFactory(String brokerURL) {
super(brokerURL);
}
protected ActiveMQConnection createActiveMQConnection(Transport transport,
JMSStatsImpl stats) throws Exception {
return new TransactionHandlingConnection(transport,
getClientIdGenerator(), getConnectionIdGenerator(), stats);
}
/**
* This implementation will take care of the transport stop
*
* @author carlo cancellieri
*
*/
class TransactionHandlingConnection extends ActiveMQConnection {
protected TransactionHandlingConnection(Transport transport,
IdGenerator clientIdGenerator,
IdGenerator connectionIdGenerator, JMSStatsImpl factoryStats)
throws Exception {
super(transport, clientIdGenerator, connectionIdGenerator,
factoryStats);
}
@Override
public void close() throws JMSException {
try {
this.getTransport().stop();
} catch (Exception e) {
final JMSException ex = new JMSException(
e.getLocalizedMessage());
ex.initCause(e.getCause());
throw ex;
}
super.close();
}
}
}
------------------------------------
Cheers,
Carlo
--
==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK for
more information.
==
Dott. Carlo Cancellieri
@cancellieric
Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
Re: 5.8.0 Unable to shutdown embedded broker
Posted by artnaseef <ar...@artnaseef.com>.
Ah, I was reading your message from my mailbox and didn't have the full
history.
Take a look at all the non-daemon threads, they are what keep a JVM from
terminating:
Thread [DestroyJavaVM] (Running)
Thread [pool-3-thread-1] (Running)
Thread [ActiveMQ Transport: tcp://CIO174/168.202.25.104:64331@64337]
The first looks like the shutdown handler, so nothing to do there. The
second is unclear - may be related to the third. And the third is an
ActiveMQ connection that was not shutdown.
Shut it down.
--
View this message in context: http://activemq.2283324.n4.nabble.com/5-8-0-Unable-to-shutdown-embedded-broker-tp4679137p4679138.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: 5.8.0 Unable to shutdown embedded broker
Posted by carlo cancellieri <ca...@geo-solutions.it>.
Hi art,
probably my first message (with thread stack dumped using eclipse remote
debug) is missing, I repeat the post here:
Hi all,
I'm having some problem during the Tomcat shutdown.
I'm using ActiveMQ-5.8 and my brokerURL are:
brokerURL=peer\://geoserver/tomcat1?soTimeout\=3000&transport.soTimeout\=3000&daemon\=true&transport.daemon\=true&broker.persist\=false&useShutdownHook\=false&maxReconnectDelay\=200
brokerURL=peer\://geoserver/tomcat2?soTimeout\=3000&transport.soTimeout\=3000&daemon\=true&transport.daemon\=true&broker.persist\=false&useShutdownHook\=false&maxReconnectDelay\=200
Note that the the destination for the producers is a VirtualTopic.
I can successfully consume the messages but on shutdown tomcats hangs.
What's wrong?
This is the stack of a Tomcat instance.
Java HotSpot(TM) Client VM[168.202.25.104:1044]
Thread [DestroyJavaVM] (Running)
Thread [pool-3-thread-1] (Running)
Daemon Thread [http-8080-5] (Running)
Daemon Thread [http-8080-4] (Running)
Daemon Thread [http-8080-3] (Running)
Daemon Thread [http-8080-2] (Running)
Daemon Thread [http-8080-1] (Running)
Daemon Thread [TP-Processor4] (Running)
Daemon Thread [http-8080-Acceptor-0] (Running)
Daemon Thread [ActiveMQ Transport: tcp:///168.202.25.104:64338@64324]
(Running)
Thread [ActiveMQ Transport: tcp://CIO174/168.202.25.104:64331@64337]
(Running)
Daemon Thread
[Notifier-MulticastDiscoveryAgent-listener:DiscoveryNetworkConnector:NC:BrokerService[tomcat1]]
(Running)
Daemon Thread
[MulticastDiscoveryAgent-listener:DiscoveryNetworkConnector:NC:BrokerService[tomcat1]:Thread-6]
(Running)
Daemon Thread
[MulticastDiscoveryAgent-advertise:tcp://CIO174:64324:Thread-5] (Running)
Daemon Thread [ActiveMQ Transport Server: tcp://0.0.0.0:0] (Running)
Daemon Thread [ActiveMQ Transport Server Thread Handler: tcp://0.0.0.0:0]
(Running)
Cheers,
Carlo
2014-03-16 3:45 GMT+01:00 artnaseef <ar...@artnaseef.com>:
> Try grabbing a thread dump with jstack, or the like, to see what threads
> are still active.
>
> Sent from my iPhone
>
> > On Mar 15, 2014, at 7:35 PM, "carlo cancellieri [via ActiveMQ]" <
> ml-node+s2283324n4679129h47@n4.nabble.com> wrote:
> >
> > More:
> >
> > At tomcat shutdown I get: (note that all the brokers, connections and
> > Transport are automatically created by the PooledConnectionFactory with
> the
> > passed URL so they should be ideally closed with a close() on the
> > PooledConnectionFactory, right?)
> >
> > SEVERE: The web application [/geoserver] created a ThreadLocal with key
> of
> > type [org.apache.log4j.helpers.ThreadLocalMap] (value
> > [org.apache.log4j.helpers.ThreadLocalMap@3fdfbc7f]) and a value of type
> > [java.util.Hashtable] (value [{activemq.broker=tomcat1,
> > activemq.connector=vm://tomcat1}]) but failed to remove it when the web
> > application was stopped. This is very likely to create a memory leak.
> >
> > I've also performed a test with useShutdownHook=true with no success.
> >
> > Same result with ActiveMQ 5.10-SNAPSHOT
> >
> > Cheers,
> > Carlo
> >
> >
> > 2014-03-16 2:48 GMT+01:00 carlo cancellieri <
> > [hidden email]>:
> >
> > > In addiction to below information I'd like to add:
> > >
> > > 1. I'm using PooledConnectionFactory to get connection and at the
> tomcat
> > > shutdown end I call stop() which should stops all the opened
> connecitons.
> > > 2. I've just tested the same code with the 5.9.0 with no success.
> > >
> > > Someone can help me?
> > >
> > > Cheers,
> > > Carlo
> > >
> > >
> > > ---------- Forwarded message ----------
> > > From: carlo cancellieri <[hidden email]>
> > > Date: 2014-03-14 19:55 GMT+01:00
> > > Subject: 5.8.0 Unable to shutdown embedded broker
> > > To: [hidden email]
> > >
> > >
> > > Hi all,
> > > I'm having some problem during the Tomcat shutdown.
> > > I'm using ActiveMQ-5.8 and my brokerURL are:
> > >
> > >
> > >
> brokerURL=peer\://geoserver/tomcat1?soTimeout\=3000&transport.soTimeout\=3000&daemon\=true&transport.daemon\=true&broker.persist\=false&useShutdownHook\=false&maxReconnectDelay\=200
> > >
> > >
> > >
> brokerURL=peer\://geoserver/tomcat2?soTimeout\=3000&transport.soTimeout\=3000&daemon\=true&transport.daemon\=true&broker.persist\=false&useShutdownHook\=false&maxReconnectDelay\=200
> > >
> > > Note that the the destination for the producers is a VirtualTopic.
> > >
> > > I can successfully consume the messages but on shutdown tomcats hangs.
> > >
> > > What's wrong?
> > >
> > > This is the stack of a Tomcat instance.
> > >
> > > Java HotSpot(TM) Client VM[168.202.25.104:1044]
> > > Thread [DestroyJavaVM] (Running)
> > > Thread [pool-3-thread-1] (Running)
> > > Daemon Thread [http-8080-5] (Running)
> > > Daemon Thread [http-8080-4] (Running)
> > > Daemon Thread [http-8080-3] (Running)
> > > Daemon Thread [http-8080-2] (Running)
> > > Daemon Thread [http-8080-1] (Running)
> > > Daemon Thread [TP-Processor4] (Running)
> > > Daemon Thread [http-8080-Acceptor-0] (Running)
> > > Daemon Thread [ActiveMQ Transport: tcp:///168.202.25.104:64338@64324]
> > > (Running)
> > > Thread [ActiveMQ Transport: tcp://CIO174/168.202.25.104:64331@64337]
> > > (Running)
> > > Daemon Thread
> > >
> [Notifier-MulticastDiscoveryAgent-listener:DiscoveryNetworkConnector:NC:BrokerService[tomcat1]]
> > > (Running)
> > > Daemon Thread
> > >
> [MulticastDiscoveryAgent-listener:DiscoveryNetworkConnector:NC:BrokerService[tomcat1]:Thread-6]
> > > (Running)
> > > Daemon Thread
> > > [MulticastDiscoveryAgent-advertise:tcp://CIO174:64324:Thread-5]
> (Running)
> > > Daemon Thread [ActiveMQ Transport Server: tcp://0.0.0.0:0] (Running)
> > > Daemon Thread [ActiveMQ Transport Server Thread Handler: tcp://
> 0.0.0.0:0]
> > > (Running)
> > >
> > >
> > >
> > > --
> > > ==
> > > Our support, Your Success! Visit http://opensdi.geo-solutions.it for
> more
> > > information.
> > > ==
> > >
> > > Dott. Carlo Cancellieri
> > > @cancellieric
> > > Software Engineer
> > >
> > > GeoSolutions S.A.S.
> > > Via Poggio alle Viti 1187
> > > 55054 Massarosa (LU)
> > > Italy
> > > phone: +39 0584 962313
> > > mobile: +39 3371094494
> > > fax: +39 0584 1660272
> > >
> > > http://www.geo-solutions.it
> > > http://twitter.com/geosolutions_it
> > >
> > > -------------------------------------------------------
> > >
> > >
> > >
> > > --
> > > ==
> > > Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aKfor
> > > more information.
> > > ==
> > >
> > > Dott. Carlo Cancellieri
> > > @cancellieric
> > > Software Engineer
> > >
> > > GeoSolutions S.A.S.
> > > Via Poggio alle Viti 1187
> > > 55054 Massarosa (LU)
> > > Italy
> > > phone: +39 0584 962313
> > > fax: +39 0584 1660272
> > >
> > > http://www.geo-solutions.it
> > > http://twitter.com/geosolutions_it
> > >
> > > -------------------------------------------------------
> > >
> >
> >
> >
> > --
> > ==
> > Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK for
> > more information.
> > ==
> >
> > Dott. Carlo Cancellieri
> > @cancellieric
> > Software Engineer
> >
> > GeoSolutions S.A.S.
> > Via Poggio alle Viti 1187
> > 55054 Massarosa (LU)
> > Italy
> > phone: +39 0584 962313
> > fax: +39 0584 1660272
> >
> > http://www.geo-solutions.it
> > http://twitter.com/geosolutions_it
> >
> > -------------------------------------------------------
> >
> >
> > If you reply to this email, your message will be added to the discussion
> below:
> >
> http://activemq.2283324.n4.nabble.com/Fwd-5-8-0-Unable-to-shutdown-embedded-broker-tp4679128p4679129.html
> > To start a new topic under ActiveMQ - User, email
> ml-node+s2283324n2341805h3@n4.nabble.com
> > To unsubscribe from ActiveMQ - User, click here.
> > NAML
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Fwd-5-8-0-Unable-to-shutdown-embedded-broker-tp4679128p4679130.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
--
==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK for
more information.
==
Dott. Carlo Cancellieri
@cancellieric
Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
Re: 5.8.0 Unable to shutdown embedded broker
Posted by artnaseef <ar...@artnaseef.com>.
Try grabbing a thread dump with jstack, or the like, to see what threads are still active.
Sent from my iPhone
> On Mar 15, 2014, at 7:35 PM, "carlo cancellieri [via ActiveMQ]" <ml...@n4.nabble.com> wrote:
>
> More:
>
> At tomcat shutdown I get: (note that all the brokers, connections and
> Transport are automatically created by the PooledConnectionFactory with the
> passed URL so they should be ideally closed with a close() on the
> PooledConnectionFactory, right?)
>
> SEVERE: The web application [/geoserver] created a ThreadLocal with key of
> type [org.apache.log4j.helpers.ThreadLocalMap] (value
> [org.apache.log4j.helpers.ThreadLocalMap@3fdfbc7f]) and a value of type
> [java.util.Hashtable] (value [{activemq.broker=tomcat1,
> activemq.connector=vm://tomcat1}]) but failed to remove it when the web
> application was stopped. This is very likely to create a memory leak.
>
> I've also performed a test with useShutdownHook=true with no success.
>
> Same result with ActiveMQ 5.10-SNAPSHOT
>
> Cheers,
> Carlo
>
>
> 2014-03-16 2:48 GMT+01:00 carlo cancellieri <
> [hidden email]>:
>
> > In addiction to below information I'd like to add:
> >
> > 1. I'm using PooledConnectionFactory to get connection and at the tomcat
> > shutdown end I call stop() which should stops all the opened connecitons.
> > 2. I've just tested the same code with the 5.9.0 with no success.
> >
> > Someone can help me?
> >
> > Cheers,
> > Carlo
> >
> >
> > ---------- Forwarded message ----------
> > From: carlo cancellieri <[hidden email]>
> > Date: 2014-03-14 19:55 GMT+01:00
> > Subject: 5.8.0 Unable to shutdown embedded broker
> > To: [hidden email]
> >
> >
> > Hi all,
> > I'm having some problem during the Tomcat shutdown.
> > I'm using ActiveMQ-5.8 and my brokerURL are:
> >
> >
> > brokerURL=peer\://geoserver/tomcat1?soTimeout\=3000&transport.soTimeout\=3000&daemon\=true&transport.daemon\=true&broker.persist\=false&useShutdownHook\=false&maxReconnectDelay\=200
> >
> >
> > brokerURL=peer\://geoserver/tomcat2?soTimeout\=3000&transport.soTimeout\=3000&daemon\=true&transport.daemon\=true&broker.persist\=false&useShutdownHook\=false&maxReconnectDelay\=200
> >
> > Note that the the destination for the producers is a VirtualTopic.
> >
> > I can successfully consume the messages but on shutdown tomcats hangs.
> >
> > What's wrong?
> >
> > This is the stack of a Tomcat instance.
> >
> > Java HotSpot(TM) Client VM[168.202.25.104:1044]
> > Thread [DestroyJavaVM] (Running)
> > Thread [pool-3-thread-1] (Running)
> > Daemon Thread [http-8080-5] (Running)
> > Daemon Thread [http-8080-4] (Running)
> > Daemon Thread [http-8080-3] (Running)
> > Daemon Thread [http-8080-2] (Running)
> > Daemon Thread [http-8080-1] (Running)
> > Daemon Thread [TP-Processor4] (Running)
> > Daemon Thread [http-8080-Acceptor-0] (Running)
> > Daemon Thread [ActiveMQ Transport: tcp:///168.202.25.104:64338@64324]
> > (Running)
> > Thread [ActiveMQ Transport: tcp://CIO174/168.202.25.104:64331@64337]
> > (Running)
> > Daemon Thread
> > [Notifier-MulticastDiscoveryAgent-listener:DiscoveryNetworkConnector:NC:BrokerService[tomcat1]]
> > (Running)
> > Daemon Thread
> > [MulticastDiscoveryAgent-listener:DiscoveryNetworkConnector:NC:BrokerService[tomcat1]:Thread-6]
> > (Running)
> > Daemon Thread
> > [MulticastDiscoveryAgent-advertise:tcp://CIO174:64324:Thread-5] (Running)
> > Daemon Thread [ActiveMQ Transport Server: tcp://0.0.0.0:0] (Running)
> > Daemon Thread [ActiveMQ Transport Server Thread Handler: tcp://0.0.0.0:0]
> > (Running)
> >
> >
> >
> > --
> > ==
> > Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
> > information.
> > ==
> >
> > Dott. Carlo Cancellieri
> > @cancellieric
> > Software Engineer
> >
> > GeoSolutions S.A.S.
> > Via Poggio alle Viti 1187
> > 55054 Massarosa (LU)
> > Italy
> > phone: +39 0584 962313
> > mobile: +39 3371094494
> > fax: +39 0584 1660272
> >
> > http://www.geo-solutions.it
> > http://twitter.com/geosolutions_it
> >
> > -------------------------------------------------------
> >
> >
> >
> > --
> > ==
> > Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK for
> > more information.
> > ==
> >
> > Dott. Carlo Cancellieri
> > @cancellieric
> > Software Engineer
> >
> > GeoSolutions S.A.S.
> > Via Poggio alle Viti 1187
> > 55054 Massarosa (LU)
> > Italy
> > phone: +39 0584 962313
> > fax: +39 0584 1660272
> >
> > http://www.geo-solutions.it
> > http://twitter.com/geosolutions_it
> >
> > -------------------------------------------------------
> >
>
>
>
> --
> ==
> Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK for
> more information.
> ==
>
> Dott. Carlo Cancellieri
> @cancellieric
> Software Engineer
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054 Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 1660272
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://activemq.2283324.n4.nabble.com/Fwd-5-8-0-Unable-to-shutdown-embedded-broker-tp4679128p4679129.html
> To start a new topic under ActiveMQ - User, email ml-node+s2283324n2341805h3@n4.nabble.com
> To unsubscribe from ActiveMQ - User, click here.
> NAML
--
View this message in context: http://activemq.2283324.n4.nabble.com/Fwd-5-8-0-Unable-to-shutdown-embedded-broker-tp4679128p4679130.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: 5.8.0 Unable to shutdown embedded broker
Posted by carlo cancellieri <ca...@geo-solutions.it>.
More:
At tomcat shutdown I get: (note that all the brokers, connections and
Transport are automatically created by the PooledConnectionFactory with the
passed URL so they should be ideally closed with a close() on the
PooledConnectionFactory, right?)
SEVERE: The web application [/geoserver] created a ThreadLocal with key of
type [org.apache.log4j.helpers.ThreadLocalMap] (value
[org.apache.log4j.helpers.ThreadLocalMap@3fdfbc7f]) and a value of type
[java.util.Hashtable] (value [{activemq.broker=tomcat1,
activemq.connector=vm://tomcat1}]) but failed to remove it when the web
application was stopped. This is very likely to create a memory leak.
I've also performed a test with useShutdownHook=true with no success.
Same result with ActiveMQ 5.10-SNAPSHOT
Cheers,
Carlo
2014-03-16 2:48 GMT+01:00 carlo cancellieri <
carlo.cancellieri@geo-solutions.it>:
> In addiction to below information I'd like to add:
>
> 1. I'm using PooledConnectionFactory to get connection and at the tomcat
> shutdown end I call stop() which should stops all the opened connecitons.
> 2. I've just tested the same code with the 5.9.0 with no success.
>
> Someone can help me?
>
> Cheers,
> Carlo
>
>
> ---------- Forwarded message ----------
> From: carlo cancellieri <ge...@gmail.com>
> Date: 2014-03-14 19:55 GMT+01:00
> Subject: 5.8.0 Unable to shutdown embedded broker
> To: users@activemq.apache.org
>
>
> Hi all,
> I'm having some problem during the Tomcat shutdown.
> I'm using ActiveMQ-5.8 and my brokerURL are:
>
>
> brokerURL=peer\://geoserver/tomcat1?soTimeout\=3000&transport.soTimeout\=3000&daemon\=true&transport.daemon\=true&broker.persist\=false&useShutdownHook\=false&maxReconnectDelay\=200
>
>
> brokerURL=peer\://geoserver/tomcat2?soTimeout\=3000&transport.soTimeout\=3000&daemon\=true&transport.daemon\=true&broker.persist\=false&useShutdownHook\=false&maxReconnectDelay\=200
>
> Note that the the destination for the producers is a VirtualTopic.
>
> I can successfully consume the messages but on shutdown tomcats hangs.
>
> What's wrong?
>
> This is the stack of a Tomcat instance.
>
> Java HotSpot(TM) Client VM[168.202.25.104:1044]
> Thread [DestroyJavaVM] (Running)
> Thread [pool-3-thread-1] (Running)
> Daemon Thread [http-8080-5] (Running)
> Daemon Thread [http-8080-4] (Running)
> Daemon Thread [http-8080-3] (Running)
> Daemon Thread [http-8080-2] (Running)
> Daemon Thread [http-8080-1] (Running)
> Daemon Thread [TP-Processor4] (Running)
> Daemon Thread [http-8080-Acceptor-0] (Running)
> Daemon Thread [ActiveMQ Transport: tcp:///168.202.25.104:64338@64324]
> (Running)
> Thread [ActiveMQ Transport: tcp://CIO174/168.202.25.104:64331@64337]
> (Running)
> Daemon Thread
> [Notifier-MulticastDiscoveryAgent-listener:DiscoveryNetworkConnector:NC:BrokerService[tomcat1]]
> (Running)
> Daemon Thread
> [MulticastDiscoveryAgent-listener:DiscoveryNetworkConnector:NC:BrokerService[tomcat1]:Thread-6]
> (Running)
> Daemon Thread
> [MulticastDiscoveryAgent-advertise:tcp://CIO174:64324:Thread-5] (Running)
> Daemon Thread [ActiveMQ Transport Server: tcp://0.0.0.0:0] (Running)
> Daemon Thread [ActiveMQ Transport Server Thread Handler: tcp://0.0.0.0:0]
> (Running)
>
>
>
> --
> ==
> Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
> information.
> ==
>
> Dott. Carlo Cancellieri
> @cancellieric
> Software Engineer
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054 Massarosa (LU)
> Italy
> phone: +39 0584 962313
> mobile: +39 3371094494
> fax: +39 0584 1660272
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
>
>
> --
> ==
> Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK for
> more information.
> ==
>
> Dott. Carlo Cancellieri
> @cancellieric
> Software Engineer
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054 Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 1660272
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
--
==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK for
more information.
==
Dott. Carlo Cancellieri
@cancellieric
Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
Fwd: 5.8.0 Unable to shutdown embedded broker
Posted by carlo cancellieri <ca...@geo-solutions.it>.
In addiction to below information I'd like to add:
1. I'm using PooledConnectionFactory to get connection and at the tomcat
shutdown end I call stop() which should stops all the opened connecitons.
2. I've just tested the same code with the 5.9.0 with no success.
Someone can help me?
Cheers,
Carlo
---------- Forwarded message ----------
From: carlo cancellieri <ge...@gmail.com>
Date: 2014-03-14 19:55 GMT+01:00
Subject: 5.8.0 Unable to shutdown embedded broker
To: users@activemq.apache.org
Hi all,
I'm having some problem during the Tomcat shutdown.
I'm using ActiveMQ-5.8 and my brokerURL are:
brokerURL=peer\://geoserver/tomcat1?soTimeout\=3000&transport.soTimeout\=3000&daemon\=true&transport.daemon\=true&broker.persist\=false&useShutdownHook\=false&maxReconnectDelay\=200
brokerURL=peer\://geoserver/tomcat2?soTimeout\=3000&transport.soTimeout\=3000&daemon\=true&transport.daemon\=true&broker.persist\=false&useShutdownHook\=false&maxReconnectDelay\=200
Note that the the destination for the producers is a VirtualTopic.
I can successfully consume the messages but on shutdown tomcats hangs.
What's wrong?
This is the stack of a Tomcat instance.
Java HotSpot(TM) Client VM[168.202.25.104:1044]
Thread [DestroyJavaVM] (Running)
Thread [pool-3-thread-1] (Running)
Daemon Thread [http-8080-5] (Running)
Daemon Thread [http-8080-4] (Running)
Daemon Thread [http-8080-3] (Running)
Daemon Thread [http-8080-2] (Running)
Daemon Thread [http-8080-1] (Running)
Daemon Thread [TP-Processor4] (Running)
Daemon Thread [http-8080-Acceptor-0] (Running)
Daemon Thread [ActiveMQ Transport: tcp:///168.202.25.104:64338@64324]
(Running)
Thread [ActiveMQ Transport: tcp://CIO174/168.202.25.104:64331@64337]
(Running)
Daemon Thread
[Notifier-MulticastDiscoveryAgent-listener:DiscoveryNetworkConnector:NC:BrokerService[tomcat1]]
(Running)
Daemon Thread
[MulticastDiscoveryAgent-listener:DiscoveryNetworkConnector:NC:BrokerService[tomcat1]:Thread-6]
(Running)
Daemon Thread
[MulticastDiscoveryAgent-advertise:tcp://CIO174:64324:Thread-5] (Running)
Daemon Thread [ActiveMQ Transport Server: tcp://0.0.0.0:0] (Running)
Daemon Thread [ActiveMQ Transport Server Thread Handler: tcp://0.0.0.0:0]
(Running)
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==
Dott. Carlo Cancellieri
@cancellieric
Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
mobile: +39 3371094494
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
--
==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK for
more information.
==
Dott. Carlo Cancellieri
@cancellieric
Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------