fedora-messaging icon indicating copy to clipboard operation
fedora-messaging copied to clipboard

An unexpected AMQP error occurred

Open dustymabe opened this issue 5 years ago • 1 comments

fedora-messaging-1.6.0-1.fc30.noarch

I set up a listener to listen to all messages "#" and then ran it overnight. I had this pop up in the logs several times and was asked to open a bug for it:

[ERROR fedora_messaging.twisted.protocol] An unexpected AMQP error occurred; the connection should restart, but please report this as a bug.
Traceback (most recent call last):
  File "/usr/lib64/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/python3.7/site-packages/fedora_messaging/twisted/protocol.py", line 277, in _read
    yield channel.basic_ack(delivery_tag=delivery_frame.delivery_tag)                                                                                                                                              
  File "/usr/lib/python3.7/site-packages/pika/adapters/twisted_connection.py", line 338, in basic_ack
    delivery_tag=delivery_tag, multiple=multiple)                                                                                                                                               
  File "/usr/lib/python3.7/site-packages/pika/channel.py", line 202, in basic_ack
    self._raise_if_not_open()
  File "/usr/lib/python3.7/site-packages/pika/channel.py", line 1389, in _raise_if_not_open
    raise exceptions.ChannelWrongStateError('Channel is closed.')
pika.exceptions.ChannelWrongStateError: Channel is closed.

The connection did resume and it seems like everything continued to work.

dustymabe avatar May 22 '19 13:05 dustymabe

I think there are two things that need to get fixed here:

  1. Ack failures should be handled more gracefully in the read loop.

  2. Something failed earlier on (which is why the channel is closed) and it wasn't noticed until an ack occurred. It might just be that the connection got closed while the callback was running, but it's worth a closer examination.

jeremycline avatar May 24 '19 16:05 jeremycline