activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtruchado <marcos.truch...@gmail.com>
Subject Re: activemq-client does not close properly connections to the broker
Date Tue, 13 May 2014 09:41:35 GMT
Hi again,

I got some more time to dig into this, I found the place where It is
happening

I have here the sources for activemq-client 5.8.0.redhat-60024 (please note
that I'm using JBoss AMQ 6.0, this is a product released by RedHat that uses
internally Activemq 5.8.0)

The sources that I'm using can be found here:

http://repo.fusesource.com/nexus/content/groups/public/org/apache/activemq/activemq-web-console/5.8.0.redhat-60024/

My configuration includes a failover between two brokers, both configured
with openwire connection.

I'm not using any openwire attributes, so the configuration is the default
one.

As you suggested, I put a break point in the place where the socket is being
closed, this is in my sources here:

class TcpTransport, line 537

    @Override
    protected void doStop(ServiceStopper stopper) throws Exception {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Stopping transport " + this);
        }

        // Closing the streams flush the sockets before closing.. if the
socket
        // is hung.. then this hangs the close.
        // closeStreams();
        if (socket != null) {
            if (closeAsync) {
                //closing the socket can hang also
                final CountDownLatch latch = new CountDownLatch(1);

                // need a async task for this
                final TaskRunnerFactory taskRunnerFactory = new
TaskRunnerFactory();
                taskRunnerFactory.execute(new Runnable() {
                    public void run() {
                        LOG.trace("Closing socket {}", socket);
                        try {
                            *socket.close();*
                            LOG.debug("Closed socket {}", socket);
                        } catch (IOException e) {
                            if (LOG.isDebugEnabled()) {
                                LOG.debug("Caught exception closing socket "
+ socket + ". This exception will be ignored.", e);
                            }
                        } finally {
                            latch.countDown();
                        }
                    }
                });

Exactly at this point, when the socket is close I can see the warning in
ActiveMQ log

2014-05-13 11:27:37,754 | WARN  | 1.77:54043@12270 | Transport                       
| ivemq.broker.TransportConnection  238 | 104 -
org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Transport
Connection to: tcp://172.16.151.77:54043 failed: java.net.SocketException:
Connection reset

Should I raise a bug with this?

Thanks.



--
View this message in context: http://activemq.2283324.n4.nabble.com/activemq-client-does-not-close-properly-connections-to-the-broker-tp4681005p4681082.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message