Start NodeBB on system boot
-
@julian But that's not really possible. I can start it under my user account, even using the same command and it starts from the startup script after I changed it to
./nodebb start
... and it was working for months before I upgraded to 0.7.2 and just suddenly stopped because of it. And starting it from any other method does write output to /opt/nodebb/logs/output.log:nodebb@NodeBB:/opt/nodebb/logs$ ls -la total 20 drwxrwxr-x 2 nodebb nodebb 4096 Aug 4 06:55 . drwxr-xr-x 10 nodebb nodebb 4096 Aug 4 07:28 .. -rw-rw-r-- 1 nodebb nodebb 6 Aug 4 06:51 .gitignore -rw-rw-r-- 1 nodebb nodebb 5021 Aug 4 07:28 output.log
I ran into so many problems after this upgrade that I just threw the whole instance away (
mv /opt/nodebb /opt/nodebb_old
) made a new directory and installed using the steps from https://docs.nodebb.org/en/latest/installing/os/ubuntu.html starting with the repository clone:git clone -b v0.7.x https://github.com/NodeBB/NodeBB.git nodebb cd nodebb npm install --production ./nodebb setup
I ended up copying the old config.json file back into the new directory because I was too lazy to copy and paste the secret, but I am otherwise now running a brand spankin' new install of v0.7.2 and I hit the same problem. same EROFS error in /var/log/upstart/nodebb.log after I put the old /etc/init/nodebb.conf back.
I also have a minor problem with the persona theme (.taskbar CSS class has a width of 50% specified in stylesheet.css even after updating the theme to the latest from the ACP), a plugin that completely breaks the service whenever a topic is loaded (nodebb-plugin-topic-badges) and a plugin that tries to turn every link that starts with http:// into a YouTube embed (nodebb-plugin-youtube-lite).
The clean install did fix a problem I was having with the chat windows.Nevermind. Updating the theme in the ACP broke the chat windows again, so that's the problem with that one.
-
@julian deleted log file, rebooted, same error and log file does not exist.
Manual
./nodebb start
creates log file.
Manualnode loader.js --no-silent --no-daemon
also creates log file.It just wont do it from upstart for some reason.
Edit: Doesn't work even with chmod 777 on the output.log file and the containing directory. Really doesn't make any sense to me. Though on further consideration, it might have been broken by a package update from apt-get and I just didn't notice because I hadn't rebooted in a while.
-
@julian No. Not really sure what else I can do except to maybe rebuild the whole server. I'm just running the upstart script with
./nodebb start
for now. IIRC, the major drawback to that was that it doesn't write the PID to a file and so you can't make an orderly stop to the process, which is not ideal, but it will work for me for now. -
This post is deleted!