Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-6793

Could not accept connection during shutdown : {} java.lang.InterruptedException

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.15.0
    • Fix Version/s: None
    • Component/s: Broker
    • Labels:
      None
    • Environment:

      Description

      Sometimes I get following exception when shutting down:

      2017-08-14 21:47:57,470 [ActiveMQ Transport Server Thread Handler: tcp://localhost:28007] INFO  org.apache.activemq.broker.TransportConnector - Could not accept connection during shutdown  : {}
      java.lang.InterruptedException
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2088)
      	at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
      	at org.apache.activemq.transport.tcp.TcpTransportServer$1.run(TcpTransportServer.java:479)
      	at java.lang.Thread.run(Thread.java:748)
      

      When I look at line 495 of http://activemq.apache.org/maven/apidocs/src-html/org/apache/activemq/transport/tcp/TcpTransportServer.html:

                              if (!isStopped() || !isStopping()) {
      

      I wonder if it must not be an '&&' iso '||' like line 478:

                              while (!isStopped() && !isStopping()) {
      

      Or maybe the doStop must join the socketHandlerThread after this.socketHandlerThread.interrupt(); Because now doStop just continues, and ServiceSupport.stop method could call this.stopping.set(false); while the interrupt is not yet processed in some cases by the socketHandlerThread.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dkwakkel Donald Kwakkel
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: