On Tue, Jan 14, 2014 at 9:44 AM, Andreas Mueller <a...@iit.de> wrote:

> Disabling SASL should be an option in proton to connect to simple services
> that do not provide SASL or just to skip this additional step if SASL is
> not requires.
>

Agreed, feel free to file a JIRA if we don't already have one.


>
> The other problem was already reported from Sergey.
>
> I receive a SASL protocol header and a SASL Init message with mechanism
> PLAIN from proton.
>
> [ProtocolHeader, name=AMQP, id=3, major=1, minor=0, revision=0]
> [SaslInit mechanism=PLAIN, initialResponse=006775657374006775657374]
>
> Then occasionally this error is thrown:
>
> ./send -a amqp://guest:guest@127.0.0.1:5672/testqueue Test
> [0xbe1030:0] ERROR[-2] SASL header mismatch:
> '\x00\x00\x00\x17\x02\x01\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00D\xc0\x03\x01P\x00AMQP\x03\x01\x00\x00\x00\x00\x00=\x02\x01\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00@
> \xc0)\x01\xe0&\x04\xa3\x05PLAIN\x09ANONYMOUS\x0aDIGEST-MD5\x08CRAM-MD5'
>
> My first thought was that this might be caused by using an unsupported
> mechanisnm but this is not the case as PLAIN is used. I'm getting this with
> ANONYMOUS too.
>

The bytes that follow the "...header mismatch: ..." part of the error
message are what proton thinks it is reading from the wire, and it looks to
me like there is garbage in front of the SASL header. The SASL header looks
to start where you see the sequence "...AMQP\x03\x01...". This either means
that proton's internal buffers are getting messed up somehow, or there
actually is garbage on the wire. Do you have any way of determining which
is the case, e.g. running the connection through tcpdump or something like
that and verifying that the first 8 bytes of data are in fact
"AMQP\x03\x01\x00\x00"? This would give us a better idea of where to look
for the problem.

--Rafael

Reply via email to