openresty/lua-upstream-nginx-module

the access.log is error about $upstream_addr not be resloved

qikexin opened this issue · 1 comments

the access.log is error about $upstream_addr not be resloved。

the nginx config like this:
upstream api {
keepalive 32;
server x.x.x.x max_fails=5 fail_timeout=60s;
server x.x.x.x max_fails=5 fail_timeout=60s;
}
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" uoid:"$trace_id"'
'---> $upstream_addr <---'
'ups_resp_time: $upstream_response_time '
'request_time: $request_time'
'$request_body';

the access.log error like this:
124.225.204.156 - - [13/Jun/2022:10:03:49 +0800] "GET /api/sync/pkg_prd/list HTTP/1.1" 502 982 "-" "Java/1.8.0_65" "124.225.204.156" uoid:"75c0643c08216071f59369a467e10e3a"---> api <---ups_resp_time: 0.000 request_time: 0.000-

resloved