Unable to start graylog because mongodb


#1

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. :frowning:

I already grant dbAdmin to graylog user on mongodb, but i still hit this access right issue.

Help would be appreciated. Thanks


(Mariusgeonea) #2

try to use this as a tip for your config

and this link for the graylog config


(Jan Doberstein) #3

I already grant dbAdmin to graylog user on mongodb, but i still hit this access right issue.

But you did not use a USER in your connection string. You connect without any user/password credentials.

Please look at the configuration that share some examples how to use user/password


(system) #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.