Why does Nginx proxy_pass to upstream send sometimes outgoing requests to IPv6?
2015/12/28 14:11:06 [error] 38194#0: *114469948 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xxx.xx.xxx, server: example.com, request: "POST /suggest/ HTTP/1.1", upstream: "http://[AAAA:BBB:CCC:DDDD::E]:5555/suggestion", host: "example.com", referrer: "https://example.com/en/apple-111111/"
nginx.conf:
location /suggest/ {
proxy_pass http://testserver.com:5555/suggestion;
proxy_set_header Authorization 'Basic xxx';
}
Instead of sending the request to our testserver.com the request goes to http://[AAAA:BBB:CCC:DDDD::E]:5555/suggest
Does anybody know where the IPv6 address is coming from or what is wrong with the nginx conf?
Thanks in advice, Hans
Here is a real example:
2015/12/28 14:11:03 [error] 38192#0: *114552633 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xx.xx.xxx, server: pixabay.com, request: "POST /suggest/ HTTP/1.1", upstream: "http://[2a01:4f8:160:4450::2]:5555/pixabay/suggestion", host: "pixabay.com", referrer: "https://pixabay.com/fr/"
And the nginx.conf:
location /suggest/ {
proxy_pass http://pagewizz.com:5555/pixabay/suggestion;
proxy_set_header Authorization 'Basic xxx';
}
We are running a big image datebase called Pixabay. For searching we use elasticsearch which is running on another server called Pagewizz (2a01:4f8:160:4450::2). If somebody is tagging images, we use elastic to get suggestions. I have no clue why the ipv6 address of Pagewizz appears in the error logs of nginx...
0 Answers