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

Recently when I am playing with nginx stuck with following error

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

Whenever this kind of error occurs I used to get port details with netstat and kill that process using process ID.

This time I am unable to get port usage details with netstat and stuck with this error for some time.

After exploring little bit on web following command is helped me to resolve above issue:

$ sudo fuser -k 80/tcp

Output:

80/tcp:              28461

fuser command will identify process using files or socket.

Here I am using socket to identify the process and killed the process with  -k argument.

After running above command the issues is resolved and I am able to start nginx.

 

About these ads

4 comments on “nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s