[3918] - error: NodeBB could not connect to your Mongo database. Mongo returned the following error: Authentication failed.

Technical Support
  • Hi,

    Trying to get NodeBB installed on an Amazon (Linux) EC2 that also has MongoDB on it.

    When I run ./nodebb setup I get error

    MongoError: Authentication failed.
    at Function.MongoError.create (/home/ec2-user/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:31:11)

    I can successfully log in to mongo with same credentials

    mongo --host -u xxxx -p 'xxxxxx' --authenticationDatabase 'admin'

    Any ideas where I might be going wrong?

    Thanks in advance


  • Just a user on the actual nodebb database issue. (had to create one as opposed to trying to use the Global Admin)

    All sorted 👍

  • This post is deleted!
  • @tango I'm experiencing the same issue. Can you elaborate on how you fixed it. I get this trace:

    MongoError: Authentication failed.
    at Function.MongoError.create (/home/countach/nodebb/node_modules/mongodb-core/lib/error.js:31:11)
    at /home/countach/nodebb/node_modules/mongodb-core/lib/connection/pool.js:497:72
    at authenticateStragglers (/home/countach/nodebb/node_modules/mongodb-core/lib/connection/pool.js:443:16)
    at Connection.messageHandler (/home/countach/nodebb/node_modules/mongodb-core/lib/connection/pool.js:477:5)
    at Socket.<anonymous> (/home/countach/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:547:20)

  • Hi,Guys of this problem you solve it, how to solve

Suggested Topics