Econnrefused On Running Localhost Server From Nodejs
I have a NodeJS server up and running on my local machine that is listening to port 50000. From another server, that is also running on my local machine, I need to make a simple GE
Solution 1:
The possible issue is that some else process is already running on the same port you are trying to use, either change your port or kill the existing process on your port. To kill the process on port you can try:
For mac:
sudo kill $(lsof -t -i:8000)
# or
sudo fuser -k -n tcp 8000
# or
fuser -k 8000/tcp
And for windows check this
hope this helps :)
Solution 2:
You might be running both the servers on the same port, kill another server on same port.
If you're on linux, you can kill port using sudo fuser -k -n tcp 5000
or if you're using windows: taskkill /PID 5000 /F
Post a Comment for "Econnrefused On Running Localhost Server From Nodejs"