Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 713DE11A2C for ; Tue, 13 May 2014 09:49:22 +0000 (UTC) Received: (qmail 80815 invoked by uid 500); 13 May 2014 09:42:42 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 80767 invoked by uid 500); 13 May 2014 09:42:42 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 80759 invoked by uid 99); 13 May 2014 09:42:42 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2014 09:42:42 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of marcos.truchado@gmail.com does not designate 216.139.250.139 as permitted sender) Received: from [216.139.250.139] (HELO joe.nabble.com) (216.139.250.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2014 09:42:39 +0000 Received: from [192.168.236.139] (helo=joe.nabble.com) by joe.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Wk9Da-0007RY-Ta for users@activemq.apache.org; Tue, 13 May 2014 02:41:50 -0700 Date: Tue, 13 May 2014 02:41:35 -0700 (PDT) From: mtruchado To: users@activemq.apache.org Message-ID: <1399974095893-4681082.post@n4.nabble.com> In-Reply-To: <1399664684721-4681007.post@n4.nabble.com> References: <1399623954174-4681005.post@n4.nabble.com> <1399664521290-4681006.post@n4.nabble.com> <1399664684721-4681007.post@n4.nabble.com> Subject: Re: activemq-client does not close properly connections to the broker MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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.