[rabbitmq-discuss] Getting Transport endpoint is not connected error
Michael Klishin
michael at rabbitmq.com
Mon Sep 30 12:23:54 BST 2013
On sep 30, 2013, at 3:03 p.m., Mandy <mandyce2006 at gmail.com> wrote:
> In log I found following error :
>
> =ERROR REPORT==== 30-Sep-2013::13:59:39 ===
> AMQP connection <0.261.0> (running), channel 1 - error:
> {amqp_error,unexpected_frame,
> "expected content header for class 60, got non content header
> frame instead",
> 'basic.publish'}
So yes, RabbitMQ closes the connection due to a connection-level error
with frame interleaving. It's very likely that you are publishing on the same
channel from multiple threads. This is a bad idea (unless you take care of
synchronization in your own code).
To be more specific: every time you publish a non-empty message,
your client sends 3 (or more) frames on the wire:
[method: basic.publish] [content headers] [content body]+
When publishing on the same channel from multiple threads,
you may end up with incorrect interleaving, e.g.
[method: basic.publish] [content headers] [method: basic.publish] [content body] [content headers] [content body]
RabbitMQ cannot parse this frame sequence and raises a fatal error. The solution
is to either
* Avoid publishing on *the same* channel from multiple threads
* Synchronize publishing in your own code
> I can't use Pika, since I am using Rabbit MQ within my application.
Sorry, this does not make sense to me. Pika is the RabbitMQ client used in the official
tutorials:
http://www.rabbitmq.com/getstarted.html
I highly recommend giving Pika a try if you communicate RabbitMQ from a Python app.
MK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130930/a3888dda/attachment.pgp>
More information about the rabbitmq-discuss
mailing list