Uploaded image for project: 'ActiveMQ .Net'
  1. ActiveMQ .Net
  2. AMQNET-196

ActiveMQ 5.3 / System.IO.EndOfStreamException / "Unable to read beyond the end of the stream.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.2.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows-server-2003
      AMQ 5.3 RC4
      Apache.NMS.ActiveMQ, Version 1.1.0.1642

      Description

      using "Assembly Apache.NMS.ActiveMQ, Version 1.1.0.1642"

      when I use:
      connection = CreateConnection();
      connection.ExceptionListener += new ExceptionListener(OnException);
      session = connection.CreateSession(this.SessionAcknowledgeMode);
      ....

      each 60 seconds I get a exception :
      "Unable to read beyond the end of the stream."

      its not necessary a message.... is automatic.

      I upload my test in:
      http://www.nabble.com/file/p25862392/nmsTest.cs
      ticket:
      http://www.nabble.com/NMS---ActiveMQ-5.3----%22Unable-to-read-beyond-the-end-of-the-stream.%22-td25849938.html
      exception type is >>> System.IO.EndOfStreamException

      note: with ActiveMQ 5.2 I don't have this issue.

      1. nmsTest.cs
        3 kB
        Daniel Lujan

        Activity

        Hide
        tabish121 Timothy Bish added a comment -

        Working as designed, should probably implement an Inactivity Monitor for NMS.ActiveMQ at some point.

        Show
        tabish121 Timothy Bish added a comment - Working as designed, should probably implement an Inactivity Monitor for NMS.ActiveMQ at some point.
        Hide
        lujan99 Daniel Lujan added a comment -

        fine!!!!! all right now.

        I use 'transport.keepAliveResponseRequired=true' and is ok.

        too many thanks... you are the best!

        Show
        lujan99 Daniel Lujan added a comment - fine!!!!! all right now. I use 'transport.keepAliveResponseRequired=true' and is ok. too many thanks... you are the best!
        Hide
        tabish121 Timothy Bish added a comment -

        The reason this is happening in 5.3 is as a result of the change in https://issues.apache.org/activemq/browse/AMQ-2351. The broker doesn't set a response required flag on the KeepAliveInfo command so the .NET client doesn't ever send back a KeepAliveInfo to the broker as it lacks a true Inactivity Monitor implementation.

        You can increase the Max Inactivity duration value by setting the option on the clients connection URI, see: http://activemq.apache.org/configuring-wire-formats.html

        Or you can turn on the response required field of the KeepAliveInfo command sent from the broker by setting the following in you activemq.xml config file:

                <transportConnectors>
                    <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?transport.keepAliveResponseRequired=true"/>
                </transportConnectors>
        
        Show
        tabish121 Timothy Bish added a comment - The reason this is happening in 5.3 is as a result of the change in https://issues.apache.org/activemq/browse/AMQ-2351 . The broker doesn't set a response required flag on the KeepAliveInfo command so the .NET client doesn't ever send back a KeepAliveInfo to the broker as it lacks a true Inactivity Monitor implementation. You can increase the Max Inactivity duration value by setting the option on the clients connection URI, see: http://activemq.apache.org/configuring-wire-formats.html Or you can turn on the response required field of the KeepAliveInfo command sent from the broker by setting the following in you activemq.xml config file: <transportConnectors> <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?transport.keepAliveResponseRequired=true"/> </transportConnectors>
        Hide
        lujan99 Daniel Lujan added a comment - - edited

        I do some test while inspect with 'WireShark' protocol analyzer, and I see:

        1) AMQ-5.2 send a Keep-Alive command each 20 seconds, client answer with Keep-Alive Command.
        324 14:37:59.665777 192.168.2.99 192.168.2.24 TCP 61616 > fjippol-swrly [PSH, ACK] Seq=406 Ack=585 Win=64951 Len=10
        325 14:37:59.665898 192.168.2.24 192.168.2.99 TCP fjippol-swrly > 61616 [PSH, ACK] Seq=585 Ack=416 Win=65120 Len=10
        326 14:37:59.835978 192.168.2.99 192.168.2.24 TCP 61616 > fjippol-swrly [ACK] Seq=416 Ack=595 Win=64941 Len=0

        2) AMQ-5.3 send a Keep-Alive command each 20 seconds, client NOT answer with (only ACK-TCP).
        261 14:33:44.620817 192.168.2.99 192.168.2.24 TCP 61616 > tsb2 [PSH, ACK] Seq=356 Ack=535 Win=65001 Len=10
        262 14:33:44.807736 192.168.2.24 192.168.2.99 TCP tsb2 > 61616 [ACK] Seq=535 Ack=366 Win=65170 Len=0

        Alway data is:
        00 00 00 06 0a 00 00 00 00 00
        (Keep-Alive command)

        192.168.2.99 AMQ
        192.168.2.24 CLIENT

        Show
        lujan99 Daniel Lujan added a comment - - edited I do some test while inspect with 'WireShark' protocol analyzer, and I see: 1) AMQ-5 .2 send a Keep-Alive command each 20 seconds, client answer with Keep-Alive Command. 324 14:37:59.665777 192.168.2.99 192.168.2.24 TCP 61616 > fjippol-swrly [PSH, ACK] Seq=406 Ack=585 Win=64951 Len=10 325 14:37:59.665898 192.168.2.24 192.168.2.99 TCP fjippol-swrly > 61616 [PSH, ACK] Seq=585 Ack=416 Win=65120 Len=10 326 14:37:59.835978 192.168.2.99 192.168.2.24 TCP 61616 > fjippol-swrly [ACK] Seq=416 Ack=595 Win=64941 Len=0 2) AMQ-5 .3 send a Keep-Alive command each 20 seconds, client NOT answer with (only ACK-TCP). 261 14:33:44.620817 192.168.2.99 192.168.2.24 TCP 61616 > tsb2 [PSH, ACK] Seq=356 Ack=535 Win=65001 Len=10 262 14:33:44.807736 192.168.2.24 192.168.2.99 TCP tsb2 > 61616 [ACK] Seq=535 Ack=366 Win=65170 Len=0 Alway data is: 00 00 00 06 0a 00 00 00 00 00 (Keep-Alive command) 192.168.2.99 AMQ 192.168.2.24 CLIENT
        Hide
        lujan99 Daniel Lujan added a comment -

        is my test.

        Show
        lujan99 Daniel Lujan added a comment - is my test.

          People

          • Assignee:
            tabish121 Timothy Bish
            Reporter:
            lujan99 Daniel Lujan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development