Erlang/OTP Forums

Author Message

<  RabbitMQ mailing list  ~  Recovering after forced connection close

Guest
Posted: Wed Oct 14, 2009 12:02 pm Reply with quote
Guest
I'm trying to make sure that I handle reconnection correctly in the
event that RabbitMQ forces connection closure or a broken pipe
condition occurs. I'm using RabbitMQ 1.7.0 with Erlang 12-B and the
bunny Ruby client v0.6.0 for testing. If I shutdown the server while
my client is connected or invoke an AMQP method with incorrect
arguments I can create the condition whereby RabbitMQ will forcefully
close the connection. What I'm seeing is this type of error in the
log when I try to reconnect with the same client instance -

exception on TCP connection <0.1567.0> from 127.0.0.1:57174
{channel_frame_while_starting,1,starting,
{method,'connection.start_ok',

<<0,0,0,102,8,112,108,97,116,102,111,

114,109,83,0,0,0,4,82,117,98,121,7,

112,114,111,100,117,99,116,83,0,0,0,

5,66,117,110,110,121,11,105,110,102,

111,114,109,97,116,105,111,110,83,0,

0,0,31,104,116,116,112,58,47,47,103,

105,116,104,117,98,46,99,111,109,47,

99,101,108,108,100,101,101,47,98,117,

110,110,121,7,118,101,114,115,105,

111,110,83,0,0,0,5,48,46,54,46,49,8,

65,77,81,80,76,65,73,78,0,0,0,35,5,

76,79,71,73,78,83,0,0,0,5,103,117,

101,115,116,8,80,65,83,83,87,79,82,

68,83,0,0,0,5,103,117,101,115,116,5,
101,110,95,85,83>>}}

I can connect with another instance without difficulty. Firstly, can
anyone explain why this error is occurring in the circumstances that
I have outlined and secondly, is there a way that I can reconnect
using the same client instance.

I'm sure that I read something that stated that this is the correct
behaviour for an AMQP server, but unfortunately I can't recall where
I read it.

Regards,

Chris

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist
tonyg
Posted: Wed Oct 14, 2009 12:36 pm Reply with quote
User Joined: 07 Nov 2006 Posts: 199
Hi Chris,

Chris Duncan wrote:
> exception on TCP connection <0.1567.0> from 127.0.0.1:57174
> {channel_frame_while_starting,1,starting,
> {method,'connection.start_ok',

This occurs when a method frame with non-zero channel number is received
during the connection startup and negotiation phase. I suspect the Ruby
client library: I think it is getting confused somehow, and issuing a
connection.start-ok with non-zero channel number (which is not permitted
by the spec).

Tony
--
[][][] Tony Garnock-Jones | Mob: +44 (0)7905 974 211
[][] LShift Ltd | Tel: +44 (0)20 7729 7060
[] [] http://www.lshift.net/ | Email: tonyg@lshift.net

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist
View user's profile Send private message MSN Messenger
Guest
Posted: Wed Oct 14, 2009 12:58 pm Reply with quote
Guest
Fabulous! Thanks Tony, that makes perfect sense.

Regards,

Chris
>


_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum