@zhivkoangelov Cool. Thanks for sharing. I started to delve into this several months (years?) back but got distracted w/other things before actually making any progress. Now I shall bookmark this puppy. 👍
error: Error: listen EADDRINUSE: address already in use 0.0.0.0:4567
-
I want to use nodebb for a enterprise applicaiton.I have deployed and installed nodebb on kubernetes. The installation went well but when I launch I am getting 502 error in the network. 2022-01-22T02:29:45.525Z [4567/136] - error: Error: listen EADDRINUSE: address already in use 0.0.0.0:4567 at Server.setupListenHandle [as _listen2] (node:net:1334:16) at listenInCluster (node:net:1382:12) at doListen (node:net:1520:7) at processTicksAndRejections (node:internal/process/task_queues:84:21) 2022-01-22T02:29:45.526Z [4567/136] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised. 2022-01-22T02:29:45.527Z [4567/136] - error: Error [ERR_SERVER_NOT_RUNNING]: Server is not running. at new NodeError (node:internal/errors:371:5) at Server.close (node:net:1628:12) at Object.onceWrapper (node:events:509:28) at Server.emit (node:events:402:35) at emitCloseNT (node:net:1681:8)
-
@nodebbcomcast this would indicate that the address and port are in use. Do you have other applications or services running ?
-
@nodebbcomcast
0.0.0.0 is the shorthand for all interfaces. You should restrict that to only those required, most likely a localhost address, e.g. 127.0.0.1
4567 is the "port" NodeBB is knocking on, which, for reasons unknown is already in use. There are more modern commands but kicking it old school, you can drive this one:
# netstat -na | grep 4567 tcp 0 0 127.0.0.1:4567 0.0.0.0:* LISTEN
The result above indicates something using tcp on the localhost interface 127.0.0.1 using port 4567. In this instance, NodeBB
Should you get any return for grepping on port 4567 and NodeBB is not running, your next step is to find out what is, wh/I will leave as an exercise.
Good luck and have fun!
-
got in to new problem after launch please the screenshot. I am getting admin blocked for some reason.
Here is my deployemnt.yaml file
apiVersion: apps/v1 kind: Deployment metadata: name: nodebb-deployment spec: selector: matchLabels: app: nodebb replicas: 1 # tells deployment to run 2 pods matching the template template: metadata: labels: app: nodebb spec: containers: - name: nodebb image: nodebb/docker:latest ports: - containerPort: 4567 --- apiVersion: v1 kind: Service metadata: name: nodebb-service spec: selector: app: nodebb ports: - protocol: TCP port: 80 targetPort: 4567 ```\
-
@nodebbvenkata do you have an ad or script blocker plugin in your browser that's active ?
-
@phenomlab no I have nothing installed I even tried on a different browser.
-
@phenomlab This blocked issue got resolved by adding https on the installation url while registering. Then new problem is socket url is giving 404.
-
@nodebbvenkata Hi, could you elaborate on how the issue got resolved for you? I have a very similar setup to the one you have (kubernetes service + deployment) and I'm experiencing the same behaviour:
2023-03-20T15:31:29.934Z [4567/228] - 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:1740:16) at listenInCluster (node:net:1788:12) at doListen (node:net:1937:7) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) 2023-03-20T15:31:29.936Z [4567/228] - 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
-
@miguelmoreno That looks very much like you already have an instance of NodeBB running.