Pages

Thursday, 29 January 2015

Bind Ports in UBUNTU

We always get the below errors on ubuntu machine in some cases

(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80


I find the a command better than other commands to check binding of port 80 or some other port

command
$ sudo netstat -tulpn | grep :80

Result:
tcp        0      0 127.0.0.1:80            0.0.0.0:*       LISTEN      152/aolserver4-nsd


To kill the process

$ killall aolserver4-nsd


Now our port 80 is free to use