nodebb start not working but nodebb dev does
-
Hi all,
i ran into this issue yesterday, there is two similar issues on this forum, none of them helped me sadly, but i managed to figure it out what went wrong:
So the specs: nodebb v.1.18.x with PostgreSQL 13.5
- in one point my linux instance was ran out of disk space, so both nodebb and psql was shut down
- freed up more than a GB space, did a restart on the instance
- psql did restart nicely, but nodebb refused to start normally, only in dev mode
I did nodebb upgrade and wiped/reinstalled node_modules aswell, none of them helped (it did behave exactly like this thread descibes: https://community.nodebb.org/topic/10476/nodebb-start-not-working)
So ultimately what helped for me is that i removed the pidfile by hand from nodebb root directory, it had zero byte file size.
I suggest that maybe you dev guys add a force start/stop to the launcher options and handle this special case.
-
@mrnuku Admittedly it is not one of those things that is "supposed" to happen but w/a bit of seasoning sysadmins learn to mind lurker pid files. Kind of low hanging fruit and hence nicely suitable for early triage ...
How is PostgreSQL working out for you otherwise, eh? Inquiring minds are curious....
-
@mrnuku said in nodebb start not working but nodebb dev does:
So ultimately what helped for me is that i removed the pidfile by hand from nodebb root directory, it had zero byte file size.
So the pidfile was empty? That is weird it should have the pid of the loader.js.
The relevant code is here https://github.com/NodeBB/NodeBB/blob/master/loader.js#L210-L218 so when there is a pidfile it tries to kill that process. I might need some change so it doesn't exit. I guess we can reproduce this with an empty pid file.