Opened 5 years ago

Closed 5 years ago

#696 closed defect (wontfix)

host not found prevents nginx from starting

Reported by: rdaysky@… Owned by:
Priority: major Milestone:
Component: nginx-core Version: 1.7.x
Keywords: Cc:
uname -a: any, but particularly Linux with systemd
nginx -V: 1.7.9

Description

Suppose I have “listen somehost.mydomain:80”, and the name server for domain mydomain is located on the same machine as nginx. During system startup, if nsd isn’t ready by the time nginx starts (which happens with systemd), failure to resolve the DNS name causes nginx to quit altogether.

Such behavior doesn’t make much sense. DNS isn’t by definition reliable. Nginx should treat such errors as transient and keep retrying, while bringing up other unaffected servers.

With current behavior, if a server suddenly reboots, nginx may fail to come online, resulting in downtime longer than necessary—until someone starts it manually.

Change History (1)

comment:1 Changed 5 years ago by mdounin

  • Resolution set to wontfix
  • Status changed from new to closed

If you want nginx to start regardless of DNS availability, consider using IP addresses in the configuration, or using /etc/hosts for important names. Alternatively, make sure that nginx is started after DNS is available.

Note: See TracTickets for help on using tickets.