Reputation: 75
How to let nginx on windows bind the ports?
eska@DESKTOP-1NGBVMN:~$ sudo nginx;
sudo: nie udało się rozwiązać nazwy hosta DESKTOP-1NGBVMN
nginx: [emerg] bind() to 0.0.0.0:5555 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:5555 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:5555 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:5555 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:5555 failed (98: Address already in use)
nginx: [emerg] still could not bind()
eska@DESKTOP-1NGBVMN:~$
Upvotes: 2
Views: 819
Reputation: 108
It looks like the nginx or another process is already listening on that port. In order to determine what is listening on that port try this command:
sudo netstat -nltp
You can then free up the port by killing the corresponding process, where <PID> is the processID from the above command:
kill -TERM <PID>
Upvotes: 2