handshake_error (rabbitmq-c)

482 views
Skip to first unread message

Maglos

unread,
Jul 30, 2015, 5:49:40 AM7/30/15
to rabbitmq-users
Hi all,

I seem to have a fairly unique issue - I can't find any pertinent duplicate questions...

My environment is very simple: Windows 7, clean, unconfigured install of RabbitMQ Server 3.5.4, and the latest build of rabbitmq-c (https://github.com/alanxz/rabbitmq-c) as of 30/7/2015

I can run the server, and I can build the example programs. Upon following the recommended "example" step (https://github.com/alanxz/rabbitmq-c#running-the-examples) I am met with
"Declaring queue: a socket error occurred"

Looking into the RabbitMQ server logs, I see:

=INFO REPORT==== 30-Jul-2015::17:47:17 ===
accepting AMQP connection <0.426.0> ([::1]:56310 -> [::1]:5672)

=ERROR REPORT==== 30-Jul-2015::17:47:20 ===
closing AMQP connection <0.426.0> ([::1]:56310 -> [::1]:5672):
{handshake_error,starting,1,
                 {amqp_error,unexpected_frame,
                             "type 1, all octets = <<0,20,0,10,0>>",none}}

Any suggestions?

Thanks in advance

Michael Klishin

unread,
Jul 30, 2015, 6:16:43 AM7/30/15
to rabbitmq-users, Maglos
On 30 Jul 2015 at 12:49:43, Maglos (lude...@gmail.com) wrote:
> I can run the server, and I can build the example programs. Upon
> following the recommended "example" step (https://github.com/alanxz/rabbitmq-c#running-the-examples)
> I am met with
> "Declaring queue: a socket error occurred"
>
> Looking into the RabbitMQ server logs, I see:
>
> =INFO REPORT==== 30-Jul-2015::17:47:17 ===
> accepting AMQP connection <0.426.0> ([::1]:56310 -> [::1]:5672)
>
> =ERROR REPORT==== 30-Jul-2015::17:47:20 ===
> closing AMQP connection <0.426.0> ([::1]:56310 -> [::1]:5672):
> {handshake_error,starting,1,
> {amqp_error,unexpected_frame,
> "type 1, all octets = <<0,20,0,10,0>>",none}}
>
> Any suggestions?

What example specifically did you try? This error most likley means
that you  tried using a connection before it is “fully” open
(negotiated).
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Alan Antonuk

unread,
Jul 30, 2015, 11:40:00 AM7/30/15
to Michael Klishin, rabbitmq-users, Maglos
There's a bug in v0.7.0 in Win32 platforms that causes amqp_login to fail (see: https://github.com/alanxz/rabbitmq-c/issues/282). Please pull from the master branch. (I hope to roll a v0.7.1 release with this fix in it in the next day or two).

-Alan



--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send an email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Maglos

unread,
Jul 31, 2015, 1:56:04 AM7/31/15
to rabbitmq-users, mkli...@pivotal.io, lude...@gmail.com, alan.a...@gmail.com
Thanks for the responses.

Michael - the specific examples were amqp_listen and amqp_sendstring

Alan - I must have been lax in setting up the library. Got rid of my old rabbitmq-c folder, rebuilt from the master branch, and now the examples work wonderfully.

Thanks for the help!

Michael Claßen

unread,
Sep 9, 2015, 4:27:01 PM9/9/15
to rabbitmq-users, mkli...@pivotal.io, lude...@gmail.com
Hi Alan,

I also ran into this bug and it seems updating to the latest master branch fixed it.

However, now I'm seeing a rare issue on some Windows machines (not all!), where it seems that name resolution fails. In particular, this code just "hangs":

Channel::ptr_t channel = Channel::Create("localhost", 5672, "guest", "guest", "/");

When I change "localhost" to "127.0.0.1", the same test involving that line passes.

I should also point out that the machine is capable of resolving "localhost", e.g. in the browser I can access http://localhost:15672

I tried to read up a bit on "windows sockets 2", the library that is probably used here, but I couldn't find out enough to provide any hint for a reason or fix. But just for reference, this is a link that might be helpful:

https://msdn.microsoft.com/en-us/library/windows/desktop/ms739868(v=vs.85).aspx

(Not sure if this is the right forum to post this question.)

thanks,
Michael

Alan Antonuk

unread,
Sep 14, 2015, 11:28:33 AM9/14/15
to rabbitm...@googlegroups.com, Michael Klishin, Luke S
You have a stack-trace for when it hangs?

To post to this group, send email to rabbitm...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages