Can't start and setup NodeBB
-
Hello, community.
I am new to NodeJS and it's ecosystem. So sorry in advance.
I am trying to install setup and run NodeBB engine, it looks so good. But I have problems from the start. Hoping you can help me.So, after I made all from Installation Guide, I am stuck on a moment when I must setup NodeBB with "node app --setup". After I run this (Ubuntu) it gives me an error:
[ERROR-Server:19654] 1468872592184 [1] failed to authenticate against server 127.0.0.1:27017 { type: 'error',
message: '[1] failed to authenticate against server 127.0.0.1:27017',
className: 'Server',
pid: 19654,
date: 1468872592184 }
18/7 23:09 [19654] - error: NodeBB could not connect to your Mongo database. Mongo returned the following error: could not authenticate
18/7 23:09 [19654] - warn: NodeBB Setup Aborted.
MongoError: could not authenticate
at /home/fnk/nodebb/nodebb/node_modules/mongodb-core/lib/topologies/server.js:1492:28
at /home/fnk/nodebb/nodebb/node_modules/mongodb-core/lib/topologies/server.js:1473:23
at ScramSHA1.auth (/home/fnk/nodebb/nodebb/node_modules/mongodb-core/lib/auth/scram.js:109:25)
at authenticate (/home/fnk/nodebb/nodebb/node_modules/mongodb-core/lib/topologies/server.js:1471:42)
at Timeout._onTimeout (/home/fnk/nodebb/nodebb/node_modules/mongodb-core/lib/topologies/server.js:1485:9)
at tryOnTimeout (timers.js:224:11)
at Timer.listOnTimeout (timers.js:198:5)"./nodebb start" command doesn't work too. What I should fix to move on?
-
Tried "node app --setup" too, nothing work. Here's full output, I choose all defaults, may be I should chose other IP and port?
fnk@fnk-XPS-L521X:~/nodebb/nodebb$ node app --setup
19/7 14:48 [5590] - info: NodeBB v1.1.0 Copyright (C) 2013-2014 NodeBB Inc.
19/7 14:48 [5590] - info: This program comes with ABSOLUTELY NO WARRANTY.
19/7 14:48 [5590] - info: This is free software, and you are welcome to redistribute it under certain conditions.
19/7 14:48 [5590] - info:
19/7 14:48 [5590] - info: NodeBB Setup Triggered via Command LineWelcome to NodeBB!
This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed.
Press enter to accept the default setting (shown in brackets).
URL used to access this NodeBB (http://localhost:4567)
Please enter a NodeBB secret (qqq111222)
Which database to use (mongo)19/7 14:48 [5590] - info: Now configuring mongo database:
Host IP or address of your MongoDB instance (127.0.0.1)
Host port of your MongoDB instance (27017)
MongoDB username (username)
Password of your MongoDB database
MongoDB database name (nodebb)
Configuration Saved OK
[ERROR-Server:5590] 1468928947368 [1] failed to authenticate against server 127.0.0.1:27017 { type: 'error',
message: '[1] failed to authenticate against server 127.0.0.1:27017',
className: 'Server',
pid: 5590,
date: 1468928947368 }
19/7 14:49 [5590] - error: NodeBB could not connect to your Mongo database. Mongo returned the following error: could not authenticate
19/7 14:49 [5590] - warn: NodeBB Setup Aborted.
MongoError: could not authenticate
at /home/fnk/nodebb/nodebb/node_modules/mongodb-core/lib/topologies/server.js:1492:28
at /home/fnk/nodebb/nodebb/node_modules/mongodb-core/lib/topologies/server.js:1473:23
at ScramSHA1.auth (/home/fnk/nodebb/nodebb/node_modules/mongodb-core/lib/auth/scram.js:109:25)
at authenticate (/home/fnk/nodebb/nodebb/node_modules/mongodb-core/lib/topologies/server.js:1471:42)
at Timeout._onTimeout (/home/fnk/nodebb/nodebb/node_modules/mongodb-core/lib/topologies/server.js:1485:9)
at tryOnTimeout (timers.js:224:11)
at Timer.listOnTimeout (timers.js:198:5) -
@jarey said in Can't start and setup NodeBB:
@zehh seems to be a problem of authentication, is the user/password of mongo correctly set? Can you access to the mongoshell throught comand line create a collection or run a simple query?
Yes, I can access to the mongoshell, can run commands there without errors. As for authorisation, I can't tell for sure, how can I check that? I used defaults without changes (press Enter during setup).
-
You have enabled MongoDB auth settings + given the right password.
security.authorization must be enabled in mongodb. This must be an auth only issue!
More info: https://docs.mongodb.com/manual/tutorial/enable-authentication/