Web Installer preventing NodeBB server from starting.
-
After filling out the Web Installer form and then running
./nodebb start
on the command line. I get the errors listed below.
It seems like the Web Installer is still using the 4567 port the node server is trying to use.
I have tried killing all node processes before running./nodebb start
but the processes refuse to be killed and this has no effect.Any suggestions?
./nodebb start
errorsStarting NodeBB "./nodebb stop" to stop the NodeBB server "./nodebb log" to view server output "./nodebb help" for more commands NodeBB v2.8.5 Copyright (C) 2013-2023 NodeBB Inc. This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. For the full license, please visit: http://www.gnu.org/copyleft/gpl.html Clustering enabled: Spinning up 1 process(es). 2023-01-31T18:55:54.079Z [4567/192] - info: Initializing NodeBB v2.8.5 https://node.mydomain.com 2023-01-31T18:55:56.476Z [4567/192] - info: [socket.io] Restricting access to origin: https://node.mydomain.com:* (node:192) [LRU_CACHE_UNBOUNDED] UnboundedCacheWarning: TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption. (Use `node --trace-warnings ...` to show where the warning was created) 2023-01-31T18:55:56.727Z [4567/192] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it. * nodebb-rewards-essentials 2023-01-31T18:55:56.837Z [4567/192] - info: [api] Adding 0 route(s) to `api/v3/plugins` 2023-01-31T18:55:56.853Z [4567/192] - info: [router] Routes added 2023-01-31T18:55:56.865Z [4567/192] - info: 🎉 NodeBB Ready 2023-01-31T18:55:56.867Z [4567/192] - info: 🤝 Enabling 'trust proxy' 2023-01-31T18:55:56.870Z [4567/192] - error: NodeBB address in use, exiting... Error: listen EADDRINUSE: address already in use 0.0.0.0:4567 at Server.setupListenHandle [as _listen2] (node:net:1733:16) at listenInCluster (node:net:1781:12) at doListen (node:net:1930:7) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) 2023-01-31T18:55:56.874Z [4567/192] - error: uncaughtException: listen EADDRINUSE: address already in use 0.0.0.0:4567 Error: listen EADDRINUSE: address already in use 0.0.0.0:4567 at Server.setupListenHandle [as _listen2] (node:net:1733:16) at listenInCluster (node:net:1781:12) at doListen (node:net:1930:7) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {"date":"Tue Jan 31 2023 18:55:56 GMT+0000 (Coordinated Universal Time)","error":{"address":"0.0.0.0","code":"EADDRINUSE","errno":-98,"port":4567,"syscall":"listen"},"exception":true,"os":{"loadavg":[0.81,0.68,0.78],"uptime":603592.54},"process":{"argv":["/usr/local/bin/node","/usr/src/app/app.js"],"cwd":"/usr/src/app","execPath":"/usr/local/bin/node","gid":1000,"memoryUsage":{"arrayBuffers":869872,"external":2935100,"heapTotal":110329856,"heapUsed":78592824,"rss":174796800},"pid":192,"uid":1000,"version":"v18.13.0"},"stack":"Error: listen EADDRINUSE: address already in use 0.0.0.0:4567\n at Server.setupListenHandle [as _listen2] (node:net:1733:16)\n at listenInCluster (node:net:1781:12)\n at doListen (node:net:1930:7)\n at process.processTicksAndRejections (node:internal/process/task_queues:83:21)","trace":[{"column":16,"file":"node:net","function":"Server.setupListenHandle [as _listen2]","line":1733,"method":"setupListenHandle [as _listen2]","native":false},{"column":12,"file":"node:net","function":"listenInCluster","line":1781,"method":null,"native":false},{"column":7,"file":"node:net","function":"doListen","line":1930,"method":null,"native":false},{"column":21,"file":"node:internal/process/task_queues","function":"process.processTicksAndRejections","line":83,"method":"processTicksAndRejections","native":false}]} 2023-01-31T18:55:56.875Z [4567/192] - error: Error: listen EADDRINUSE: address already in use 0.0.0.0:4567 at Server.setupListenHandle [as _listen2] (node:net:1733:16) at listenInCluster (node:net:1781:12) at doListen (node:net:1930:7) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) 2023-01-31T18:55:56.875Z [4567/192] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised. 2023-01-31T18:55:56.878Z [4567/192] - error: Error [ERR_SERVER_NOT_RUNNING]: Server is not running. at new NodeError (node:internal/errors:400:5) at Server.close (node:net:2075:12) at Object.onceWrapper (node:events:627:28) at Server.emit (node:events:525:35) at emitCloseNT (node:net:2128:8) at process.processTicksAndRejections (node:internal/process/task_queues:81:21) [cluster] Child Process (192) has exited (code: 1, signal: null) [cluster] Spinning up another process... ----- snip ----- # Repeats the above 2 more times 3 restarts in 10 seconds, most likely an error on startup. Halting.
-
I figured out a solution. I just needed to prevent the web installer from starting up and claiming the
0.0.0.0:4567
address the nodebb server tries to use.The Web Installer only starts if there isn't already a
config.json
file. So I added a ConfigMap to my kubernetes manifest to insert a validconfig.json
file into the correct directory when the nodebb pod starts. I used this post for guidance in setting up the ConfigMap.Thanks for your help!
-
@phenomlab I am trying to deploy nodebb in kubernetes using the official docker container. So I don't think I can change the port with the cli installer.
@julian my
ps aux | grep node
output is below. There does appear to be a nodeBB server running, I think it is the web installer? However, all my attempts to kill the processes (kill -9 <PID>
, etc.) seem to have no effect (the processes restart).node@nodebb-694ff7946-56wtz:/usr/src/app$ ps aux | grep node node 1 0.0 0.0 2484 364 ? Ss Jan31 0:00 /bin/sh -c test -n "${SETUP}" && ./nodebb setup || node ./nodebb build; node ./nodebb start node 8 0.0 3.2 42845668 128480 ? Sl Jan31 0:15 node ./nodebb build node 48 0.2 0.0 4164 3180 pts/0 Ss 18:15 0:00 bash node 56 0.0 0.0 6760 2748 pts/0 R+ 18:15 0:00 ps aux node 57 0.0 0.0 3244 704 pts/0 S+ 18:15 0:00 grep node
-
@timc have you tried
killall node
? -
I figured out a solution. I just needed to prevent the web installer from starting up and claiming the
0.0.0.0:4567
address the nodebb server tries to use.The Web Installer only starts if there isn't already a
config.json
file. So I added a ConfigMap to my kubernetes manifest to insert a validconfig.json
file into the correct directory when the nodebb pod starts. I used this post for guidance in setting up the ConfigMap.Thanks for your help!
-