简体   繁体   English

使用远程虚拟机上的python和pika在RabbitMQ上的Handshake_timeout

[英]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). 我在世界各地有几个虚拟机,它们都是相同的,并且具有相同的python代码(以及pika 0.9.13的相同库版本)。 Only one of them is failing because of handshake_timeout: 由于handhake_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 这是从rabbitMQ日志中获取的,在客户端代码中,我看到类似

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 我已按照此指南测试了与telnet的连接: 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). 我已经将handhake_timeout增加到40000毫秒,并将ssl_handshake_timeout增加到20000毫秒,并且错误仍然存​​在,从该计算机到Rabbitmq服务器的ping略高于其他计算机,但没有异常(136ms)。 Has anyone found a similar problem sometime or can anyone recommend another way to test the rabbitMQ connection? 有人在某个时候发现了类似的问题吗?有人可以推荐另一种方法来测试rabbitMQ连接吗?

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. 我真的不确定这是否可以解决任何有此问题的人,但就我而言,问题是通过仅使用apt-get install在有问题的vm上安装这些库来解决的:amqp-tools和librabbitmq1。 I have no idea why the other vms had those libraries and the problematic ones did not but that was the case. 我不知道为什么其他vm拥有那些库,而有问题的vm没有,但是事实就是如此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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