Error installation on ubuntu



  • Hello,

    I'm a new user of nodebb and i have some problem with the installation of nodebb on Ubuntu 12.04.4 LTS

    Environment :

    • Ubuntu 12.04.4 LTS (GNU/Linux 3.11.0-15-generic x86_64)
    • MongoDB 2.6.4
    • NodeJS 0.10.31-1chl1~precise1

    After the installation i have this error :

    sudo node app
    info: NodeBB v0.5.0-2 Copyright (C) 2013-2014 NodeBB Inc.
    info: This program comes with ABSOLUTELY NO WARRANTY.
    info: This is free software, and you are welcome to redistribute it under certain conditions.
    info:
    info: Time: Mon Aug 25 2014 13:15:46 GMT+0200 (CEST)
    info: Initializing NodeBB v0.5.0-2
    info: * using configuration stored in: /home/user/nodebb/config.json
    info: * using mongo store at 127.0.0.1:27017
    info: * using themes stored in: /home/user/nodebb/node_modules

    /home/user/nodebb/node_modules/mongodb/lib/mongodb/connection/base.js:245
    throw message;
    ^
    Error: Cannot find module 'ms'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/user/nodebb/node_modules/serve-favicon/index.js:16:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

    Have you an idea ?

    Thanks in advance for your help.



  • After install, cd to your nodebb directory. Then run NodeBB in dev mode to get a read out on your terminal.

    cd nodebb
    ./nodebb dev
    


  • @Ted when i launch in dev mod i have the same error (and unfortunately no additional information) :

    user@int-user-malco-02:~/nodebb$ ./nodebb dev
    Launching NodeBB in "development" mode.
    To run the production build of NodeBB, please use "forever".
    More Information: https://docs.nodebb.org/en/latest/running/index.html
    info: NodeBB v0.5.0-2 Copyright (C) 2013-2014 NodeBB Inc.
    info: This program comes with ABSOLUTELY NO WARRANTY.
    info: This is free software, and you are welcome to redistribute it under certain conditions.
    info:
    info: Time: Mon Aug 25 2014 13:39:01 GMT+0200 (CEST)
    info: Initializing NodeBB v0.5.0-2
    info: * using configuration stored in: /home/user/nodebb/config.json
    info: * using mongo store at 127.0.0.1:27017
    info: * using themes stored in: /home/user/nodebb/node_modules
    info: Base Configuration OK.

    /home/user/nodebb/node_modules/mongodb/lib/mongodb/connection/base.js:245
    throw message;
    ^
    Error: Cannot find module 'ms'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/user/nodebb/node_modules/serve-favicon/index.js:16:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    info: NodeBB v0.5.0-2 Copyright (C) 2013-2014 NodeBB Inc.
    info: This program comes with ABSOLUTELY NO WARRANTY.
    info: This is free software, and you are welcome to redistribute it under certain conditions.
    info:
    info: Time: Mon Aug 25 2014 13:39:02 GMT+0200 (CEST)
    info: Initializing NodeBB v0.5.0-2
    info: * using configuration stored in: /home/user/nodebb/config.json
    info: * using mongo store at 127.0.0.1:27017
    info: * using themes stored in: /home/user/nodebb/node_modules
    info: Base Configuration OK.

    /home/user/nodebb/node_modules/mongodb/lib/mongodb/connection/base.js:245
    throw message;
    ^
    Error: Cannot find module 'ms'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/user/nodebb/node_modules/serve-favicon/index.js:16:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    info: NodeBB v0.5.0-2 Copyright (C) 2013-2014 NodeBB Inc.
    info: This program comes with ABSOLUTELY NO WARRANTY.
    info: This is free software, and you are welcome to redistribute it under certain conditions.
    info:
    info: Time: Mon Aug 25 2014 13:39:03 GMT+0200 (CEST)
    info: Initializing NodeBB v0.5.0-2
    info: * using configuration stored in: /home/user/nodebb/config.json
    info: * using mongo store at 127.0.0.1:27017
    info: * using themes stored in: /home/user/nodebb/node_modules
    info: Base Configuration OK.

    /home/user/nodebb/node_modules/mongodb/lib/mongodb/connection/base.js:245
    throw message;
    ^
    Error: Cannot find module 'ms'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/user/nodebb/node_modules/serve-favicon/index.js:16:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    info: NodeBB v0.5.0-2 Copyright (C) 2013-2014 NodeBB Inc.
    info: This program comes with ABSOLUTELY NO WARRANTY.
    info: This is free software, and you are welcome to redistribute it under certain conditions.
    info:
    info: Time: Mon Aug 25 2014 13:39:05 GMT+0200 (CEST)
    info: Initializing NodeBB v0.5.0-2
    info: * using configuration stored in: /home/user/nodebb/config.json
    info: * using mongo store at 127.0.0.1:27017
    info: * using themes stored in: /home/user/nodebb/node_modules
    info: Base Configuration OK.

    /home/user/nodebb/node_modules/mongodb/lib/mongodb/connection/base.js:245
    throw message;
    ^
    Error: Cannot find module 'ms'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/user/nodebb/node_modules/serve-favicon/index.js:16:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

    [loader] Experienced three start attempts in 10 seconds, most likely an error on startup. Halting.



  • I see you there @a_5mith, any ideas? I haven't ran into this yet.



  • @Ted Try npm install in your nodebb folder.

    EDIT: I've not used a Mongo server before, so my knowledge is pretty limited. You could also try running ./nodebb setup again and just confirming through all the steps. Then when it gets to the end, it may install any missing depencies.

    If those don't work, I'd wait for our resident mongo expert to pop in.



  • @nweber, I'd listen to him, he fixes most of what I break 😉



  • After a new npm install and ./nodebb setup, i have always the same error.

    @a_5mith Thanks, but this morning i have tried an installation with redis and i have the same error, i don't think mongodb is in question.

    For information friday, i have tried an installation (with the same environment VM on ESX and ubuntu) and she was ok, but the registration or some forms didn't works.



  • Just to be clear, are you following install instructions found here:
    https://docs.nodebb.org/en/latest/installing/os/ubuntu.html

    I use ubuntu servers with those instructions and never have an issue like the one you've described.



  • Yes i have used this doc.

    I will try a new installation



  • I have made a new installation and it's ok, no more error on startup.

    But the application didn't work well, i have the same problems like friday:

    • i can't add user
    • i can't creat a new post

    I can only navigate in menu with the admin user



  • @nweber Any errors if you run nodebb dev and try to create a user or new post?



  • I see no error on console, i have made a screencast to illustrate

    My config.json :

    {
    "base_url": "http://10.1.148.242",
    "port": "4567",
    "secret": "key",
    "bind_address": "10.1.148.242",
    "database": "mongo",
    "mongo": {
            "host": "127.0.0.1",
            "port": "27017",
            "username": "nodebb",
            "password": "nodebb",
           "database": "nodebb"
        },
    "bcrypt_rounds": 12,
    "upload_path": "/public/uploads",
    "use_port": false,
    "relative_path": ""
    }


  • Is your DB hosted locally?
    Looks like there's a connection timing out when you try to access it.



  • Yes mongoDb is hosted on the same server.

    In dev mode i don't see logs on console and nothing in logs directory.

    What mean the "bind_adress" parameter ?



  • @nweber said:

    http://10.1.148.242

    Bind address is where you would place the IP of your server (like you already have) when using a domain. This would allow you to set a URL such as http://example.com in base_url.

    If you'll start NodeBB and leave it running, I'll see if I can can connect to it and register a profile



  • @nweber Set your bind address to 0.0.0.0. Also, unless you have nginx or apache configured, set use port to true.

    You might also want to edit out your secret key from your config.json post above.



  • I have tried to change bind_address and use_port like in your post.

    But no change after reloading app.



  • @Ted said:

    If you'll start NodeBB and leave it running, I'll see if I can can connect to it and register a profile

    I can't this server is not open on internet, only in local.



Suggested Topics

| |