Mongo::Auth::Unauthorized: User rhone is not authorized to access rhone_log


(zhang.yingbing) #1

who can help me?
I config the mongo output like this:
mongodb {
collection => "%{indexCollection}"
database => "rhone_log"
uri => "mongodb://rhone:hDBWc^AvInzM&7@10.4.72.171:20700,10.4.72.172:20700,10.4.70.248:20700/rhone_log?"
workers => 20
}

but sometimes has this error like this:
exception=>Mongo::Auth::Unauthorized: User rhone is not authorized to access rhone_log, :backtrace=>["/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/auth/scram/conversation.rb:445:in validate!'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/auth/scram/conversation.rb:433:invalidate_final_message!'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/auth/scram/conversation.rb:134:in finalize'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/auth/scram.rb:61:inlogin'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/server/connection.rb:64:in connect!'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/server/connectable.rb:93:inensure_connected'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/server/connection.rb:130:in write'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/server/connectable.rb:66:indispatch'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/loggable.rb:44:in log'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/loggable.rb:43:inlog'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/loggable.rb:67:in log_debug'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/server/connectable.rb:65:indispatch'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/operation/executable.rb:35:in execute'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/server/connection_pool.rb:99:inwith_connection'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/server/context.rb:63:in with_connection'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/operation/executable.rb:34:inexecute'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/operation/write/insert.rb:72:in execute_write_command'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/operation/write/insert.rb:62:inexecute'", "/opt/meituan/logstash/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/collection.rb:190:in `insert_many'",:Shared connection to relay.sankuai.com closed

when i restart the logstash, work is ok, when occur this error,then will never output to the mongo, error log is above!


(system) #2