Welcome! Log In Create A New Profile

Advanced

Help with: no resolver defined to resolve upstream-name

Ze Claudio Pastore
August 04, 2016 11:42AM
Hello,

(Short version: what could cause nginx to try to resolve a name used as the
upstream backend configured name? Long version follows in the body of the
message).

I have a weird problem, which might be something simple I am missing, I
searched the archives and read the documentation twice and still I am
missing something.

In one site / system I have the following simple conf:

http {
....
upstream app1-backend {
sticky name=app1cookie hash=md5 secure httponly;
server 192.168.0.4;
server 192.168.1.4;
}
....
}

server {
...
location / {
...
proxy_pass http://app1-backend;
...
}
....
}

And it works perfectly. In a second server I have almost the same conf:

http {
....
upstream app1-backend {
sticky name=app1cookie hash=md5 secure httponly;
server 192.168.1.4;
server 192.168.0.4;
}
....
}

server {
...
location / {
...
proxy_pass http://app1-backend;
...
}
....
}

They are two individual nginx reverse proxies in two different data centers.

The first nginx/site works great, but on the second I get the following
error:

2016/08/03 18:09:56 [error] 94482#100729: *34 no resolver defined to
resolve app1-backend, client: 192.168.1.20, server:app1.mydomain.com,
request: "GET / HTTP/1.1"

So it looks like, for some weird reason, nginx on second site is trying to
resolve app1-backend as a host. Proof is, if I add it to /etc/hosts it
works. But obviously this is not what I want, the proxy_pass is pointed to
an upstream backend not a host.

So, first site works fine, second wants to resolve app1-backend like if it
was not an upstream block. Both sites should have the very same config, I
have compared with diff -u but I still can't figure out what's going wrong
here.

My guess this is a basic mistake but I can't see.

Any obvious diagnostics here?

Thank you very much.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Help with: no resolver defined to resolve upstream-name

Ze Claudio Pastore August 04, 2016 11:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 233
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