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

Heartbeat fails in STOMP over WebSockets

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.9.1, 5.10.0
    • 5.12.0
    • None
    • None

    Description

      From AMQ-4740:
      I receive the following error after establishing a connection and heartbeat through stomp.js. This seems to occur after the 'PING' is sent.
      ---------- stomp.js output
      <<< CONNECTED
      heart-beat:10000,10000
      session:ID:localhost.localdomain-45596-1396530920609-2:2
      server:ActiveMQ/5.10-SNAPSHOT
      version:1.1
      send PING every 10000ms
      check PONG every 10000ms
      <<< PONG
      >>> PING
      did not receive server activity for the last 20005ms
      Whoops! Lost connection to ws://172.16.99.73:61614/stomp
      --------------------- activemq console ---------------
      WARN | Transport Connection to: StompSocket_19548821 failed: java.io.IOException
      Exception in thread "ActiveMQ InactivityMonitor Worker" java.lang.NullPointerException
      at org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
      at org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
      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)
      WARN | Transport Connection to: StompSocket_19548821 failed: java.io.IOException
      Exception in thread "ActiveMQ InactivityMonitor Worker" java.lang.NullPointerException
      at org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
      at org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
      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)

      For me it looks as if the StompInactivityMonitor is delivering its events to the wrong Transport, i.e. it needs a "narrow()" when setting it up.

      Attachments

        1. patchfile.txt
          4 kB
          Chad Kelly
        2. firefox_bug_example1.pcapng
          13 kB
          Chad Kelly
        3. AMQ-5155-jetty9.diff
          2 kB
          Sebastian Sjödin
        4. AMQ-5155-jetty8.diff
          2 kB
          Sebastian Sjödin

        Issue Links

          Activity

            People

              tabish Timothy A. Bish
              bergamot Arjan van den Berg
              Votes:
              12 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: