Using Forever to start NodeBB causes account logins to fail

Bug Reports
  • #1

    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
    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?

  • GNU/Linux

    @parvan What error do you see when logins fail?

  • #3

    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!

  • #4

    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.

  • #5

    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?

  • #6

    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

Suggested Topics

| | | |