eandersson / amqpstorm

Thread-safe Python RabbitMQ Client & Management library
https://www.amqpstorm.io/
MIT License
186 stars 36 forks source link

heartbeat error #70

Closed berlinguyinca closed 5 years ago

berlinguyinca commented 5 years ago

dear all,

I have a very simple publish example and running into this error Could you advise?

self.channel.basic.publish(body=content, exchange=destination, routing_key=destination)

File "/usr/local/lib/python3.6/site-packages/amqpstorm/basic.py", line 199, in publish self._channel.write_frames(frames_out) File "/usr/local/lib/python3.6/site-packages/amqpstorm/channel.py", line 353, in write_frames self.check_for_errors() File "/usr/local/lib/python3.6/site-packages/amqpstorm/channel.py", line 183, in check_for_errors self._connection.check_for_errors() File "/usr/local/lib/python3.6/site-packages/amqpstorm/connection.py", line 186, in check_for_errors raise self.exceptions[0] File "/rtmtb/rtmtb/strategy/strategy_consumer.py", line 382, in work self.send_to_output(signal=signal, dest_idx=0) File "/rtmtb/rtmtb/consumer.py", line 67, in send_to_output self.message.publish(self.destination[dest_idx], signal._asdict()) File "/rtmtb/rtmtb/advisors/message/rabbit_storm.py", line 59, in publish self.channel.basic.publish(body=content, exchange=destination, routing_key=destination) File "/usr/local/lib/python3.6/site-packages/amqpstorm/basic.py", line 199, in publish self._channel.write_frames(frames_out) File "/usr/local/lib/python3.6/site-packages/amqpstorm/channel.py", line 353, in write_frames self.check_for_errors() File "/usr/local/lib/python3.6/site-packages/amqpstorm/channel.py", line 183, in check_for_errors self._connection.check_for_errors() File "/usr/local/lib/python3.6/site-packages/amqpstorm/connection.py", line 186, in check_for_errors raise self.exceptions[0] File "/rtmtb/rtmtb/strategy/strategy_consumer.py", line 382, in work self.send_to_output(signal=signal, dest_idx=0) File "/rtmtb/rtmtb/consumer.py", line 67, in send_to_output self.message.publish(self.destination[dest_idx], signal._asdict()) File "/rtmtb/rtmtb/advisors/message/rabbit_storm.py", line 59, in publish self.channel.basic.publish(body=content, exchange=destination, routing_key=destination) File "/usr/local/lib/python3.6/site-packages/amqpstorm/basic.py", line 199, in publish self._channel.write_frames(frames_out) File "/usr/local/lib/python3.6/site-packages/amqpstorm/channel.py", line 353, in write_frames self.check_for_errors() File "/usr/local/lib/python3.6/site-packages/amqpstorm/channel.py", line 183, in check_for_errors self._connection.check_for_errors() File "/usr/local/lib/python3.6/site-packages/amqpstorm/connection.py", line 186, in check_for_errors raise self.exceptions[0] File "/rtmtb/rtmtb/strategy/strategy_consumer.py", line 382, in work self.send_to_output(signal=signal, dest_idx=0) File "/rtmtb/rtmtb/consumer.py", line 67, in send_to_output self.message.publish(self.destination[dest_idx], signal._asdict()) File "/rtmtb/rtmtb/advisors/message/rabbit_storm.py", line 59, in publish self.channel.basic.publish(body=content, exchange=destination, routing_key=destination) File "/usr/local/lib/python3.6/site-packages/amqpstorm/basic.py", line 199, in publish self._channel.write_frames(frames_out) File "/usr/local/lib/python3.6/site-packages/amqpstorm/channel.py", line 353, in write_frames self.check_for_errors() File "/usr/local/lib/python3.6/site-packages/amqpstorm/channel.py", line 183, in check_for_errors self._connection.check_for_errors() File "/usr/local/lib/python3.6/site-packages/amqpstorm/connection.py", line 186, in check_for_errors raise self.exceptions[0] File "/rtmtb/rtmtb/strategy/strategy_consumer.py", line 382, in work self.send_to_output(signal=signal, dest_idx=0) File "/rtmtb/rtmtb/consumer.py", line 67, in send_to_output self.message.publish(self.destination[dest_idx], signal._asdict()) File "/rtmtb/rtmtb/advisors/message/rabbit_storm.py", line 59, in publish self.channel.basic.publish(body=content, exchange=destination, routing_key=destination) File "/usr/local/lib/python3.6/site-packages/amqpstorm/basic.py", line 199, in publish self._channel.write_frames(frames_out) File "/usr/local/lib/python3.6/site-packages/amqpstorm/channel.py", line 353, in write_frames self.check_for_errors() File "/usr/local/lib/python3.6/site-packages/amqpstorm/channel.py", line 183, in check_for_errors self._connection.check_for_errors() File "/usr/local/lib/python3.6/site-packages/amqpstorm/connection.py", line 186, in check_for_errors raise self.exceptions[0] amqpstorm.exception.AMQPConnectionError: Connection dead, no heartbeat or data received in >= 120s

eandersson commented 5 years ago

Thanks - I'll try to look into this soon.

eandersson commented 5 years ago

What version of RabbitMQ are you running here?

berlinguyinca commented 5 years ago

currently 3.7.12

On Thu, Mar 7, 2019 at 7:07 PM Erik Olof Gunnar Andersson < notifications@github.com> wrote:

What version of RabbitMQ are you running here?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eandersson/amqpstorm/issues/70#issuecomment-470788066, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA_7H-nwgrQf5y4CpbJJNfaswxgxDubks5vUdPhgaJpZM4bbJpv .

--

Lead Developer - Fiehnlab, UC Davis

gert wohlgemuth

work: http://fiehnlab.ucdavis.edu/staff/wohlgemuth

phone: 530 665 9477

coding blog: http://codingandmore.blogspot.com

linkedin: http://www.linkedin.com/profile/view?id=28611299&trk=tab_pro

eandersson commented 5 years ago

Could you paste the amqpstorm DEBUG logs? Also, is this single threaded? or multi-threaded? Finally, does enabling confirm deliveries on each of your channel make a difference?

channel.confirm_deliveries()

Oh, and is this a SSL connection?

berlinguyinca commented 5 years ago

I apologize for the late reply and we just solved this. It turned out to be an asymmetric routing issue in the network.