我正在使用红宝石amqp
。我运行了一个AMQP.start
事件循环,但在循环期间出现了“突然it raised a
可能的AuthenticationFailureError”。
AMQP.start(amqp_config) do |connection|
channel = AMQP::Channel.new connection
channel.on_error do |channel, channel_close|
puts "Oops... a channel-level exception: code = #{channel_close.reply_code}, message = #{channel_close.reply_text}"
end
my_worker = MyWorker.new
my_worker.start
end
[amqp] Detected TCP connection failure
/home/raincole/.rvm/gems/ruby-1.9.3-p125/gems/amq-client-0.9.3/lib/amq/client/async/adapters/event_machine.rb:164:in `block in initialize': AMQP broker closed TCP connection before authentication succeeded: this usually means authentication failure due to misconfiguration. Settings are {:host=>"localhost", :port=>5672, :user=>"guest", :pass=>"guest", :vhost=>"/", :timeout=>nil, :logging=>false, :ssl=>false, :broker=>nil, :frame_max=>131072} (AMQP::PossibleAuthenticationFailureError)
奇怪的是,我的工人在我收到之前PossibleAuthenticationFailureError
收到了一些消息。似乎配置应该是正确的(我一遍又一遍地检查它)。
还有其他潜在的原因PossibleAuthenticationFailureError
吗?