8 Replies Latest reply on Nov 3, 2011 10:16 AM by Ulrich Kriegel

    JbossAS6.1:  Invalid STOMP frame: 1,10,1,10,

    Ulrich Kriegel Newbie

      Hi there,

      we using JBossAS6.1.0Final and STOMP to communicate between .Net-C#-Applications and Java.

       

      A simple test program sends a few text messages from C# to a JMS topic, an echo-MDB receives the messages and send them again into another topic to be received by a .Net-C# listener on another computer. Everything works fine if after the last message the connection is closed from the C#-Client.

       

      If it stays open, after approx. 2 mins the Jboss console shows the error message shown below, which is repeated until the connection is closed

       

       

       

      10:27:15,515 ERROR [org.hornetq.core.protocol.stomp.StompProtocolManager] Failed to decode: org.hornetq.core.protocol.stomp.StompException: Invalid STOMP frame: 1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,

                at org.hornetq.core.protocol.stomp.StompDecoder.throwInvalid(StompDecoder.java:566) [:6.1.0.Final]

                at org.hornetq.core.protocol.stomp.StompDecoder.decode(StompDecoder.java:367) [:6.1.0.Final]

                at org.hornetq.core.protocol.stomp.StompProtocolManager.handleBuffer(StompProtocolManager.java:161) [:6.1.0.Final]

                at org.hornetq.core.protocol.stomp.StompConnection.bufferReceived(StompConnection.java:269) [:6.1.0.Final]

                at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:459) [:6.1.0.Final]

                at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:73) [:6.1.0.Final]

                at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100) [:6.1.0.Final]

                at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:362) [:6.1.0.Final]

                at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:357) [:6.1.0.Final]

                at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274) [:6.1.0.Final]

                at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261) [:6.1.0.Final]

                at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:90) [:6.1.0.Final]

                at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [:6.1.0.Final]

                at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46) [:6.1.0.Final]

                at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:181) [:6.1.0.Final]

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]

                at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

       

      Is there a solution except closing the connection after every send-operation?

       

      Thanks in advance

      --ulrich

       

      The attachment contains the C#-Client as VisualStudi2010 package with all libs needed. In addition one needs - a Jboss6.1.0Final with two tropics INPUT and OUTPUT is reguired, which are in a role to subscribe and publish - an MDB which listens and publishes the received messages In both sources the host-adress must be set

        • 1. Re: JbossAS6.1:  Invalid STOMP frame: 1,10,1,10,
          Yong Hao Gao Master

          Do you have a test to reproduce it?

           

          Thanks

          Howard

          • 2. Re: JbossAS6.1:  Invalid STOMP frame: 1,10,1,10,
            Ulrich Kriegel Newbie

            As a response to your message I added both, the Echo Bean for JBoss and the .Net-Appliaction.

            Is that sufficient?

             

            Thanks

            --Ulrich

            • 3. Re: JbossAS6.1:  Invalid STOMP frame: 1,10,1,10,
              Clebert Suconic Master

              Can you try downloading SVN http://anonsvn.jboss.org/repos/hornetq/branches/Branch_2_2_AS7

               

              ./build.sh

               

              replace the JARs on your AS and give it a try?

               

               

              We have fixed several stomp issues.

              • 4. Re: JbossAS6.1:  Invalid STOMP frame: 1,10,1,10,
                Yong Hao Gao Master

                I just tried trunk just using the attached .net client with standalone hornetq server, and I see the problem without the MDB.

                 

                I'll investigate.

                 

                Thanks

                Howard

                • 5. Re: JbossAS6.1:  Invalid STOMP frame: 1,10,1,10,
                  Yong Hao Gao Master

                  Primary investiage shows that during the idle time, the client seems periodically send data to the hornetQ server. It looks like heartbeats bytes. However the hornetQ server seems didn't handle it properly.

                  • 6. Re: JbossAS6.1:  Invalid STOMP frame: 1,10,1,10,
                    Ulrich Kriegel Newbie

                    Hi,

                    I tried was Clebert Suconic proposed and  built and replaced the Hornetq-jars in Jboss-6.1.0.Final. However the error remains, but the output changes a little bit

                    12:34:18,739 ERROR [org.hornetq.core.protocol.stomp.StompProtocolManager] Failed

                    to decode: org.hornetq.core.protocol.stomp.StompException: Invalid STOMP frame:

                    1,10,1,10,

                            at org.hornetq.core.protocol.stomp.StompDecoder.throwInvalid(StompDecode

                    r.java:566) [:]

                            at org.hornetq.core.protocol.stomp.StompDecoder.decode(StompDecoder.java

                    :367) [:]

                            at org.hornetq.core.protocol.stomp.StompProtocolManager.handleBuffer(Sto

                    mpProtocolManager.java:162) [:]

                            at org.hornetq.core.protocol.stomp.StompConnection.bufferReceived(StompC

                    onnection.java:279) [:]

                            at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingB

                    ufferHandler.bufferReceived(RemotingServiceImpl.java:512) [:]

                            at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageRec

                    eived(HornetQChannelHandler.java:73) [:]

                            at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleCha

                    nnelHandler.java:100) [:6.1.0.Final]

                            at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChan

                    nelPipeline.java:362) [:6.1.0.Final]

                            at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChan

                    nelPipeline.java:357) [:6.1.0.Final]

                            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:27

                    4) [:6.1.0.Final]

                            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:26

                    1) [:6.1.0.Final]

                            at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:90) [

                    :6.1.0.Final]

                            at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnabl

                    e.java:108) [:6.1.0.Final]

                            at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.j

                    ava:46) [:6.1.0.Final]

                            at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run

                    (VirtualExecutorService.java:181) [:6.1.0.Final]

                            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec

                    utor.java:886) [:1.6.0_26]

                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

                    .java:908) [:1.6.0_26]

                            at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

                     

                    The application performs the following steps

                    1. Creates an NMS.ConnectionFactory

                    2. creates a connection from connection factory

                    3. creates a session from connection

                    4. get destinations for in- and output-topics from session

                    5. start connection

                    6. register a consumer with output-topic

                    7. creates a producer for input-topic

                    8. creates a text message for producer

                    9. producer.send(textmessage)

                    10. producer.close

                     

                    after about  120 sec the error occurs.

                    Because the  message producer should still listen on output topic, session and connection cannot be closed.

                    • 7. Re: JbossAS6.1:  Invalid STOMP frame: 1,10,1,10,
                      Yong Hao Gao Master

                      Hi,

                       

                      I've investigated the traffic between hornetq and your C# client and I found the following issues:

                       

                      1. The client tried to establish a Stomp 1.1 connection against hornetQ. But hornetQ hasn't support STOMP 1.1 until recently.

                      2. In hornetQ Stomp 1.1 support the handling of heart-beat was not correct. It has been just fixed in trunk.

                      3. The C# client seems to send wrong heart-beat bytes to hornetQ.

                       

                      First of all, the client should know by the returned 'CONNECTED' stomp frame header that it was connecting to a Stomp 1.0 server, therefore won't issue heart-beat signals.

                      Secondly even if the client connected to the latest hornetQ server that supports 1.1, the heart-beat bytes is not correct. By looking at the traffic I've noticed when the client needs to send out a heart beat, it sends first a byte '1' and then followed by a byte '10'. The spec says

                       

                      if the sender has no real STOMP frame to send, it MUST send a single newline byte (0x0A)

                       

                      So the byte '1' shouldn't be sent.

                       

                      I'd suggest you report this to the dev team of C# client lib (I think it's apache.nms). If you don't need heart-beat, you need to find a way to disable it at all as a workaround.

                       

                      Howard

                      • 8. Re: JbossAS6.1:  Invalid STOMP frame: 1,10,1,10,
                        Ulrich Kriegel Newbie

                        Thanks Howard for the analysis.

                         

                        Because our application has to send a life sign every 10 secs the problem is bypassed in our case but I will forward your results.