我正在尝试连接到RabbitMQ服务器,但总是收到以下错误:
W, [2015-12-08T15:38:01.993251 #37405] WARN -- #<Bunny::Session:0x7fe07b894f78 guest@localhost:5672, vhost=/dev_prod, addresses=[localhost:5672]>: An empty frame was received while opening the connection. In RabbitMQ <= 3.1 this could mean an authentication issue.和
.../.rvm/gems/ruby-2.1.2/gems/bunny-2.2.0/lib/bunny/session.rb:315:in `rescue in start': Could not establish TCP connection to any of the configured hosts (Bunny::TCPConnectionFailedForAllHosts)我在MAC上使用的是Ruby2.1.2,RabbitMQ 3.5.6。对不起,我是RabbitMQ的新手,只是想用它,但无法处理这个问题。请给我一些建议。
发布于 2017-11-15 19:19:24
这可能是因为您没有传递用户名和密码,或者传递了错误的用户名和密码。
用户名和密码的默认值均为guest和guest。
尝试像这样初始化连接:
conn = Bunny.new(host: 'localhost',
port: '5672',
vhost: '/',
user: 'guest',
pass: 'guest')
conn.start看看会发生什么
https://stackoverflow.com/questions/34151450
复制相似问题