简体   繁体   中英

Handshake_timeout on RabbitMQ using python and pika from remote vm

I have several vm's around the world, all identical and with the same python code (And same library version of pika 0.9.13). Only one of them is failing because of handshake_timeout:

=ERROR REPORT==== 17-Jun-2015::12:27:07 ===
closing AMQP connection <0.290.0> (YY.YY.YY.YY:47232 -> XX.XX.XX.XX:5672):
{handshake_timeout,handshake}

that is taken from the rabbitMQ log, in the client code I see something like

ERROR:pika.adapters.base_connection:Connection to XX.XX.XX.XX:5672 failed: timeout
Unhandled exception in thread started by <function listen_for_start_download_message at 0x1e5bcf8>

I have tested the connection with telnet following this guide: http://rubybunny.info/articles/troubleshooting.html

I already increased the handshake_timeout to 40000 milliseconds and the ssl_handshake_timeout to 20000 milliseconds and the error persists, the ping to the rabbitmq server from that machine is a little bit higher than in the other machines but nothing abnormal (136ms). Has anyone found a similar problem sometime or can anyone recommend another way to test the rabbitMQ connection?

I'm really not sure if this could be the solution to anyone with this problem but in my case the problem was resolved by installing these libraries on the problematic vm's: amqp-tools and librabbitmq1 simply using apt-get install. I have no idea why the other vms had those libraries and the problematic ones did not but that was the case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM