inconsistent upstream_addr log

Maxim Dounin mdounin at mdounin.ru
Fri Apr 5 10:22:27 UTC 2013


Hello!

On Fri, Apr 05, 2013 at 04:44:11AM -0400, philipp wrote:

> My log format looks like this
>     
>     log_format  vcombined '$host $remote_addr - $remote_user [$time_local]
> "$request" '
>                       '$status $body_bytes_sent "$http_referer" '
>                       '"$http_user_agent" "$http_x_forwarded_for" '
>                       '$ssl_cipher $request_time $gzip_ratio '
>                       '$upstream_addr $upstream_response_time
> $geoip_country_code';
> 
> 
> I get these logs
> 
> www.example.de 192.168.1.1 - - [04/Apr/2013:13:41:58 +0200] "GET /de/test/
> HTTP/1.1" 504 383 "-" "Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101
> Firefox/20.0" "-" RC4-SHA 120.045 - 10.6.10.10:81, 10.6.10.11:81,
> 10.6.10.13:81, 10.6.10.12:81 30.003, 30.000, 30.002, 30.001 DE
> www.example.de 192.168.1.1 - - [04/Apr/2013:13:41:58 +0200] "GET /de/test/
> HTTP/1.1" 504 383 "-" "Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101
> Firefox/20.0" "-" RC4-SHA 120.045 - 10.6.10.10:81, 10.6.10.11:81,
> 10.6.10.13:81, upstreamgroupname, 10.6.10.12:81 30.003, 30.000, 30.002, -,
> 30.001 DE
> www.example.de 192.168.1.1 - - [04/Apr/2013:13:41:58 +0200] "GET /de/test/
> HTTP/1.1" 504 383 "-" "Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101
> Firefox/20.0" "-" RC4-SHA 120.045 - 10.6.10.10:81, 10.6.10.11:81,
> 10.6.10.13:81, 10.6.10.12:81, upstreamgroupname 30.003, 30.000, 30.002,
> 30.001, - DE
> www.example.de 192.168.1.1 - - [04/Apr/2013:13:41:58 +0200] "GET /de/test/
> HTTP/1.1" 504 383 "-" "Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101
> Firefox/20.0" "-" RC4-SHA 120.045 - upstreamgroupname - DE
> 
> I can understand the last and first log line. But what is happening in
> between? Why is the upstreamgroupname and the end or in the middle?

This means all servers during a server lookup were considered down 
("no live upstreams" error should appear in logs).  If this 
happens, nginx will mark all upstream servers as up, and will 
retry a request if allowed by proxy_next_upstream.

-- 
Maxim Dounin
http://nginx.org/en/donation.html



More information about the nginx mailing list