qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fraser Adams <fraser.ad...@blueyonder.co.uk>
Subject Re: messenger to qpidd barfs with: ERROR[-2] SASL header mismatch: 'AMQP\x01\x01\x00\x0a'
Date Sun, 12 Jan 2014 17:02:45 GMT
Cheers Robbie, you're a *star*, you were indeed correct and it was that 
flipping "--no-module-dir"

I manually deleted legacystore.so and fired up
qpidd --auth no

and
./send -a amqp://localhost/test

Successfully adds things to my test queue (I've not tried reading them 
off yet, but so far so good)

What's *even cooler* is that the following also works:

node send-async.js -a amqp://localhost:5673/test

I've stood up a noddy little WebSocket<->TCP Socket proxy that listens 
on a configurable WebSocket port (in this case 5673) and spits the data 
out on a target port (defaults to <listen port> - 1)

So what I've successfully done is to send AMQP 1.0 data out from a 
WebSocket from my JavaScript port of Proton, proxied it to a TCP socket 
(just copies the byte buffer off the WebSocket and onto the TCP Socket 
and vice versa) which in turn sent the data to qpidd. I've got it 
working from Node.js and Firefox.

I'm feeling pretty pleased now :-) I'll have a play around with Rob's 
WebSocket support on the Java Broker now, it'll be neat to go direct to 
a Broker without needing a proxy.

and my send-async.js is working fully asynchronously now thanks to some 
modifications to emscripten I've been working on - it's all starting to 
come together now :-)

Thanks muchly for helping me out of that annoying little hole - feel 
like I'm making a bit of decent progress now.
Cheers,
Frase


On 12/01/14 14:24, Robbie Gemmell wrote:
> Hi Fraser,
>
> I'm not sure your assumption about 1.0 being enabled is correct, that looks
> like the AMQP 0-10 handshake to me: AMQP 1 1 0 10.
>
> The AMQP 1.0 handshakes are AMQP 3 1 0 0 and AMQP 0 1 0 0.
>
> I must admit to having not used the 1.0 support in qpidd, but is it not in
> its own module? In which case perhaps your --no-module-dir option could be
> in play.
>
> Robbie
>
> On 12 January 2014 14:03, Fraser Adams <fraser.adams@blueyonder.co.uk>wrote:
>
>> Hey all,
>> I thought I'd have a go at trying to send an AMQP 1.0 message between
>> Proton messenger and qpidd.
>>
>> I've tried to keep things as simple as possible, but unfortunately it
>> still barfed, so I'd be grateful for some pointers.
>>
>> I built qpidd 0.27 off trunk yesterday and fired it up with:
>>
>> qpidd --auth no --no-module-dir
>>
>> (The --no-module-dir is there 'cause there's a bug on trunk due to both
>> stores getting deployed).
>>
>> I added a queue imaginatively called "test" :-)
>>
>> Using the simple "send" program in proton-c/examples/messenger/c I tried:
>> ./send -a amqp://0.0.0.0/test
>>
>> Which should, I think, send "Hello World!" to the test queue - it
>> certainly seems to follow the pattern suggested by Gordon below.
>>
>> But it fails with:
>> ERROR[-2] SASL header mismatch: 'AMQP\x01\x01\x00\x0a'
>>
>> I've also tried:
>> ./send -a amqp://127.0.0.1/test
>> ./send -a amqp://localhost/test
>> ./send -a amqp://127.0.0.1
>>
>> All fail with the same error.
>>
>> When I stand up the recv program instead of qpidd it happily prints out
>>
>> Address: amqp://127.0.0.1
>> Subject: (no subject)
>> Content: "Hello World!"
>>
>> With the last example, which is what I'd expect.
>>
>> I don't believe that there's too much wrong with my qpidd build, cmake
>> picked up my proton install and running qpidd -h prints out:
>> AMQP 1.0 Options:
>>    --domain DOMAIN           Domain of this broker
>>    --queue-patterns PATTERN  Pattern for on-demand queues
>>    --topic-patterns PATTERN  Pattern for on-demand topics
>>
>> Which both suggest that it's correctly build with AMQP 1.0 support.
>>
>> Any thoughts as to what I've done wrong? BTW I also tried doing:
>> ./send -a amqp://guest/guest@0.0.0.0/test
>>
>> "just to see", but I get the same SASL header mismatch error.
>>
>> Failing on such a trivial use case doesn't fill me with a great deal of
>> confidence for trying something more exciting :-(
>> Any thoughts on what I'm doing wrong.
>>
>> BTW when talking between "send" and "receive" the first block of data that
>> send sends is:
>> 65,77,81,80,3,1,0,0,0,0,0,33,2,1,0,0,0,83,65,208,0,0,0,17,
>> 0,0,0,2,163,9,65,78,79,78,89,77,79,85,83,160,0
>>
>> I "think" the 65,77,81,80,3,1,0,0 bit is the AMQP SASL header given the
>> #define SASL_HEADER ("AMQP\x03\x01\x00\x00")
>> in proton-c/src/sasl/sasl.c
>>
>> So not sure if there's something I need to do with qpidd?
>> I also tried firing up qpidd with:
>> qpidd --no-module-dir
>>
>> With no more joy :-(
>>
>> BTW there's a similar issue mentioned on the proton list on the thread:
>> pn_messenger_send return code albeit that Sergey is trying to talk to the
>>   SwiftMQ Broker.
>>
>>
>> Cheers,
>> Frase
>>
>>
>> On 10/01/14 13:01, Gordon Sim wrote:
>>
>>> At present messenger only sets the address of the source for receiving
>>> links and of the target for sending links. For sending/receiving to an
>>> existing queue or to a fanout exchange, this is all you need (just specify
>>> the queue or exchange name as the path in the url of the address used, e.g.
>>> amqp://127.0.0.1/my-queue or amqp://127.0.0.1/amq.fanout). That gives
>>> you the basic queue and topic patterns of JMS.
>>>
>>>
>> ---------------------------------------------------------------------
>> 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