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

Search Discussions

  • Tony Garnock-Jones at Oct 14, 2009 at 12:35 pm
    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 at lshift.net
  • Chris Duncan at Oct 14, 2009 at 12:57 pm
    Fabulous! Thanks Tony, that makes perfect sense.

    Regards,

    Chris
    >

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedOct 14, '09 at 12:01p
activeOct 14, '09 at 12:57p
posts3
users2
websiterabbitmq.com
irc#rabbitmq

People

Translate

site design / logo © 2022 Grokbase