sudo nodebb help

Technical Support
  • I always mess up the upgrades, when npm update errors, i always give up and do sudo npm update, and then i probably do sudo nodebb upgrade...

    and now im in the same mess as before where ./nodebb dev fails but sudo ./nodebb dev works fine.

    does anyone know how i can get back to using nodebb without sudo? 😞

  • @chas could you be more specific and tell us what it does when it fails?

  • i dont know what the cause is, but its when i start using sudo commands to fix errors with npm or the upgrade. It just works after i run Sudo. i had the same problem on my old machine aswell. I must be doing something wrong! because it used to work.

    heres what i get now with a normal ./nodebb dev, if i run with sudo it works fine.

    9/9 11:27 [5056] - info: Initializing NodeBB v0.8.1
    9/9 11:27 [5056] - verbose: * using configuration stored in: /home/chas/nodebb/config.json
    9/9 11:27 [5056] - verbose: * using redis store at 127.0.0.1:6379
    9/9 11:27 [5056] - verbose: * using themes stored in: /home/chas/nodebb/node_modules
    ^Cchas@vps192892:~/nodebb$ 9/9 11:27 [5056] - verbose: Checking dependencies for outdated modules
    9/9 11:27 [5056] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    9/9 11:27 [5056] - info: [app] Database connection closed.
    9/9 11:27 [5056] - error: Error: Not running
    at Server.close (net.js:1233:11)
    at process.shutdown (/home/chas/nodebb/app.js:400:36)
    at process.EventEmitter.emit (events.js:92:17)
    at Signal.wrap.onsignal (node.js:757:46)
    Error: Not running
    at Server.close (net.js:1233:11)
    at process.shutdown (/home/chas/nodebb/app.js:400:36)
    at process.EventEmitter.emit (events.js:92:17)
    at Signal.wrap.onsignal (node.js:757:46)
    9/9 11:27 [5056] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    9/9 11:27 [5056] - info: [app] Database connection closed.

    net.js:1233
    throw new Error('Not running');
    ^
    Error: Not running
    at Server.close (net.js:1233:11)
    at shutdown (/home/chas/nodebb/app.js:400:36)
    at process.<anonymous> (/home/chas/nodebb/app.js:177:3)
    at process.EventEmitter.emit (events.js:95:17)
    at process._fatalException (node.js:272:26)

  • uhh i just scrolled up more in the logs is it something to do with that permission denied message? i don't know how i would have caused this

    9/9 11:27 [5046] - info: [plugins] Plugins OK
    9/9 11:27 [5046] - verbose: [meta/css] Minifying LESS/CSS
    9/9 11:27 [5046] - error: Could not initialise sound files:EACCES, unlink '/home/chas/nodebb/public/sounds/notification.mp3'
    9/9 11:27 [5046] - verbose: [meta/templates] Compiling templates
    9/9 11:27 [5046] - error: Error: EACCES, permission denied '/home/chas/nodebb/public/templates/403.tpl'
    at Object.fs.unlinkSync (fs.js:765:18)
    at rimrafSync (/home/chas/nodebb/node_modules/rimraf/rimraf.js:295:17)
    at /home/chas/nodebb/node_modules/rimraf/rimraf.js:330:5
    at Array.forEach (native)
    at rmkidsSync (/home/chas/nodebb/node_modules/rimraf/rimraf.js:329:26)
    at rmdirSync (/home/chas/nodebb/node_modules/rimraf/rimraf.js:322:7)
    at Function.rimrafSync [as sync] (/home/chas/nodebb/node_modules/rimraf/rimraf.js:293:9)
    at /home/chas/nodebb/src/meta/templates.js:50:10
    at /home/chas/nodebb/src/plugins.js:174:5
    at /home/chas/nodebb/node_modules/async/lib/async.js:52:16
    9/9 11:27 [5046] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    9/9 11:27 [5046] - info: [app] Database connection closed.

    net.js:1233
    throw new Error('Not running');
    ^
    Error: Not running
    at Server.close (net.js:1233:11)
    at shutdown (/home/chas/nodebb/app.js:400:36)
    at process.<anonymous> (/home/chas/nodebb/app.js:177:3)
    at process.EventEmitter.emit (events.js:95:17)
    at process._fatalException (node.js:272:26)
    [cluster] Child Process (5046) has exited (code: 7, signal: null)
    [cluster] Spinning up another process...

  • ok got it working again i re-took ownership of the entire directory again... maybe a i did a sudo git pull by mistake or something silly

    opps xd


Suggested Topics