NodeBB could not connect to your Mongo database. Mongo returned the following error: Authentication failed.
-
No matter what I do I cannot connect to the mongodb.
I have tried setting auth=true in /etc/mongod.conf, setting readAnyDatabase and readWriteAnyDatabase on admin. I have also add user for the specific database and given permissions, yet everytime I run ./nodebb setup I get the following error
make: *** [Release/obj.target/kerberos/lib/kerberos.o] Error 1
make: Leaving directory/home/nodeside/nodebb/node_modules/mongodb/node_modules/kerberos/build' gyp ERR! build error gyp ERR! stack Error:
make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/nodeside/nodebb/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-57-generic
gyp ERR! command "node" "/home/nodeside/nodebb/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/nodeside/nodebb/node_modules/mongodb/node_modules/kerberos
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
[email protected] node_modules/connect-mongo
├── [email protected]
├── [email protected] ([email protected])
└── [email protected][email protected] node_modules/mongodb
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected])
20/11 06:15 [4392] - error: NodeBB could not connect to your Mongo database. Mongo returned the following error: Authentication failed.
20/11 06:15 [4392] - warn: NodeBB Setup Aborted.
MongoError: Authentication failed.
at Function.MongoError.create (/home/nodeside/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:31:11)
at /home/nodeside/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:770:66
at Callbacks.emit (/home/nodeside/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:95:3)
at null.messageHandler (/home/nodeside/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:243:23)
at Socket.<anonymous> (/home/nodeside/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:262:22)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)Any ideas why?
-
Try connecting manually. Use the mongo client and see what that does using the creds that you are attempting to use.