Node-red: Unable to listen on http://127.0.0.1:1880/

I am Getting following in my logs even though my node red is running.
Can anyone help me understand why am I getting "port in use" error.

My setup details:
I have nginx listening on port 80 and i have proxy pass the url to localhost:1880
I have Node-red installed and started with pm2 using follwoing command:
pm2 start npm --name "Node-Red" -i 0 -- start
Netstat output:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1168/nginx: master
tcp 0 0 0.0.0.0:1880 0.0.0.0:* LISTEN 7705/node-red

My netstat output is as follows:

netstat -tulpn | grep :1880

tcp 0 0 0.0.0.0:1880 0.0.0.0:* LISTEN 1930/node-red

I tried to kill the pm2 process and start again but getting the same error.

That says that node-red is already running and listening on that port, so you can't start another instance of it listening on the same port.

Hi Colin,
Thanks for the reply.
How will i know that its starting another process? Cz i am getting that in my logs file but not sure how to debug.

I don't understand that question. What is starting what other process?

node-red is already running and listening on that port, so you can't start another instance of it listening on the same port.
In above sentence, you said that "you cant start another instance when node red is already listening on that port"
So how will i know that another instance is getting started.

Oh, I assumed that you were trying to start it manually. Do you mean that it keeps trying to start another instance of node-red but you don't know what is doing it?

Perhaps you have registered node-red twice?

what does pm2 ls show?

Yes.Thats correct.

I have started pm2 in cluster mode so there are 2 pm2 process running on single port.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.