activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: activemq-client does not close properly connections to the broker
Date Wed, 14 May 2014 10:07:37 GMT
On 05/13/2014 05:41 AM, mtruchado wrote:
> 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.
>
You should test against the trunk code as the code you are using is not 
the latest and my not have all current fixes.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Mime
View raw message