Try removing the /var/run/mongodb/mongod.pid file and then stopping it. If it doesn't work, just kill the process.
v1.6.0 permission problems after upgrade/update
@PitaJ That's what normally worked without any problems. Now it starts without any issues (after chown'ing everything back to my nodebb account, for some weird reason)
@julian I tried running it as my nodebb account... it doesn't start, this is the output:
Starting NodeBB "./nodebb stop" to stop the NodeBB server "./nodebb log" to view server output "./nodebb restart" to restart NodeBB internal/child_process.js:319 throw errnoException(err, 'spawn'); ^ Error: spawn EACCES at exports._errnoException (util.js:1018:11) at ChildProcess.spawn (internal/child_process.js:319:11) at Object.exports.spawn (child_process.js:378:9) at Function.module.exports.daemon (/opt/nodebb/node_modules/daemon/index.js:50:31) at module.exports (/opt/nodebb/node_modules/daemon/index.js:25:20) at /opt/nodebb/loader.js:228:21 at FSReqWrap.oncomplete (fs.js:123:15)
All files are owned by the nodebb account. Starting it up as root (with ./nodebb start and systemctl start nodebb) works... but having the odd issue of browsing between routes (/popular, /users, /categories, etc), but certain ones work without an issue like /login, /register and /admin. but the same issues are inside of the ACP.
I'm bummed out on this one... it worked before upgrading to v1.6.0 . I also updated my server, which might/might not have an impact
What did you chown? Did you everything in
nodebbor just everything in
@pitaj everything lol... let me guess... I shouldn't have done that?
No that should work. The error you have here is related to file permissions.
@pitaj should I try
chmod -R 755 /nodebb? just for shits and giggles?
I'd just try backing up your db and uploaded files, and reinstalling nodebb fresh.
But if you wanna try other things first, go ahead.
reverted to my last snapshot... unfortunately a little old and an older version. oh well... I will wait for the next patch before updating
**Edit: I forgot that my snapshot is a little bit older than I thought. v1.4.6 lol
update to v1.5.3 had no issues. I'll try updating it to v1.6.0 and report back what happens.
yup... updating to v1.6.0 causes the same issues... ownership is changed to root, changing it back to the rightful owner starts it back up (internal server error is gone):
Sep 17 19:28:58 [HOSTNAME] [ACCOUNT]: Error: EACCES: permission denied, open '/opt/nodebb/build/public/templates/footer.jst' Sep 17 19:28:58 [HOSTNAME] [ACCOUNT]: at Error (native) Sep 17 19:28:59 [HOSTNAME] [ACCOUNT]: Error: EACCES: permission denied, open '/opt/nodebb/build/public/templates/footer.jst' Sep 17 19:28:59 [HOSTNAME] [ACCOUNT]: at Error (native) Sep 17 19:28:59 [HOSTNAME] [ACCOUNT]: 17/9 19:28:59  - error: / Sep 17 19:28:59 [HOSTNAME] [ACCOUNT]: Error: EACCES: permission denied, open '/opt/nodebb/build/public/templates/categories.jst' Sep 17 19:28:59 [HOSTNAME] [ACCOUNT]: at Error (native) Sep 17 19:28:59 [HOSTNAME] [ACCOUNT]: Error: EACCES: permission denied, open '/opt/nodebb/build/public/templates/500.jst' Sep 17 19:28:59 [HOSTNAME] [ACCOUNT]: at Error (native)
Bummer... reverting back to my snapshot yeah... I will have to wait for the next patch.
For anyone having the same issues... reinstalling it with v1.6.0 is the best option... unless I am the unlucky one XD
Are you using sudo at all during the upgrade?
Edit: sudo or root
yes, is that a problem? with previous version, I did the same thing and worked perfectly
Yes, it's the source of the problem. Either use root/sudo for everything, or use it for nothing.
Ideally, do it without, there should be no reason to use sudo
@pitaj but why with this particular version? from v1.4.x to v1.5.x was perfectly fine... now I should be doing it with my nodebb account? That should be added to the docs, I think. My nodebb account is literally just a service account [nologin account with selinux limiting it too, and correct policies are applied to it too]...
1.6.0 uses compiled template files, which if owned by root... Are not so accessible
@julian is that one of the changes?
the 2 lines I ran was literally this (as root):
systemctl stop nodebb; git fetch; git checkout v1.5.x; git merge origin/v1.5.x; ./nodebb upgrade; systemctl start nodebb
wait a minute and the forum works, without an issue (upgrading from v1.4.6 to v1.5.3)
next (as root):
systemctl stop nodebb; git fetch; git checkout v1.6.x; git merge origin/v1.6.x; ./nodebb upgrade; systemctl start nodebb
File ownership is not correct (might be due to extra files not being there, due to older release) and once ownership is corrected, pages get stuck until it is refreshed.
Should I try a different branch, maybe?
@adam-poniatowski what is your service file? My guess is that it starts nodebb under the
./nodebb upgradeas root is going to mess stuff up because it will change the ownership of certain files and directories during the build step.
@pitaj but it doesn't explain why when I do this from v1.4 to 1.5 it works fine, but v1.5 to v1.6 it doesn't work. If that was one of the changes in the upgrade parameter, then I will try it with my nodebb account (which my service file is using nodebb.service)
@adam-poniatowski because templates are done differently in v1.6.0, because it uses Benchpress.
@pitaj aaah ok... so what step should I change to update it properly then? let my nodebb account run
./nodebb upgradeor should I let my account fetch/checkout/merge as well (which I will have to modify some policies for that)?