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

NioQueueSubscriptionTest.testLotsOfConcurrentConnections fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • None
    • None
    • Test Cases
    • None

    Description

      This test fails consistently with multiple instances of the two first two exceptions shown below. Out of 400 connections created, typically 40-140 fail.

      The last two exceptions occur randomly in the logs if I run with TRACE logging on.

      -------------------------------------------------------------------

      javax.jms.JMSException: Cannot send, channel has already failed: tcp://127.0.0.1:62621
      at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
      at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1392)
      at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1478)
      at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:516)
      at org.apache.activemq.broker.NioQueueSubscriptionTest$1.run(NioQueueSubscriptionTest.java:90)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: org.apache.activemq.transport.InactivityIOException: Cannot send, channel has already failed: tcp://127.0.0.1:62621
      at org.apache.activemq.transport.AbstractInactivityMonitor.doOnewaySend(AbstractInactivityMonitor.java:315)
      at org.apache.activemq.transport.AbstractInactivityMonitor.oneway(AbstractInactivityMonitor.java:304)
      at org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:85)
      at org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:104)
      at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68)
      at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:81)
      at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:86)
      at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1363)
      ... 6 more

      -------------------------------------------------------------------
      OR

      javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:62621?trace=false. Reason: java.net.SocketException: Connection reset by peer
      at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
      at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:293)
      at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:238)
      at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:184)
      at org.apache.activemq.broker.NioQueueSubscriptionTest$1.run(NioQueueSubscriptionTest.java:88)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: java.net.SocketException: Connection reset by peer
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
      at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
      at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
      at java.net.Socket.connect(Socket.java:579)
      at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:496)
      at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:459)
      at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)
      at org.apache.activemq.transport.AbstractInactivityMonitor.start(AbstractInactivityMonitor.java:140)
      at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
      at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
      at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
      at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
      at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:273)
      ... 6 more

      -------------------------------------------------------------------------

      java.net.SocketException: Invalid argument
      at java.net.PlainSocketImpl.socketSetOption(Native Method)
      at java.net.AbstractPlainSocketImpl.setOption(AbstractPlainSocketImpl.java:269)
      at java.net.Socket.setReceiveBufferSize(Socket.java:1218)
      at org.apache.activemq.transport.tcp.TcpTransport.initialiseSocket(TcpTransport.java:432)
      at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:513)
      at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:459)
      at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)
      at org.apache.activemq.transport.AbstractInactivityMonitor.start(AbstractInactivityMonitor.java:140)
      at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
      at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
      at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
      at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
      at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:273)
      at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:238)
      at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:184)
      at org.apache.activemq.broker.NioQueueSubscriptionTest$1.run(NioQueueSubscriptionTest.java:88)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)

      -------------------------------------------------------------------

      2013-01-30 15:54:01,178 [0.1:62621@62451] - DEBUG ActiveMQConnection - Async exception with no exception listener: java.net.SocketException: Connection reset
      java.net.SocketException: Connection reset
      at java.net.SocketInputStream.read(SocketInputStream.java:189)
      at java.net.SocketInputStream.read(SocketInputStream.java:121)
      at org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
      at org.apache.activemq.transport.tcp.TcpTransport$2.fill(TcpTransport.java:604)
      at org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
      at org.apache.activemq.transport.tcp.TcpTransport$2.read(TcpTransport.java:589)
      at java.io.DataInputStream.readInt(DataInputStream.java:387)
      at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275)
      at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:221)
      at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:213)
      at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
      at java.lang.Thread.run(Thread.java:722)

      Attachments

        1. NioQueueSubscriptionTest.patch
          4 kB
          Kevin Anthony Earls

        Activity

          People

            Unassigned Unassigned
            kearls Kevin Anthony Earls
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: