Iam new to nginx and I have this issue I can't understand.
Iam using nginx as a load balancer to three cloud servers.This is nginx configuration :
upstream dummyname {
server #.#.#.# weight=1;
server #.#.#.# weight=1;
server #.#.#.# weight=1;
}
server {
listen 80;
root /var/www/html;
try_files /maintenance.html $uri $uri/index.html $uri.html @proxy;
server_name localhost;
location @proxy {
proxy_pass http://dummyname;
}
}
My problem appeared when I destroyed one of them with its ip still in the upstream i started to get this error :
ERROR
The requested URL could not be retrieved
The following error was encountered while trying to retrieve the URL: http://dummyname
Unable to determine IP address from host name "dummyname"
The DNS server returned:
Name Error: The domain name does not exist.
This means that the cache was not able to resolve the hostname presented in the URL. Check if the address is correct.
Your cache administrator is webmaster.
After tracing that error I figured out that the problem was in the ip of the removed server, and if I removed that ip from my upstream it works fine.
Now isn't nginx should balance the load and neglect any nonworking ips or is that normal or Iam doing something wrong? any references are very appreciated.
Thanks in advance.