Authentication Failed
-
I'm getting the following message when I run
./nodebb setup
23/2 14:56:21 [6251] - info: NodeBB Setup Triggered via Command Line Welcome 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). 23/2 14:56:21 [6251] - info: Now configuring mongo database: Configuration Saved OK 23/2 14:56:22 [6251] - error: NodeBB could not connect to your Mongo database. Mongo returned the following error: Authentication failed. 23/2 14:56:22 [6251] - warn: NodeBB Setup Aborted. MongoError: Authentication failed. at Function.MongoError.create (/home/ubuntu/nodebb/node_modules/mongodb-core/lib/error.js:31:11) at /home/ubuntu/nodebb/node_modules/mongodb-core/lib/connection/pool.js:497:72 at authenticateStragglers (/home/ubuntu/nodebb/node_modules/mongodb-core/lib/connection/pool.js:443:16) at Connection.messageHandler (/home/ubuntu/nodebb/node_modules/mongodb-core/lib/connection/pool.js:477:5) at Socket.<anonymous> (/home/ubuntu/nodebb/node_modules/mongodb-core/lib/connection/connection.js:321:22) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at Socket.Readable.push (_stream_readable.js:134:10) at TCP.onread (net.js:559:20)
I'm particularly concerned with the error. I'm able to log in to the nodebb db in mongo using
nodebb
as username and using my password -
Yes ... yes it does.
"url": "http://localhost:4567", "secret": "<series of numbers and letters here>", "database": "mongo", "port": 4567, "mongo": { "host": "127.0.0.1", "port": "27017", "username": "<it has my username here>", "password": "<it has my password here>", "database": "nodebb" }
-
@arkoma that error means that mongo is not accepting the credentials you provided. So either you set up mongo wrong, or you have nodebb the won't credentials.
Beyond that, we can't really help you, as this isn't caused by NodeBB.
-
May be faster for you to figure out the correct credentials using the CLI:
mongo --username <yourusername> --password <yourpass>
Also worth attempting to connect with no credentials, on the off-chance you haven't correctly enabled authentication.
mongo
If you can't figure out the correct credentials, you can set up another set with this official doc.
-
I finally got past this error.
It took a couple of uninstalls and reinstalls of mongo until i finally got the details right.but now I have a new problem
I'm still working my way through the install guide which BTW doesn't look like it's rendering correctly on my browser but that's beside the point
I got to the part where I setup a nodebb.service file.
This is what my nodebb.service file looks like[Service] Type=simple User=nodebb StandardOutput=syslog StandardError=syslog SyslogIdentifier=nodebb Environment=NODE_ENV=production WorkingDirectory=/home/ubuntu/nodebb ExecStart=/usr/bin/node loader.js –no-daemon –no-silent Restart=always [Install] WantedBy=multi-user.target
-
Does this seem correct?
-
When I go to the next step and run
sudo systemctl enable nodebb
, I get this message:Failed to execute operation: Bad message
-
-
@arkoma Nah, you're missing some of the line breaks:
[Unit] Description=NodeBB Documentation=https://docs.nodebb.org After=system.slice multi-user.target mongod.service [Service] Type=simple User=nodebb StandardOutput=syslog StandardError=syslog SyslogIdentifier=nodebb WorkingDirectory=/path/to/nodebb ExecStart=/usr/bin/env node loader.js --no-silent --no-daemon Restart=always [Install] WantedBy=multi-user.target
Try a different browser? Which install guide are you using?
-
@julian I'm using this guide https://nodebb.readthedocs.io/en/latest/installing/os/ubuntu.html
I'm looking at it in Chrome on Linux Mint Ubuntu 16.04 LTS
I put in the line breaks
I notice that you don't have this line that I do
Environment=NODE_ENV=production
-
-
Your AWS instance has an IP address or maybe even a normal address. You can use that to connect on port
4567
-
@pitaj Yeah, that's not working. Most likely I don't know what I'm doing, but it just times out.
This is what I have in the console
9/3 03:16:20 [1786] - info: NodeBB Ready 9/3 03:16:20 [1786] - info: Enabling 'trust proxy' 9/3 03:16:20 [1786] - info: NodeBB is now listening on: 0.0.0.0:4567
I go here
http://ec2-34-213-181-70.us-west-2.compute.amazonaws.com:4567/and it just hangs
-
I finally figured it out.
It's up and running at
http://34.217.204.98:4567/Although I get a message saying "looks like your connection to nodebb was lost" hmm... I'm going to have to search for another thread related to that.