zlhgo commented on issue #6184:
URL: https://github.com/apache/apisix/issues/6184#issuecomment-1022910062


   请求到错误后端的日志
   ```
   2022/01/27 04:11:31 [info] 36#36: *144572 [lua] init.lua:554: fetch_ctx(): 
fetch ngx ctx: 1 while reading response header from upstream, client: 
223.116.236.28, server: _, request: "POST /VideoMusic/GetInfo HTTP/2.0", 
upstream: "http://172.16.89.222:80/VideoMusic/GetInfo";, host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: false, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:564: 
match_route_opts(): hosts match: true, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] radixtree.lua:488: 
compare_param(): pcre pat: \/((.|\n)*), client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] init.lua:398: 
http_access_phase(): matched route: 
{"prev_plugin_config_ver":328217,"orig_plugins":{"ky-traffic-control":{"ab":{"key":"ky-api_api_default","split_type":"distinct_id","enable":false},"header":{"enable":true},"upstreams":[{"instance_name":"stable","id":"f1011655","cluster":"prod-1","name":"ky-api_api_80","service_name":"api"},{"instance_name":"pub","id":"d9fb48ed","cluster":"prod-1","name":"ky-api_api-pub_80","service_name":"api-pub"}]}},"update_count":1,"createdIndex":210632,"key":"\/apisix\/prod-1\/routes\/33cddaff","clean_handlers":{},"has_domain":false,"orig_modifiedIndex":328206,"modifiedIndex":"328206#1","value":{"update_time":1643244706,"upstream_id":"f1011655","status":1,"create_time":1642132143,"uris":["\/*"],"plugin_config_id":"6eef47a8","id":"33cddaff","plugins":{"ky-traffic-control":{"ab":{"key":"ky-api_api_ky123","split_type":"distinct_id","enable":false},"header":{"enable":false},"upstreams":{}}},"labels":{
 "managed-by":"apisix-ingress-controller"},"desc":"Created by 
apisix-ingress-controller, DO NOT modify it 
manually","priority":0,"name":"ky-api_api-95_default","hosts":["api.ky.cn"]}}, 
client: 223.116.236.28, server: _, request: "POST /VideoMusic/AppInit 
HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] init.lua:305: 
get_upstream_by_id(): parsed upstream: 
{"key":"\/apisix\/prod-1\/upstreams\/f1011655","clean_handlers":{},"has_domain":false,"modifiedIndex":328216,"createdIndex":210630,"value":{"update_time":1643244706,"scheme":"http","labels":{"managed-by":"apisix-ingress-controller"},"create_time":1642132143,"id":"f1011655","type":"roundrobin","original_nodes":"table:
 0x7f61c83ed930","desc":"Created by apisix-ingress-controller, DO NOT modify it 
manually","nodes":"table: 
0x7f61c83ed930","timeout":{"connect":5,"read":20,"send":10},"pass_host":"pass","hash_on":"vars","parent":{"key":"\/apisix\/prod-1\/upstreams\/f1011655","clean_handlers":"table:
 
0x7f61b05a2ac0","has_domain":false,"modifiedIndex":328216,"createdIndex":210630,"value":"table:
 
0x7f61c83ed7b8"},"name":"ky-api_api_80","nodes_ref":[{"weight":100,"port":80,"priority":0,"host":"172.16.87.109"},{"weight":100,"port":80,"priority":0,"host":"172.16.87.181"},{"weight":100,"port":8
 
0,"priority":0,"host":"172.16.87.241"},{"weight":100,"port":80,"priority":0,"host":"172.16.88.112"},{"weight":100,"port":80,"priority":0,"host":"172.16.88.159"},{"weight":100,"port":80,"priority":0,"host":"172.16.88.167"},{"weight":100,"port":80,"priority":0,"host":"172.16.88.182"},{"weight":100,"port":80,"priority":0,"host":"172.16.88.192"},{"weight":100,"port":80,"priority":0,"host":"172.16.88.212"},{"weight":100,"port":80,"priority":0,"host":"172.16.88.33"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.147"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.184"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.200"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.216"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.222"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.236"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.241"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.245"},{"weight":100,"port":80,"priority":0,"host":
 
"172.16.89.6"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.117"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.124"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.139"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.142"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.150"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.166"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.184"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.21"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.234"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.45"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.88"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.95"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.97"},{"weight":100,"port":80,"priority":0,"host":"172.16.91.120"},{"weight":100,"port":80,"priority":0,"host":"172.16.91.122"},{"weight":100,"port":80,"priority":0,"host":"172.16.91.138"},{"weight":1
 
00,"port":80,"priority":0,"host":"172.16.91.145"},{"weight":100,"port":80,"priority":0,"host":"172.16.91.153"},{"weight":100,"port":80,"priority":0,"host":"172.16.91.19"},{"weight":100,"port":80,"priority":0,"host":"172.16.91.75"},{"weight":100,"port":80,"priority":0,"host":"172.16.91.78"}]}},
 client: 223.116.236.28, server: _, request: "POST /VideoMusic/AppInit 
HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] balancer.lua:183: 
pick_server(): route: 
{"prev_plugin_config_ver":328217,"orig_plugins":{"ky-traffic-control":{"ab":{"key":"ky-api_api_default","split_type":"distinct_id","enable":false},"header":{"enable":true},"upstreams":[{"instance_name":"stable","id":"f1011655","cluster":"prod-1","name":"ky-api_api_80","service_name":"api"},{"instance_name":"pub","id":"d9fb48ed","cluster":"prod-1","name":"ky-api_api-pub_80","service_name":"api-pub"}]}},"update_count":1,"createdIndex":210632,"key":"\/apisix\/prod-1\/routes\/33cddaff","clean_handlers":{},"has_domain":false,"orig_modifiedIndex":328206,"modifiedIndex":"328206#1","value":{"update_time":1643244706,"upstream_id":"f1011655","status":1,"create_time":1642132143,"uris":["\/*"],"plugin_config_id":"6eef47a8","id":"33cddaff","plugins":{"ky-traffic-control":{"ab":{"key":"ky-api_api_ky123","split_type":"distinct_id","enable":false},"header":{"enable":false},"upstreams":{}}},"labels":{"managed-b
 y":"apisix-ingress-controller"},"desc":"Created by apisix-ingress-controller, 
DO NOT modify it 
manually","priority":0,"name":"ky-api_api-95_default","hosts":["api.ky.cn"]}}, 
client: 223.116.236.28, server: _, request: "POST /VideoMusic/AppInit 
HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] balancer.lua:184: 
pick_server(): ctx: 
{"conf_type":"route","conf_version":"328206#1","conf_id":"33cddaff","route_id":"33cddaff","route_name":"ky-api_api-95_default","balancer_try_count":1,"global_rules":{"need_reload":false,"values":[{"key":"\/apisix\/prod-1\/global_rules\/1","clean_handlers":{},"modifiedIndex":1715,"createdIndex":1152,"value":{"create_time":1639554601,"id":"1","plugins":{"prometheus":{"disable":false,"prefer_name":true},"ky-ngx-vars":{"disable":false}},"update_time":1639562234}}],"etcd_cli":{"is_auth":false,"ssl_verify":true,"is_cluster":true,"endpoints":[{"full_prefix":"http:\/\/172.16.78.232:2379\/v3","scheme":"http","host":"172.16.78.232","port":"2379","http_host":"http:\/\/172.16.78.232:2379","api_prefix":"\/v3"},{"full_prefix":"http:\/\/172.16.78.233:2379\/v3","scheme":"http","host":"172.16.78.233","port":"2379","http_host":"http:\/\/172.16.78.233:2379","api_prefix":"\/v3"},{"full_prefix":"http:\/\/172.16.78.23
 
4:2379\/v3","scheme":"http","host":"172.16.78.234","port":"2379","http_host":"http:\/\/172.16.78.234:2379","api_prefix":"\/v3"}],"serializer":{"deserialize":"function:
 0x7f61c902b6b0","serialize":"function: 
0x7f61c902b6f0"},"timeout":30,"key_prefix":"","sema":{"sem":"cdata<struct 
ngx_http_lua_sema_s *>: 
0x7f61c840c028"},"last_auth_time":1643255881.774,"ttl":-1},"values_hash":{"1":1},"running":true,"key":"\/apisix\/prod-1\/global_rules","item_schema":{"properties":{"create_time":{"type":"integer"},"id":{"anyOf":[{"minLength":1,"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":64},{"type":"integer","minimum":1}]},"plugins":{"type":"object"},"update_time":"table:
 
0x7f61c8607f40"},"type":"object","required":["plugins"]},"health_check_timeout":10,"prev_index":329699,"resync_delay":5,"checker":"function:
 
0x7f61c85d8fa8","automatic":true,"conf_version":3,"sync_times":0,"last_err_time":1643256642},"matched_upstream":{"update_time":1643244706,"scheme":"http","labels":{"managed-by":"a
 
pisix-ingress-controller"},"create_time":1642132143,"id":"f1011655","type":"roundrobin","original_nodes":"table:
 0x7f61c83ed930","desc":"Created by apisix-ingress-controller, DO NOT modify it 
manually","nodes":"table: 
0x7f61c83ed930","timeout":{"connect":5,"read":20,"send":10},"pass_host":"pass","hash_on":"vars","parent":{"key":"\/apisix\/prod-1\/upstreams\/f1011655","clean_handlers":{},"has_domain":false,"modifiedIndex":328216,"createdIndex":210630,"value":"table:
 
0x7f61c83ed7b8"},"name":"ky-api_api_80","nodes_ref":[{"weight":100,"port":80,"priority":0,"host":"172.16.87.109"},{"weight":100,"port":80,"priority":0,"host":"172.16.87.181"},{"weight":100,"port":80,"priority":0,"host":"172.16.87.241"},{"weight":100,"port":80,"priority":0,"host":"172.16.88.112"},{"weight":100,"port":80,"priority":0,"host":"172.16.88.159"},{"weight":100,"port":80,"priority":0,"host":"172.16.88.167"},{"weight":100,"port":80,"priority":0,"host":"172.16.88.182"},{"weight":100,"port":80,"priority":0,"host":"17
 
2.16.88.192"},{"weight":100,"port":80,"priority":0,"host":"172.16.88.212"},{"weight":100,"port":80,"priority":0,"host":"172.16.88.33"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.147"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.184"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.200"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.216"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.222"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.236"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.241"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.245"},{"weight":100,"port":80,"priority":0,"host":"172.16.89.6"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.117"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.124"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.139"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.142"},{"weight":100,"port":80,"priority":0,"host":"172.16.90.150"},{"weight":
 
100,"port":80,"priority":0,"host":"172.16.90.166"},{"weight":100,"port":80,"priority":0,"host":"172
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] init.lua:538: 
http_access_phase(): stash ngx ctx: 6, client: 223.116.236.28, server: _, 
request: "POST /VideoMusic/AppInit HTTP/2.0", host: "api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] balancer.lua:349: run(): 
proxy request to 172.16.91.123:8080 while connecting to upstream, client: 
223.116.236.28, server: _, request: "POST /VideoMusic/AppInit HTTP/2.0", host: 
"api.ky.cn"
   2022/01/27 04:11:34 [info] 36#36: *144572 [lua] init.lua:554: fetch_ctx(): 
fetch ngx ctx: 6 while reading response header from upstream, client: 
223.116.236.28, server: _, request: "POST /VideoMusic/AppInit HTTP/2.0", 
upstream: "http://172.16.91.123:8080/VideoMusic/AppInit";, host: "api.ky.cn"
   ```
   
   `proxy request to 172.16.91.123:8080` 这里的IP端口并没有在上面的upstream里面。
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to