98: Address already in use
igor at sysoev.ru
Fri Apr 15 10:30:27 MSD 2011
On Thu, Apr 14, 2011 at 08:04:03AM -0400, slowgary wrote:
> Hi all,
> Nginx has been working fine for months on my server. Recently, however,
> I see that "service nginx configtest" reports the following:
> the configuration file /etc/nginx/nginx.conf syntax is ok
> [emerg]: listen() to 0.0.0.0:17942, backlog 511 failed (98: Address
> already in use)
> configuration file /etc/nginx/nginx.conf test failed
> I believe nginx has been updated recently, but I'm not sure. It's
> currently at version 0.8.53. I've ran configtest before and have never
> seen this error. I need to add a new site in conf.d, but I fear that
> reloading or restarting afterwards will fail and my live sites will be
> netstat -tlnp lists 0.0.0.0:17942 as in use by Program name "nginx.conf"
> (which seems weird, shouldn't this just say "nginx"). Also, if I rename
> the conf.d/site.conf file that includes the 17942 port entry, it just
> fails on the next conf down the line on the following ip/port.
> Now that I've typed out the entire problem, it occurs to me that the
> problem could be the misnamed Program name. Maybe nginx thinks that a
> different program is occupying those ports because the name is not
> "nginx". Does that seem likely? Also, was there a bug fixed somewhere
> that resolved/caused the name change? I have a hunch that restarting
> nginx will solve the problem, but I don't want to risk it since it's a
> live server.
Could you show output of
ps ax -o pid,ppid,%cpu,vsz,wchan,command|egrep '(nginx|PID)'
More information about the nginx