Under various circumstances, like when starting up a server or a service, you may encounter "port already in use" error. Here are different ways to determine which process is using that port.
netstat -tulpn | grep <portNumber>
fuser <port#>/tcp
lsof -i tcp:<port#>
To determine if the commands are available on your system, try:
whereis <command>
e.g. whereis fuser
Once the pid is known for the process using the port, get information on the running process along with its command line:
ps -aux | grep <pid>
No comments:
Post a Comment