No subject


Sun Jun 17 23:12:48 BST 2012


WireShark. For the first several thousand messages, everything looks
groovy, in particular, all Tx.Commit messages are always followed
immediately by at Tx.Commit-Ok.

However, when it dies, the sequence looks like this:

--------
No.     Time        Source                Destination           Protocol
Length Info
   3477 60.138041   192.168.78.17         192.168.78.17         AMQP
99     Basic.Ack Tx.Commit

Frame 3477: 99 bytes on wire (792 bits), 99 bytes captured (792 bits)
Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst:
00:00:00_00:00:00 (00:00:00:00:00:00)
Internet Protocol Version 4, Src: 192.168.78.17 (192.168.78.17), Dst:
192.168.78.17 (192.168.78.17)
Transmission Control Protocol, Src Port: 38680 (38680), Dst Port: amqp
(5672), Seq: 21061, Ack: 41128, Len: 33
Advanced Message Queueing Protocol
Advanced Message Queueing Protocol

No.     Time        Source                Destination           Protocol
Length Info
   3478 60.139960   192.168.78.17         192.168.78.17         AMQP
318    Basic.Deliver Content-Header Content-Body

Frame 3478: 318 bytes on wire (2544 bits), 318 bytes captured (2544 bits)
Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst:
00:00:00_00:00:00 (00:00:00:00:00:00)
Internet Protocol Version 4, Src: 192.168.78.17 (192.168.78.17), Dst:
192.168.78.17 (192.168.78.17)
Transmission Control Protocol, Src Port: amqp (5672), Dst Port: 38680
(38680), Seq: 41128, Ack: 21094, Len: 252
Advanced Message Queueing Protocol
Advanced Message Queueing Protocol
Advanced Message Queueing Protocol

No.     Time        Source                Destination           Protocol
Length Info
   3479 60.141903   192.168.78.17         192.168.78.17         AMQP
150    Basic.Publish Content-Header Content-Body

Frame 3479: 150 bytes on wire (1200 bits), 150 bytes captured (1200 bits)
Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst:
00:00:00_00:00:00 (00:00:00:00:00:00)
Internet Protocol Version 4, Src: 192.168.78.17 (192.168.78.17), Dst:
192.168.78.17 (192.168.78.17)
Transmission Control Protocol, Src Port: 38680 (38680), Dst Port: amqp
(5672), Seq: 21094, Ack: 41380, Len: 84
Advanced Message Queueing Protocol
Advanced Message Queueing Protocol
Advanced Message Queueing Protocol

No.     Time        Source                Destination           Protocol
Length Info
   3489 60.227975   192.168.78.17         192.168.78.17         AMQP
148    Connection.Close

Frame 3489: 148 bytes on wire (1184 bits), 148 bytes captured (1184 bits)
Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst:
00:00:00_00:00:00 (00:00:00:00:00:00)
Internet Protocol Version 4, Src: 192.168.78.17 (192.168.78.17), Dst:
192.168.78.17 (192.168.78.17)
Transmission Control Protocol, Src Port: amqp (5672), Dst Port: 38680
(38680), Seq: 41380, Ack: 21178, Len: 82
Advanced Message Queueing Protocol
--------

That is, it looks like a Basic.Deliver and a Basic.Publish are sneaking in
before the Tx.Commit-Ok comes back.

I suspect this is a Pika issue, but my reading of the code doesn't show any
obvious problems.

Thanks,

Matt

--047d7b5d9ce7397a8104c76641a6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I have a simple, single threaded program using Pika's SelectConnection =
with RabbitMQ 2.8.5 that simply listens for request messages and replies to=
 them.<br><br>This code generally works - It can receive many thousands of =
messages=20
before it croaks. When it does croak, it&#39;s with the following error:<br=
>
<br>
<b>CHANNEL_ERROR - unexpected command while processing &#39;tx.commit&#39;<=
br><br></b>The code looks like this:<br><br>def handle_delivery(channel, me=
thod, header, body):<br>=A0=A0=A0 print &quot;Received message&quot;<br><br=
>
=A0=A0=A0 channel.tx_select()<br>=A0=A0=A0 channel.basic_publish(exchange=
=3D&quot;skytap&quot;,<br>=A0=A0=A0=A0=A0=A0=A0 routing_key=3D&#39;foo.bar&=
#39;,<br>=A0=A0=A0=A0=A0=A0=A0 body=3D&#39;reply&#39;,<br>=A0=A0=A0=A0=A0=
=A0=A0 mandatory=3DTrue,<br>=A0=A0=A0=A0=A0=A0=A0 properties=3DBasicPropert=
ies(delivery_mode=3D2))<br>
=A0=A0=A0 channel.tx_commit()<br><br>=A0=A0=A0 channel.tx_select()<br>=A0=
=A0=A0 channel.basic_ack(delivery_tag=3Dmethod.delivery_tag)<br>=A0=A0=A0 c=
hannel.tx_commit()<br><br>From looking at the code, nothing&#39;s obviously=
 wrong so I fired up WireShark. For the first several thousand messages, ev=
erything looks groovy, in particular, all Tx.Commit messages are always fol=
lowed immediately by at Tx.Commit-Ok.<br>
<br>However, when it dies, the sequence looks like this:<br><br>--------<br=
>No.=A0=A0=A0=A0 Time=A0=A0=A0=A0=A0=A0=A0 Source=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0 Destination=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Protocol Le=
ngth Info<br>=A0=A0 3477 60.138041=A0=A0 192.168.78.17=A0=A0=A0=A0=A0=A0=A0=
=A0 192.168.78.17=A0=A0=A0=A0=A0=A0=A0=A0 AMQP=A0=A0=A0=A0 99=A0=A0=A0=A0 B=
asic.Ack Tx.Commit <br>
<br>Frame 3477: 99 bytes on wire (792 bits), 99 bytes captured (792 bits)<b=
r>Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst: 00:00:00_00=
:00:00 (00:00:00:00:00:00)<br>Internet Protocol Version 4, Src: 192.168.78.=
17 (192.168.78.17), Dst: 192.168.78.17 (192.168.78.17)<br>
Transmission Control Protocol, Src Port: 38680 (38680), Dst Port: amqp (567=
2), Seq: 21061, Ack: 41128, Len: 33<br>Advanced Message Queueing Protocol<b=
r>Advanced Message Queueing Protocol<br><br>No.=A0=A0=A0=A0 Time=A0=A0=A0=
=A0=A0=A0=A0 Source=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Destinatio=
n=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Protocol Length Info<br>
=A0=A0 3478 60.139960=A0=A0 192.168.78.17=A0=A0=A0=A0=A0=A0=A0=A0 192.168.7=
8.17=A0=A0=A0=A0=A0=A0=A0=A0 AMQP=A0=A0=A0=A0 318=A0=A0=A0 Basic.Deliver Co=
ntent-Header Content-Body <br><br>Frame 3478: 318 bytes on wire (2544 bits)=
, 318 bytes captured (2544 bits)<br>Ethernet II, Src: 00:00:00_00:00:00 (00=
:00:00:00:00:00), Dst: 00:00:00_00:00:00 (00:00:00:00:00:00)<br>
Internet Protocol Version 4, Src: 192.168.78.17 (192.168.78.17), Dst: 192.1=
68.78.17 (192.168.78.17)<br>Transmission Control Protocol, Src Port: amqp (=
5672), Dst Port: 38680 (38680), Seq: 41128, Ack: 21094, Len: 252<br>Advance=
d Message Queueing Protocol<br>
Advanced Message Queueing Protocol<br>Advanced Message Queueing Protocol<br=
><br>No.=A0=A0=A0=A0 Time=A0=A0=A0=A0=A0=A0=A0 Source=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 Destination=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Protocol=
 Length Info<br>=A0=A0 3479 60.141903=A0=A0 192.168.78.17=A0=A0=A0=A0=A0=A0=
=A0=A0 192.168.78.17=A0=A0=A0=A0=A0=A0=A0=A0 AMQP=A0=A0=A0=A0 150=A0=A0=A0 =
Basic.Publish Content-Header Content-Body <br>
<br>Frame 3479: 150 bytes on wire (1200 bits), 150 bytes captured (1200 bit=
s)<br>Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst: 00:00:0=
0_00:00:00 (00:00:00:00:00:00)<br>Internet Protocol Version 4, Src: 192.168=
.78.17 (192.168.78.17), Dst: 192.168.78.17 (192.168.78.17)<br>
Transmission Control Protocol, Src Port: 38680 (38680), Dst Port: amqp (567=
2), Seq: 21094, Ack: 41380, Len: 84<br>Advanced Message Queueing Protocol<b=
r>Advanced Message Queueing Protocol<br>Advanced Message Queueing Protocol<=
br>
<br>No.=A0=A0=A0=A0 Time=A0=A0=A0=A0=A0=A0=A0 Source=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 Destination=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Protocol=
 Length Info<br>=A0=A0 3489 60.227975=A0=A0 192.168.78.17=A0=A0=A0=A0=A0=A0=
=A0=A0 192.168.78.17=A0=A0=A0=A0=A0=A0=A0=A0 AMQP=A0=A0=A0=A0 148=A0=A0=A0 =
Connection.Close <br><br>Frame 3489: 148 bytes on wire (1184 bits), 148 byt=
es captured (1184 bits)<br>
Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst: 00:00:00_00:0=
0:00 (00:00:00:00:00:00)<br>Internet Protocol Version 4, Src: 192.168.78.17=
 (192.168.78.17), Dst: 192.168.78.17 (192.168.78.17)<br>Transmission Contro=
l Protocol, Src Port: amqp (5672), Dst Port: 38680 (38680), Seq: 41380, Ack=
: 21178, Len: 82<br>
Advanced Message Queueing Protocol<br>--------<br><br>That is, it looks lik=
e a Basic.Deliver and a Basic.Publish are sneaking in before the Tx.Commit-=
Ok comes back.<br><br>I suspect this is a Pika issue, but my reading of the=
 code doesn&#39;t show any obvious problems.<br>
<br>Thanks,<br><br>Matt<br><br>

--047d7b5d9ce7397a8104c76641a6--


More information about the rabbitmq-discuss mailing list