Opened 3 years ago

Closed 3 years ago

#1328 closed defect (invalid)

Incorrect value of $upstream_addr in access_log

Reported by: makhnev.wna.ru@… Owned by:
Priority: major Milestone:
Component: nginx-module Version: 1.12.x
Keywords: access_log upstream_addr Cc:
uname -a: Linux vm-prt-qa-bln01.tcsbank.ru 4.4.0-83-generic #106-Ubuntu SMP Mon Jun 26 17:54:43 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.12.0
built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
built with OpenSSL 1.0.2g 1 Mar 2016
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie' --add-module=/usr/src/nginx-build/nginx/nginx-1.12.0/debian/modules/nginx-upstream-jvm-route --add-module=/usr/src/nginx-build/nginx/nginx-1.12.0/debian/modules/ngx_http_substitutions_filter_module --add-module=/usr/src/nginx-build/nginx/nginx-1.12.0/debian/modules/ngx_devel_kit-0.3.0 --add-module=/usr/src/nginx-build/nginx/nginx-1.12.0/debian/modules/lua-nginx-module-0.10.9rc6 --add-module=/usr/src/nginx-build/nginx/nginx-1.12.0/debian/modules/ngx_slowfs_cache-1.10 --add-module=/usr/src/nginx-build/nginx/nginx-1.12.0/debian/modules/ngx_log_if --add-module=/usr/src/nginx-build/nginx/nginx-1.12.0/debian/modules/headers-more-nginx-module-0.32 --add-module=/usr/src/nginx-build/nginx/nginx-1.12.0/debian/modules/nginx-module-sts-0.1.0 --add-module=/usr/src/nginx-build/nginx/nginx-1.12.0/debian/modules/nginx-module-stream-sts-0.1.0

Description

log_format upstream_addr 'host: $host | upstream addr: $upstream_addr | request: $request';

For sometimes, on 504 errors from upstream I've get upstream name instead of upstream ip:port

Sample:

upstream addr: 10.218.13.123:8080, 10.218.17.15:8080
upstream addr: 10.218.13.123:8080, qa04-apis (<<<<!!!!)

Change History (1)

comment:1 by Maxim Dounin, 3 years ago

Resolution: invalid
Status: newclosed

Duplicate of #427.

Note: See TracTickets for help on using tickets.