systemd service not working

Technical Support
  • I've followed the docs for installing NodeBB on one of our Ubuntu servers.

    I've installed Nodejs 6.10.2 - the LTS version - and Redis rather than MongoDB.

    Both are working, I can access Redis, read and write on it.

    I have two problems, but I'll focus here on systemd. I've created the service file, but it does not work. This is what I get when I check the status:

    nodebb.service - NodeBB forum for Node.js.
       Loaded: loaded (/lib/systemd/system/nodebb.service; enabled; vendor preset: enabled)
       Active: failed (Result: start-limit-hit) since Thu 2017-04-20 00:53:59 EDT; 1h 42min ago
         Docs: http://nodebb.readthedocs.io/en/latest/
      Process: 20405 ExecStart=/usr/bin/node /opt/nodebb/launcher.js --no-daemon --no-silent (code=exited, status=1/FAILURE)
     Main PID: 20405 (code=exited, status=1/FAILURE)
    
    Apr 20 00:53:59 .io systemd[1]: nodebb.service: Unit entered failed state.
    Apr 20 00:53:59 .io systemd[1]: nodebb.service: Failed with result 'exit-code'.
    Apr 20 00:53:59 .io systemd[1]: nodebb.service: Service hold-off time over, scheduling restart.
    Apr 20 00:53:59 .io systemd[1]: Stopped NodeBB forum for Node.js..
    Apr 20 00:53:59 .io systemd[1]: nodebb.service: Start request repeated too quickly.
    Apr 20 00:53:59 .io systemd[1]: Failed to start NodeBB forum for Node.js..
    Apr 20 00:53:59 .io systemd[1]: nodebb.service: Unit entered failed state.
    Apr 20 00:53:59 .io systemd[1]: nodebb.service: Failed with result 'start-limit-hit'.
    
  • @An_dz have you tried starting NodeBB with ./nodebb dev?

  • Disregard, I've found the problem. In one of my tries to fix the other bug I ended up writing launcher.js rather than loader.js. 😁 It's all fine now.


Suggested Topics


  • Updating Nodejs version never works!

    Unsolved Technical Support
    0 Votes
    25 Posts
    539 Views

    @eeeee for what it's worth, it's internal policy in NodeBB that nvm and n NEVER be installed on our client machines.

    It's caused far too much headache for this very same reason. I think I have gone as far as to migrate an entire client site to another server just to get back to a node version I could control. It was rather cathartic to send the old server to /dev/null.

    Anyway, the problem here is as @phenomlab pointed out, is path related. Both n and nvm fmuck around with the symlinks in /usr/bin or /bin, etc., and there's no easy way to undo what those scripts do unless you run the uninstallation script.

    How do you know which uninstall script to run? You don't. Did you use nvm or n, and if so, which one? Who knows now. If you do know, does the script provide information (via --help flag or whatnot) to instruct you on how to uninstall it? Ha ha, of course not.

    Let me have apt control my dependencies any day. Warts and all. Rant over.

  • 0 Votes
    7 Posts
    381 Views

    Problem solved

    Thank you everyone who responded.
    I have tried everything I could think of, and when nothing worked, I decided to go over the setup, line by line, word by word and that's when I found it!
    It was a typo in configuration of my nginx, i.e., my own mistake.
    The following entries were wrong:

    proxy_set_header X-Forward-For ... proxy_set_header X-Forward-Proto ...

    They should be X-Forwarded-For and X-Forwarded-Proto, notice they were missing ed in the word forward !

  • 0 Votes
    3 Posts
    1k Views

    @PitaJ Thanks

  • 0 Votes
    3 Posts
    1k Views

    Thanks for looking into that for me @pichalite

  • 0 Votes
    13 Posts
    5k Views

    @LeeM said:
    hopefully the dev version will become stable at some stage.

    The dev version isn't stable, that's what the stable branch is for. 👍