Pika Consumer RxEndofFile Exception

726 views
Skip to first unread message

Bailey

unread,
Jan 18, 2023, 5:06:50 AM1/18/23
to rabbitmq-users
Hi,

We have a Pika RabbitMQ consumer setup and have recently started receiving 'RxEndofFile' exceptions on some of our queues around 1-3 times per hour however there appears to be no pattern. This exception causes our connection to close. From what little I understand, this exception is raised when the connection socket starts receiving empty bytes.

Please find the stack trace below:

```
pika.adapters.utils.io_services_utils._AsyncTransportBase.RxEndOfFile: [Errno -1] End of input stream (EOF) 2023-01-12 04:19:35,754 - pika.adapters.utils.io_services_utils - 140330070439680 - INFO - _AsyncTransportBase._initate_abort(): Initiating abrupt asynchronous transport shutdown: state=1; error=RxEndOfFile(-1, 'End of input stream (EOF)'); <ssl.SSLSocket fd=24, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('172.29.10.252', 55038), raddr=('172.30.4.96', 6671)> 2023-01-12 04:19:35,754 - pika.adapters.utils.io_services_utils - 140330070439680 - INFO - Deactivating transport: state=1; <ssl.SSLSocket fd=24, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('172.29.10.252', 55038), raddr=('172.30.4.96', 6671)> 2023-01-12 04:19:35,755 - pika.adapters.base_connection - 140330070439680 - ERROR - connection_lost: StreamLostError: ("Stream connection lost: RxEndOfFile(-1, 'End of input stream (EOF)')",) 2023-01-12 04:19:35,755 - pika.connection - 140330070439680 - INFO - AMQP stack terminated, failed to connect, or aborted: opened=True, error-arg=StreamLostError: ("Stream connection lost: RxEndOfFile(-1, 'End of input stream (EOF)')",); pending-error=None 2023-01-12 04:19:35,755 - pika.connection - 140330070439680 - INFO - Stack terminated due to StreamLostError: ("Stream connection lost: RxEndOfFile(-1, 'End of input stream (EOF)')",) 2023-01-12 04:19:35,755 - pika.adapters.utils.io_services_utils - 140330070439680 - INFO - Closing transport socket and unlinking: state=2; <ssl.SSLSocket fd=24, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('172.29.10.252', 55038), raddr=('172.30.4.96', 6671)> 2023-01-12 04:19:35,756 - pika.adapters.blocking_connection - 140330070439680 - ERROR - Unexpected connection close detected: StreamLostError: ("Stream connection lost: RxEndOfFile(-1, 'End of input stream (EOF)')",) 2023-01-12 04:19:35,757 - connectormodules.consumer - 140330070439680 - ERROR - Experienced exception when consuming raw message from queueException is: Stream connection lost: RxEndOfFile(-1, 'End of input stream (EOF)')Traceback is: Traceback (most recent call last): File "/home/python/connectormodules/consumer.py", line 197, in _run_message_consumption for message in channel.consume(queue_name, inactivity_timeout=10): File "/home/python/.local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 2009, in consume self._process_data_events(time_limit=delta) File "/home/python/.local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 2044, in _process_data_events self.connection.process_data_events(time_limit=time_limit) File "/home/python/.local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 845, in process_data_events self._flush_output(timer.is_ready, common_terminator) File "/home/python/.local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 523, in _flush_output raise self._closed_result.value.error pika.exceptions.StreamLostError: Stream connection lost: RxEndOfFile(-1, 'End of input stream (EOF)')
```

Any pointers/directions on where to start looking would be much appreciated as there doesn't seem to be much information regarding this exception online.

Regards,

Bailey




Luke Bakken

unread,
Jan 18, 2023, 2:14:23 PM1/18/23
to rabbitmq-users
Hi Bailey,

Just curious, have you asked this question elsewhere, like Stack Overflow? I'm just trying to keep track of where I'm helping people out.

Please provide the following information:
  • Python version
  • Pika version
  • RabbitMQ version
  • Erlang version
  • Operating system used for your Python application as well as RabbitMQ
  • IMPORTANT: RabbitMQ log messages around the time of these exceptions
Thanks,
Luke
Reply all
Reply to author
Forward
0 new messages