Running into this: "warn: You have no mongo password setup!"

Technical Support
  • Hey, folks.

    So I have been playing with this tech on a Digital Ocean Ubuntu (14.04) droplet, just trying to perfect the install sequence with Mongo and I keep running into this error:

    "warn: You have no mongo password setup!"
    

    Here is the output from ./nodebb dev

    Clustering enabled: Spinning up 1 process(es).
    
    30/11 11:43 [20746] - verbose: * using configuration stored in: /home/nodebb/config.json
    30/11 11:43 [20746] - info: Time: Mon Nov 30 2015 11:43:10 GMT-0500 (EST)
    30/11 11:43 [20746] - info: Initializing NodeBB v0.9.1
    30/11 11:43 [20746] - verbose: * using mongo store at 127.0.0.1:27017
    30/11 11:43 [20746] - verbose: * using themes stored in: /home/nodebb/node_modules
    30/11 11:43 [20746] - warn: You have no mongo password setup!
    30/11 11:43 [20746] - info: [database] Checking database indices.
    30/11 11:43 [20746] - verbose: Checking dependencies for outdated modules
    [outdated] nodebb-theme-lavender installed v3.0.0, package.json requires 3.0.1
    30/11 11:43 [20746] - warn: [socket.io] Clustering detected, you are advised to configure     Redis as a websocket store.
    30/11 11:43 [20746] - verbose: [notifications.init] Registering jobs.
    30/11 11:43 [20746] - info: [themes] Using theme nodebb-theme-persona
    30/11 11:43 [20746] - verbose: [plugins] Initializing plugins system
    30/11 11:43 [20746] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-composer-default
    30/11 11:43 [20746] - verbose: [plugins] Found 10 js file(s) for plugin nodebb-plugin-composer-default
    30/11 11:43 [20746] - verbose: [plugins] Loaded plugin: nodebb-plugin-composer-default
    30/11 11:43 [20746] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-markdown
    30/11 11:43 [20746] - verbose: [plugins] Found 2 js file(s) for plugin nodebb-plugin-markdown
    30/11 11:43 [20746] - verbose: [plugins] Loaded plugin: nodebb-plugin-markdown
    30/11 11:43 [20746] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-mentions
    30/11 11:43 [20746] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-mentions
    30/11 11:43 [20746] - verbose: [plugins] Loaded plugin: nodebb-plugin-mentions
    30/11 11:43 [20746] - verbose: [plugins] Found 1 css file(s) for plugin nodebb-widget-essentials
    30/11 11:43 [20746] - verbose: [plugins] Loaded plugin: nodebb-widget-essentials
    30/11 11:43 [20746] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-rewards-essentials
    30/11 11:43 [20746] - verbose: [plugins] Loaded plugin: nodebb-rewards-essentials
    30/11 11:43 [20746] - verbose: [plugins] Loaded plugin: nodebb-plugin-soundpack-default
    30/11 11:43 [20746] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-emoji-extended
    30/11 11:43 [20746] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-emoji-extended
    30/11 11:43 [20746] - verbose: [plugins] Loaded plugin: nodebb-plugin-emoji-extended
    30/11 11:43 [20746] - verbose: [plugins] Found 4 js file(s) for plugin nodebb-theme-persona
    30/11 11:43 [20746] - verbose: [plugins] Loaded plugin: nodebb-theme-persona
    30/11 11:43 [20746] - info: [plugins] Plugins OK
    30/11 11:43 [20746] - verbose: [meta/css] Minifying LESS/CSS
    30/11 11:43 [20746] - verbose: [sounds] Sounds OK
    30/11 11:43 [20746] - verbose: [meta/templates] Compiling templates
    30/11 11:43 [20746] - verbose: [meta/js] Minification complete
    30/11 11:43 [20746] - verbose: [meta/js] Client-side minfile committed to disk.
    30/11 11:43 [20746] - verbose: [meta/templates] Successfully compiled templates.
    30/11 11:43 [20746] - verbose: [meta/css] admin.css committed to disk.
    30/11 11:43 [20746] - info: NodeBB Ready
    30/11 11:43 [20746] - info: NodeBB is now listening on: 0.0.0.0:4567
    30/11 11:43 [20746] - verbose: [hotswap] Router with id `plugins` replaced successfully
    30/11 11:43 [20746] - verbose: [plugins] All plugins reloaded and rerouted
    30/11 11:43 [20746] - verbose: [hotswap] Router with id `auth` replaced successfully
    30/11 11:43 [20746] - verbose: [meta/css] stylesheet.css committed to disk.
    

    Also worth noting: Nodebb will not start properly with ./nodebb start. It will simply not start. The ./nodebb log tries to starts but exits itself out and hangs:

    Type Ctrl-C to exit
    
    Clustering enabled: Spinning up 1 process(es).
    
    29/11 23:51 [3807] - info: Time: Sun Nov 29 2015 23:51:26 GMT-0500 (EST)
    29/11 23:51 [3807] - info: Initializing NodeBB v0.9.1
    29/11 23:51 [3807] - warn: You have no mongo password setup!
    29/11 23:51 [3807] - info: [database] Checking database indices.
    [outdated] nodebb-theme-lavender installed v3.0.0, package.json requires 3.0.1
    29/11 23:51 [3807] - warn: One or more of NodeBB's dependent packages are out-of-date.     Please run the following command to update them:
    29/11 23:51 [3807] - warn:     ./nodebb upgrade
    [cluster] Child Process (3807) has exited (code: 0, signal: null)
    ^C
    

    The mongo passwords were set up according to advice given in this post.

    This install is using Mongo 3 so I cant find the conf file to uncomment the auth: true line.

    Also, I ran ./nodebb upgrade several times and it continues to give that flag.

    So looking for a solution to the mongo authentication issue. Also wondering if running nodebb with the dev option is "safe " practice since that is the only way it will run? It is working, I just created another user and some posts...

  • @Aton-Bridges run npm i [email protected] to fix the ./nodebb start issue.

  • @Aton-Bridges the config file is /etc/mongodb.conf. The post you linked mentions it as /etc/mongo.conf

  • @pichalite all I have a mongod.conf file in /etc.

  • @Aton-Bridges that should be the config file. Check for auth: true in that file

  • @pichalite This is the contents of /etc/mongod.conf:

    # mongod.conf
    
    # for documentation of all options, see:
    #   http://docs.mongodb.org/manual/reference/configuration-options/
    
    # Where and how to store data.
    storage:
      dbPath: /var/lib/mongodb
      journal:
        enabled: true
    #  engine:
    #  mmapv1:
    #  wiredTiger:
    
    # where to write logging data.
    systemLog:
      destination: file
      logAppend: true
      path: /var/log/mongodb/mongod.log
    
    # network interfaces
    net:
      port: 27017
      bindIp: 127.0.0.1
    
    
    #processManagement:
    
    #security:
    
    #operationProfiling:
    
    #replication:
    
    #sharding:
    
    ## Enterprise-Only Options:
    
    #auditLog:
    
    #snmp:
    

    And that is it.

  • @Aton-Bridges did you set the mongodb password in the NodeBB config file?

  • @pichalite Was that something I needed to do in addition to using the web installer? Will check and see what it says...

    Config.json only references the NodeBB secret.

    It has the correct mongo username and database listed by not password. Should I add it there?

  • @Aton-Bridges That's where the warning comes from. NodeBB checks the config file during startup and warns you if it doesn't find a password. Add the password in the config file.

  • @pichalite On the money! Thanks.

  • @Aton-Bridges that eliminates the warning from NodeBB but I don't think your MongoDB is actually authenticating using the username and password. I am not too familiar with MongoDB. May be someone who knows it can respond on how to make it authenticate.

  • @pichalite Any thoughts on how I can test to see if it is or is not authenticating?

  • @pichalite Okay, this fixed the error outputs (w correct version of 3.0.1) but ./nodebb start still produces this output and returns the shell.

    $ ./nodebb start
    
    Starting NodeBB
      "./nodebb stop" to stop the NodeBB server
      "./nodebb log" to view server output
      "./nodebb restart" to restart NodeBB
    
    $
    

    Something to worry about or no? ./nodebb log runs fine it seems...

  • @Aton-Bridges that's standard output of ./nodebb start which means everything went fine during startup

  • @pichalite So its running in the background?

  • Well, damn. Didnt know that.

    Okay, Thanks for your phenomenal help, @pichalite.

    Gonna mess around with this proxying and nginx a bit now that everything is moving forward again.


Suggested Topics