Using Forever to start NodeBB causes account logins to fail



  • Using Forever to start NodeBB causes account logins to fail

    Ubuntu 14.04
    NGINX 1.4.6 Proxy
    Redis 2.8.4
    NodeBB v0.6.x-dev

    Everything works fine when using ->
    sudo ./nodebb start
    OR
    sudo ./nodebb dev

    I setup and ran Forever with the following ->
    sudo npm install -g forever
    sudo forever start /home/nodebb/app.js

    Possibly I am doing something wrong?
    Is there another recommended procedure to start NodeBB on reboot? What do you guys use?


  • Admin

    @parvan What error do you see when logins fail?



  • I'm sorry, I should have written that.
    I just fired NodeBB up again with Forever. At login it says

    "Failed login attempt, please try again.
    Invalid Password"

    And when I stop NodeBB with forever and start it again (with sudo ./nodebb start) it works.

    This is cross browser. (IE, Waterfox, Chrome)

    Also, I had another very weird bug on Digital Ocean experimenting with Forever and NodeBB but I can't recall the specifics. (Things weren't loading.) I'm on an OVH VPS right now.

    Thanks for your hard work!



  • I can confirm an identical error message when utilizing Upstart and the command "node app.js" within the Upstart script. Switching the Upstart script's command to ./nodebb start allowed me to login.



  • I have gotten the impression - I haven't fully tested it - that something about node causes it to not run quite correctly/at all if the cwd when starting it is not the install directory. And this could just be yet another part of my ignorance of nodejs assumptions/structure.

    I know this is very shot in the dark - can you confirm you're running the forever in the installed path?



  • I installed v0.6.x-dev which may have been the cause. Also, I may not have ran "npm install -g forever" in the nodebb directory. I'm not sure if this would make a difference?

    Forever is working fine with v0.5.4 and installation using "npm install -g forever" in the nodebb directory.
    I execute Forever using this cron job.
    @reboot cd /home/nodebb && forever start app.js


Log in to reply
 


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