Welcome! Log In Create A New Profile

Advanced

Re: sudden nginx hang -- restart fails, "98: Address already in use"

Jonathan Matthews
February 05, 2014 02:10PM
On 5 February 2014 18:53, dwirth <nginx-forum@nginx.us> wrote:
> Hello, all.
>
> About an hour ago, out of the blue, my server stopped responding to webpage
> requests. We are using nginx + php-fpm on RHEL6.
>
> # service nginx status
> nginx (pid 31600) is running...
>
> # service 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:443 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:443 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:443 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:443 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:443 failed (98: Address already in use)
> nginx: [emerg] still could not bind()
>
> I killed the process and was able to restart nginx so the immediate crisis
> is over, but I need to know: What the hell happened? What would cause nginx
> to hang like this? I have googled around and I see several discussions about
> what to do when this happens but zilch about how to keep it from happening.

The underlying cause I can't help with but, in this situation, I'd
always do a separate stop/stop so I could ensure the service had
stopped before starting it again. It hadn't here, and that's what
caused your "Address already in use" error messages.

J

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

sudden nginx hang -- restart fails, "98: Address already in use"

dwirth February 05, 2014 01:53PM

Re: sudden nginx hang -- restart fails, "98: Address already in use"

Jonathan Matthews February 05, 2014 02:10PM

Re: sudden nginx hang -- restart fails, "98: Address already in use"

Maxim Dounin February 06, 2014 07:12AM

Re: sudden nginx hang -- restart fails, "98: Address already in use"

dwirth February 06, 2014 07:23AM

Re: sudden nginx hang -- restart fails, "98: Address already in use"

Maxim Dounin February 06, 2014 09:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 246
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready