我正在使用寶石amqp
寶石。我運行了一個AMQP.start
事件循環,但在循環過程中'突然it raised a
PossibleAuthenticationFailureError`。突然PossibleAuthenticationFailureError in amqp
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
還有其他可能的原因嗎?
你有沒有想過這個?我看到了同樣的問題。 – Nathan 2013-01-30 19:41:13