Tuesday, 24 September 2013

Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

While trying to start / restart nginx, if get the following error

# /etc/init.d/nginx restart
Stopping nginx: [FAILED]
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
Run the following command to fix the issue. 
# fuser -k 80/tcp
 Where:  fuser - identify processes using files or sockets
               -k     Kill  processes accessing the file.

Now you can start / restart nginx successfully.
# /etc/init.d/nginx restart
Stopping nginx: [ OK ]
Starting nginx: [ OK ]

!!!!!!!!!!!!!!!!................

No comments:

Post a Comment