GUI / nginx-upstream-dynamic-servers

An nginx module to resolve domain names inside upstreams and keep them up to date.
MIT License
311 stars 74 forks source link

Nginx unable to start with a domain name that cannot be resolved #32

Open anshul291995 opened 5 years ago

anshul291995 commented 5 years ago

Hi, I was under the impression that this module allows nginx to startup even when domain name can not be resolved ; but for some reason I am not able to reproduce this.

My upstream configuration is:

upstream pool1{                                                                                       
  server www.bfdbjdfvlkfdkjfdk.com:80 resolve max_fails=0;                                                      
  keepalive 16;                                                                                                 
  check interval=30000 rise=1 fall=3 timeout=30000 type=http default_down=false mark_down=false min_servers=1;  
  check_http_send 'GET / HTTP/1.1' 'header=Host: 127.0.0.1';                                                    
}   

I get this error on reload: nginx:

[error] host not found in upstream "www.bfdbjdfvlkfdkjfdk.com:80" in /etc/nginx/nginx.conf:165

I am, maybe, missing a ton here. Can someone please help me regarding this ?

zhaofeng0019 commented 4 years ago

i think a have solve the domain problem, would you like to try this ?

https://github.com/zhaofeng0019/nginx-upstream-dynamic-resolve-servers

by the way, this module may should not used with upstream_check module, it may cause some memory problems.