I'm trying to connect to RabbitMQ server but always got these errors:
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.
And
.../.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)
I'm using Ruby 2.1.2, RabbitMQ 3.5.6 on MAC OS. Sorry I'm the newbie in RabbitMQ, just trying to use it but cant handle the issue. Please give me some advises.
this is probably becuase you either did not pass username and password or passed wrong ones.
The defaults are guest and guest both for username and password.
Try to initialize the connection like this:
conn = Bunny.new(host: 'localhost',
port: '5672',
vhost: '/',
user: 'guest',
pass: 'guest')
conn.start
and see what happens
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With