加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – RabbitMQ 3.5.6无法与任何配置的主机建立TCP连

发布时间:2020-12-17 01:56:12 所属栏目:百科 来源:网络整理
导读:我正在尝试连接到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
我正在尝试连接到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 OS上使用Ruby 2.1.2,RabbitMQ 3.5.6.
对不起,我是RabbitMQ的新手,只是试图使用它,但无法处理这个问题.
请给我一些建议.

解决方法

这可能是因为你没有通过用户名和密码或传递错误的.

用户名和密码的默认值为guest和guest.

尝试初始化连接,如下所示:

conn = Bunny.new(host:  'localhost',port:  '5672',vhost: '/',user:  'guest',pass:  'guest')
 conn.start

看看会发生什么

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读