Monday 4 March 2013

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


Error while starting nginx


]# /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()


Solution:
# fuser -k 80/tcp

# /etc/init.d/nginx restart
Stopping nginx:                                            [  OK  ]
Starting nginx:                                            [  OK  ]


Thats it !!

1 comment:

  1. Thank you!

    This happened when I updated the passenger module and recompiled Nginx.

    A restart could have fixed it but this solution is much better.


    Best Regards,

    Aristotelis


    ReplyDelete