将 sensu-client 连接到服务器时用于 AMQP 连接的 bad_header [英] bad_header for AMQP connection while connecting sensu-client to server
问题描述
我已经安装了带有厨师社区食谱的 sensu.但是,sensu 客户端无法连接到服务器.导致rabbitmq 连接错误,尝试连接时消息超时
I have installed sensu with chef community cookbook. However, sensu client fails to connect to server. Results in rabbitmq connection error with message timed out while attempting to connect
这里是详细的客户端日志
Here are detailed client logs
来自 sensu-client.log 的日志
logs from sensu-client.log
"timestamp":"2014-07-08T12:39:33.982647+0000","level":"warn","message":"config file applied changes","config_file":"/etc/sensu/conf.d/config.json","changes":{"rabbitmq":{"heartbeat":[null,20]},"client":[null,{"name":"girija-sensu-client","address":"test sensu client","subscriptions":["test-node"]}],"version":[null,"0.12.6-4"]}}
{"timestamp":"2014-07-08T12:39:33.996680+0000","level":"info","message":"loaded extension","type":"mutator","name":"only_check_output","description":"returns check output"}
{"timestamp":"2014-07-08T12:39:34.000721+0000","level":"info","message":"loaded extension","type":"handler","name":"debug","description":"outputs json event data"}
{"timestamp":"2014-07-08T12:39:34.104300+0000","level":"warn","message":"reconnecting to rabbitmq"}
{"timestamp":"2014-07-08T12:39:39.108623+0000","level":"warn","message":"reconnecting to rabbitmq"}
{"timestamp":"2014-07-08T12:39:44.111818+0000","level":"warn","message":"reconnecting to rabbitmq"}
{"timestamp":"2014-07-08T12:39:49.115250+0000","level":"warn","message":"reconnecting to rabbitmq"}
{"timestamp":"2014-07-08T12:39:54.045648+0000","level":"fatal","message":"rabbitmq connection error","error":"timed out while attempting to connect"}
来自服务器的 Rabbitmq 日志显示以下错误
Rabbitmq logs from server show following error
=INFO REPORT==== 8-Jul-2014::12:39:54 ===
accepting AMQP connection <0.395.0> (10.254.153.131:42813 -> 10.254.130.25:5672)
=ERROR REPORT==== 8-Jul-2014::12:39:54 ===
closing AMQP connection <0.395.0> (10.254.153.131:42813 -> 10.254.130.25:5672):
{bad_header,<<129,15,1,3,3,0,246,0>>}
我在 AWS 上的 CentOS 6.4 上运行它RabbitMQ 版本 3.0.4Erlang_version,"Erlang R14B04 (erts-5.8.5) [source] [64-bit] [rq:1] [async-threads:30] [kernel-poll:true]\n"},
I am running this on CentOS 6.4 on AWS Rabbitmq version 3.0.4 Erlang_version, "Erlang R14B04 (erts-5.8.5) [source] [64-bit] [rq:1] [async-threads:30] [kernel-poll:true]\n"},
bad_header 表明客户端和代理 AMQP 版本不匹配.找出 AMQP 版本并解决此问题的任何帮助
bad_header suggests mismatch for client and broker AMQP version. Any help for finding out AMQP version and fixing this problem
推荐答案
这个问题是在我的情况下引起的,当我的客户端被配置为使用 ssl 身份验证,但 rabbitmq 服务器没有正确配置为使用 ssl 而是期待没有 ssl 的普通"用户/密码登录.
This issue was caused, in my case, when my client was configured to use ssl authentication, but the rabbitmq server was not properly configured to use ssl and instead was expecting "plain" user/pass login with no ssl.
这篇关于将 sensu-client 连接到服务器时用于 AMQP 连接的 bad_header的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!