qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: "unknown frame type: 0" after upgrading proton-j jar and proton jms jar (0.4 -> 0.10) in HornetQ (final).
Date Wed, 28 Oct 2015 13:08:12 GMT
On 10/28/2015 12:08 PM, Matthew Karlsen wrote:
> No.     Time        Source                Destination           Protocol Length Info
>        4 0.059284    10.20.51.60           10.30.50.0            AMQP     87     Protocol-Header
1-0-0 sasl.init
>
> Frame 4: 87 bytes on wire (696 bits), 87 bytes captured (696 bits)
> Ethernet II, Src: DellInc_d7:96:d4 (18:03:73:d7:96:d4), Dst: CiscoInc_19:8c:d9 (00:22:55:19:8c:d9)
> Internet Protocol Version 4, Src: 10.20.51.60 (10.20.51.60), Dst: 10.30.50.0 (10.30.50.0)
> Transmission Control Protocol, Src Port: 65285 (65285), Dst Port: 5672 (5672), Seq: 1,
Ack: 1, Len: 33
> Advanced Message Queueing Protocol
> Advanced Message Queueing Protocol
>
> No.     Time        Source                Destination           Protocol Length Info
>        5 0.072613    10.30.50.0            10.20.51.60           AMQP     62     Protocol-Header
1-0-0
>
> Frame 5: 62 bytes on wire (496 bits), 62 bytes captured (496 bits)
> Ethernet II, Src: CiscoInc_19:8c:d9 (00:22:55:19:8c:d9), Dst: DellInc_d7:96:d4 (18:03:73:d7:96:d4)
> Internet Protocol Version 4, Src: 10.30.50.0 (10.30.50.0), Dst: 10.20.51.60 (10.20.51.60)
> Transmission Control Protocol, Src Port: 5672 (5672), Dst Port: 65285 (65285), Seq: 1,
Ack: 34, Len: 8
> Advanced Message Queueing Protocol
>
> No.     Time        Source                Destination           Protocol Length Info
>        6 0.072614    10.30.50.0            10.20.51.60           AMQP     84     open
close
>
> Frame 6: 84 bytes on wire (672 bits), 84 bytes captured (672 bits)
> Ethernet II, Src: CiscoInc_19:8c:d9 (00:22:55:19:8c:d9), Dst: DellInc_d7:96:d4 (18:03:73:d7:96:d4)
> Internet Protocol Version 4, Src: 10.30.50.0 (10.30.50.0), Dst: 10.20.51.60 (10.20.51.60)
> Transmission Control Protocol, Src Port: 5672 (5672), Dst Port: 65285 (65285), Seq: 9,
Ack: 34, Len: 30
> Advanced Message Queueing Protocol
> Advanced Message Queueing Protoco

SO the client is sending the protocol header (I'm assuming its a sasl 
header, but without seeing the actual bytes I can't be sure) and then a 
sasl-init. The broker then appears to respond with a protocol header, 
but does not go through the sasl handshake (it should send a 
sasl.mechanisms and then a sasl.outcome), but sends an open and close 
(presumably signalling some sort of error?).

Is there any error condition/description in the 6th frame? Is there 
anything in the broker log?

Providing the client is indeed sending the correct protocol header, then 
the broker is not behaving as expected, which is the source of the error 
in the subject. It is expecting a sasl frame 
(sasl.mechanisms/sasl.outcome, but gets a plain amqp open). So first 
setp I would verify that protocol header from frame 4 (fifth byte should 
be 0x03).

>
> No.     Time        Source                Destination           Protocol Length Info
>        7 0.072655    10.20.51.60           10.30.50.0            TCP      54     65285→5672
[ACK] Seq=34 Ack=39 Win=65536 Len=0
>
> Frame 7: 54 bytes on wire (432 bits), 54 bytes captured (432 bits)
> Ethernet II, Src: DellInc_d7:96:d4 (18:03:73:d7:96:d4), Dst: CiscoInc_19:8c:d9 (00:22:55:19:8c:d9)
> Internet Protocol Version 4, Src: 10.20.51.60 (10.20.51.60), Dst: 10.30.50.0 (10.30.50.0)
> Transmission Control Protocol, Src Port: 65285 (65285), Dst Port: 5672 (5672), Seq: 34,
Ack: 39, Len: 0
>
> No.     Time        Source                Destination           Protocol Length Info
>        8 61.490947   10.30.50.0            10.20.51.60           TCP      60     5672→65285
[FIN, ACK] Seq=39 Ack=34 Win=65536 Len=0
>
> Frame 8: 60 bytes on wire (480 bits), 60 bytes captured (480 bits)
> Ethernet II, Src: CiscoInc_19:8c:d9 (00:22:55:19:8c:d9), Dst: DellInc_d7:96:d4 (18:03:73:d7:96:d4)
> Internet Protocol Version 4, Src: 10.30.50.0 (10.30.50.0), Dst: 10.20.51.60 (10.20.51.60)
> Transmission Control Protocol, Src Port: 5672 (5672), Dst Port: 65285 (65285), Seq: 39,
Ack: 34, Len: 0
>
> No.     Time        Source                Destination           Protocol Length Info
>        9 61.491003   10.20.51.60           10.30.50.0            TCP      54     65285→5672
[ACK] Seq=34 Ack=40 Win=65536 Len=0
>
> Frame 9: 54 bytes on wire (432 bits), 54 bytes captured (432 bits)
> Ethernet II, Src: DellInc_d7:96:d4 (18:03:73:d7:96:d4), Dst: CiscoInc_19:8c:d9 (00:22:55:19:8c:d9)
> Internet Protocol Version 4, Src: 10.20.51.60 (10.20.51.60), Dst: 10.30.50.0 (10.30.50.0)
> Transmission Control Protocol, Src Port: 65285 (65285), Dst Port: 5672 (5672), Seq: 34,
Ack: 40, Len: 0
>
> No.     Time        Source                Destination           Protocol Length Info
>       10 61.492852   10.20.51.60           10.30.50.0            TCP      54     65285→5672
[FIN, ACK] Seq=34 Ack=40 Win=65536 Len=0
>
> Frame 10: 54 bytes on wire (432 bits), 54 bytes captured (432 bits)
> Ethernet II, Src: DellInc_d7:96:d4 (18:03:73:d7:96:d4), Dst: CiscoInc_19:8c:d9 (00:22:55:19:8c:d9)
> Internet Protocol Version 4, Src: 10.20.51.60 (10.20.51.60), Dst: 10.30.50.0 (10.30.50.0)
> Transmission Control Protocol, Src Port: 65285 (65285), Dst Port: 5672 (5672), Seq: 34,
Ack: 40, Len: 0
>
> No.     Time        Source                Destination           Protocol Length Info
>       11 61.496639   10.30.50.0            10.20.51.60           TCP      60     5672→65285
[ACK] Seq=40 Ack=35 Win=65536 Len=0
>
> Frame 11: 60 bytes on wire (480 bits), 60 bytes captured (480 bits)
> Ethernet II, Src: CiscoInc_19:8c:d9 (00:22:55:19:8c:d9), Dst: DellInc_d7:96:d4 (18:03:73:d7:96:d4)
> Internet Protocol Version 4, Src: 10.30.50.0 (10.30.50.0), Dst: 10.20.51.60 (10.20.51.60)
> Transmission Control Protocol, Src Port: 5672 (5672), Dst Port: 65285 (65285), Seq: 40,
Ack: 35, Len: 0
>
>
>
> ################## SEND CODE ######################
>
> /*
>   *
>   * Licensed to the Apache Software Foundation (ASF) under one
>   * or more contributor license agreements.  See the NOTICE file
>   * distributed with this work for additional information
>   * regarding copyright ownership.  The ASF licenses this file
>   * to you under the Apache License, Version 2.0 (the
>   * "License"); you may not use this file except in compliance
>   * with the License.  You may obtain a copy of the License at
>   *
>   *   http://www.apache.org/licenses/LICENSE-2.0
>   *
>   * Unless required by applicable law or agreed to in writing,
>   * software distributed under the License is distributed on an
>   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
>   * KIND, either express or implied.  See the License for the
>   * specific language governing permissions and limitations
>   * under the License.
>   *
>   */
> /**
>   * Based on:
>   *     Example/test of the java Messenger/Message API.
>   *     Based closely qpid src/proton/examples/messenger/py/send.py
>   *     @author mberkowitz@sf.org
>   *     @since 8/4/2013
>   */
> package qpid;
>
> import org.apache.qpid.proton.TimeoutException;
> import org.apache.qpid.proton.amqp.Symbol;
> import org.apache.qpid.proton.amqp.messaging.*;
> import org.apache.qpid.proton.message.Message;
> import org.apache.qpid.proton.messenger.Messenger;
>
> import java.util.HashMap;
> import java.util.Map;
> import java.util.logging.Level;
> import java.util.logging.Logger;
>
> public class SendOld {
>
>      private static Logger tracer = Logger.getLogger("proton.example");
>      //private String address = "amqp://guest:guest@localhost:5672/jms.topic.ContentOperations";
>      private String address = "amqp://guest:guest@hangerlane:5672/exampleQueue1"; //?amqp.saslLayer=false";
>      //private String address = "amqp://guest:guest@localhost:5672/NewQueue"; //jms.queue.publishQueue
& NewQueue
>      private String subject = "change";
>      private String body = new String("Message string");
>
>      private SendOld() {
>
>      }
>
>      public static void main(String args[]) {
>          SendOld o = new SendOld();
>          o.run();
>      }
>
>      private void run() {
>          try {
>              System.out.println("Create messenger 'guest'");
>              Messenger mng = org.apache.qpid.proton.messenger.impl.MessengerImpl.Factory.create("guest");
>
>              System.out.println("Set password");
>              mng.setPassword("guest");
>
>              System.out.println("Start messenger");
>              mng.start();
>
>              System.out.println("Create message");
>              Message msg = org.apache.qpid.proton.message.impl.MessageImpl.Factory.create();
>
>              System.out.println("Set message address");
>              msg.setAddress(address);
>
>              System.out.println("Set subject");
>              //msg.setSubject(subject);
>
>              System.out.println("Set delivery annotations");
>              Map<Symbol,Object> map = new HashMap<>();
>              map.put(Symbol.getSymbol("modify"), "yes");
>              DeliveryAnnotations da = new DeliveryAnnotations(map);
>              msg.setDeliveryAnnotations(da);
>
>              System.out.println("Set message body");
>              Section s = new AmqpValue(body);
>              msg.setBody(s);
>              mng.put(msg);
>
>
>              System.out.println("Send message");
>              try {
>                  mng.send();
>              } catch (TimeoutException e){
>                  e.printStackTrace();
>              }
>
>              System.out.println("Stop messenger");
>              mng.stop();
>
>          } catch (Exception e) {
>              tracer.log(Level.SEVERE, "proton error", e);
>          }
>      }
> }
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Chuck Rolke [mailto:crolke@redhat.com]
> Sent: 27 October 2015 20:39
> To: users@qpid.apache.org
> Subject: Re: "unknown frame type: 0" after upgrading proton-j jar and proton jms jar
(0.4 -> 0.10) in HornetQ (final).
>
>
>
> ----- Original Message -----
>> From: "Gordon Sim" <gsim@redhat.com>
>> To: users@qpid.apache.org
>> Sent: Tuesday, October 27, 2015 3:24:37 PM
>> Subject: Re: "unknown frame type: 0" after upgrading proton-j jar and
>> proton jms jar (0.4 -> 0.10) in HornetQ (final).
>>
>> On 10/27/2015 03:43 PM, Matthew Karlsen wrote:
>>> Hello again,
>>>
>>> Last time I contacted the list I was having issues with the basic
>>> sending and receiving of AMQP messages to/from HornetQ.
>>> I have got quite a bit further by myself (+ docs & e.g.s) but am
>>> sorry to say that I am stumped again...
>>>
>>> I have got HornetQ and the Qpid Proton examples configured and
>>> working with proton-api-0.4.jar, proton-j-impl-0.4.jar and
>>> proton-jms-0.4.jar. I have also set up a divert with a filter such
>>> that some messages are diverted from one queue to another.
>>>
>>> It all works fine...
>>>
>>> Unfortunately, the Qpid Proton library versions that I am using have
>>> a connection timeout hard-coded at 60 seconds (if I understand correctly).
>>>
>>> I believe this relates to
>>> https://developer.jboss.org/thread/233539?start=0&tstart=0 [How to
>>> set AMQP idle-timeout / ping frequency / TTL?]
>>>
>>> As I understand it, upgrading to proton-j-0.10.jar and
>>> proton-jms-0.10.jar should fix this issue by letting you specify the timeout.
>>>
>>> However, with the new jars, when trying to send/receive the message
>>> I am getting the error at the end of the message (below).
>>>
>>> I realise that this topic bridges Qpid and HornetQ (unfortunately).
>>> I can confirm that HornetQ does support SASL and my config should be
>>> sufficient (indeed, it worked before the upgrade). From the HornetQ
>>> manual: "The HornetQ Server accepts AMQP SASL Authentication and
>>> will use this to map onto the underlying session created for the
>>> connection so you can use the normal HornetQ security configuration."
>>>
>>> Does anyone have an idea what may be going on?
>>>
>>> I have tried reading the documentation, wiki, e.t.c. (have spent
>>> about a day on this so far).
>>
>> Can you get a capture of the protocol interaction, e.g. using wireshark?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For
>> additional commands, e-mail: users-help@qpid.apache.org
>>
>>
>
> It sounds like the java code is expecting a Sasl header (type 3) but is receiving a normal
AMQP header (type 0).
>
> You could try disabling Sasl at your end to see if the connection goes through.
>
> A protocol trace will show for sure.
>
> -Chuck
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail:
users-help@qpid.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message