Hi,
I setup graylog in one server and mongodb in another server.
My connection string in graylog.conf is as below :
mongodb_uri = mongodb://hostname.com:27001/graylog
I am able to connect to mongodb, but i hit some errors when starting graylog server.
Below is my startup log.
2018-06-29 17:57:22,441 ERROR: org.graylog2.bootstrap.CmdLineTool - Guice error (more detail on log level debug): Error injecting constructor, com.mongodb.MongoCommandException: Command failed with error 13: ‘not authorized on graylog to execute command { createIndexes: “roles”, indexes: [ { key: { name_lower: 1 }, name: “name_lower_1”, ns: “graylog.roles”, unique: true } ] }’ on server hostname:27001. The full response is { “ok” : 0.0, “errmsg” : “not authorized on graylog to execute command { createIndexes: “roles”, indexes: [ { key: { name_lower: 1 }, name: “name_lower_1”, ns: “graylog.roles”, unique: true } ] }”, “code” : 13, “codeName” : “Unauthorized” }
2018-06-29 17:57:22,442 ERROR: org.graylog2.commands.Server -
################################################################################
ERROR: Unable to connect to MongoDB. Is it running and the configuration correct?
Details: Command failed with error 13: ‘not authorized on graylog to execute command { createIndexes: “pipeline_processor_pipelines”, indexes: [ { key: { title: 1 }, name: “title_1”, ns: “graylog.pipeline_processor_pipelines”, unique: true } ] }’ on server hostname:27001. The full response is { “ok” : 0.0, “errmsg” : “not authorized on graylog to execute command { createIndexes: “pipeline_processor_pipelines”, indexes: [ { key: { title: 1 }, name: “title_1”, ns: “graylog.pipeline_processor_pipelines”, unique: true } ] }”, “code” : 13, “codeName” : “Unauthorized” }
Terminating.
I already grant dbAdmin to graylog user on mongodb, but i still hit this access right issue.
Help would be appreciated. Thanks