5 Replies Latest reply on Nov 15, 2011 1:05 AM by Bharath Sekar

    Stomp first steps getting Invalid STOMP frame

    Reik Schatz Newbie

      Hi, trying to use stomp from a javascript client. I downloaded HornetQ 2.2.5 and added:

       

      {code}

      <acceptor name="stomp-acceptor">

              <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

              <param key="protocol"  value="stomp"/>

              <param key="port"  value="61613"/>

            </acceptor>

       

            <acceptor name="stomp-websocket">

               <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

               <param key="protocol" value="stomp_ws" />

               <param key="port" value="61614" />

            </acceptor>

      {code}

       

      in config/standalone/non-clustered/hornetq-configuration.xml

       

      After starting HornetQ, I try to connect via telnet.

       

       

      {code}

      telnet localhost 61613

      Trying ::1...

      Trying 127.0.0.1...

      Connected to localhost.

      Escape character is '^]'.

      CONNECT

      login: foo

      passcode: bar

       

      ^@

      {code}

       

      in the console where HQ is running, I see immediately after the first time pressing ENTER

       

       

      {code}

      [Old I/O server worker (parentId: 2131684134, [id: 0x7f0eeb26, localhost/127.0.0.1:61613])] 13:27:22,958 SEVERE [org.hornetq.core.protocol.stomp.StompProtocolManager]  Failed to decode

      org.hornetq.core.protocol.stomp.StompException: Invalid STOMP frame: C,O,N,N,E,C,T,13,10,

          at org.hornetq.core.protocol.stomp.StompDecoder.throwInvalid(StompDecoder.java:566)

          at org.hornetq.core.protocol.stomp.StompDecoder.decode(StompDecoder.java:375)

          at org.hornetq.core.protocol.stomp.StompProtocolManager.handleBuffer(StompProtocolManager.java:161)

          at org.hornetq.core.protocol.stomp.StompConnection.bufferReceived(StompConnection.java:269)

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

          at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:73)

          at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100)

          at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:362)

          at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:357)

          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)

          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)

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

          at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)

          at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46)

          at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:181)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

          at java.lang.Thread.run(Thread.java:662)

      {code}

       

      The same thing works against ActiveMQ. Is there anything I am doing wrong?