Second try at Install still not success



  • Hi,

    I'm trying to install on ubuntu I went through the install guide, but am having issues connecting to the mongodb. I've issued this command:

    > db.createUser( { user: "nodebb", pwd: "<Enter in a secure password>", roles: [ "readWrite" ] } )
    

    However there is no success when attempting to connect.

    I type:

    mongo -u user -p password
    

    and it will not authenticate

    I've also tried starting the

    node app --setup
    

    & it fails to authenticate.

    After creating a nginx vhost, and creating a symbolic link to the directory /var/www/nodebb, chown: to webuser, this is the error in nginx logs

    /var/www/nodebb/" failed (13: Permission denied)
    

    So it seems this is related to the lack of database connection. I have parsed the conf files of mongodb & nodebb but nothing is popping out.

    Any clues?

    Thanks

    addition:

    I noticed with the webinstaller it defaults to creation of database (0), I kept this default. Was I supposed to replace this with anything else? When I run the node app --setup it shows the same (0) default, so I didn't think that was an issue.

    Here is the output from that command

    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://node.mydomainaddy.com)
    Please enter a NodeBB secret (ec0fa747-0fa5-4e83-acf3-d1e470a0122a)
    Which database to use (mongo)
    
    2/4 13:11 [7771] - 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 (webeindustry)
    Password of your MongoDB database
    Which database to use (0)
    Configuration Saved OK
    2/4 13:12 [7771] - error: NodeBB could not connect to your Mongo database. Mongo returned the following error: auth failed
    2/4 13:12 [7771] - warn: NodeBB Setup Aborted.
    MongoError: auth failed
    at Function.MongoError.create (/root/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:31:11)
    at commandCallback (/root/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:1136:66)
    at Callbacks.emit (/root/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:116:3)
    at null.messageHandler (/root/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:291:23)
    at Socket.<anonymous> (/root/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:285:22)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:153:18)
    at Socket.Readable.push (_stream_readable.js:111:10)
    at TCP.onread (net.js:531:20)
    

    Okay it was my goof, I replaced the (0) with "mongo" it's now success in process of creating admin user.

    I'm still getting the 404 error, the root directory ~/nodebb is the webroot, or is this not correct?

    So it resolves when using the 4567 port, I must setup a reverse proxy to push this through 80? Something must be amiss.

    Apparently that is standard behavior for nodebb, so I added the reverse proxy.

    All issues resolved.



  • @webeindustry which version of ubuntu? did you install mongodb?

    sudo apt-get install -y mongodb-org


  • xenial beta 2

    Yes, I installed mongodb. I've got it all sorted. Thanks for replying.


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.