sweetpotatoman commented on issue #7026:
URL: https://github.com/apache/apisix/issues/7026#issuecomment-1124499372
> > When the log returns `no valid upstream node: nil`, we are not quite
sure what's wrong.
> > Why are we still unable to find upstream node with this configuration?
>
> Are there any other error logs? Or you can adjust the log level to debug
to get more logs.
>
> This is usually the case when APISIX is unable to query a valid message
from k8s.
the log level is `debug` in now.
```
...
nginx_config:
error_log_level: "debug"
...
```
log message
```
2022/05/12 03:37:55 [info] 43#43: *35664 [lua] radixtree.lua:564:
match_route_opts(): hosts match: true, client: 172.20.4.221, server: _,
request: "GET /explorer/graphiql HTTP/1.1", host: "xxx-api.xxx.io"
2022/05/12 03:37:55 [info] 43#43: *35664 [lua] init.lua:388:
http_access_phase(): matched route:
{"clean_handlers":{},"modifiedIndex":177,"createdIndex":176,"value":{"labels":{"app":"one"},"create_time":1652326626,"status":1,"name":"graphiql","priority":0,"uri":"\/explorer\/graphiql","desc":"123","methods":["GET","POST"],"upstream_id":"407087917031228312","host":"xxx-api.xxx.io","id":"407345815439279060","update_time":1652326641},"key":"\/apisix\/routes\/407345815439279060","orig_modifiedIndex":177,"update_count":0,"has_domain":false},
client: 172.20.4.221, server: _, request: "GET /explorer/graphiql HTTP/1.1",
host: "xxx-api.xxx.io"
2022/05/12 03:37:55 [info] 43#43: *35664 [lua] init.lua:305:
get_upstream_by_id(): parsed upstream:
{"clean_handlers":{},"createdIndex":79,"value":{"create_time":1652172906,"discovery_type":"kubernetes","update_time":1652241806,"service_name":"testnet\/explorer-reader:http-80","hash_on":"vars","scheme":"http","type":"roundrobin","pass_host":"pass","keepalive_pool":{"idle_timeout":60,"size":320,"requests":1000},"timeout":{"read":6,"send":6,"connect":6},"name":"explorer-reader","desc":"explorer-reader","id":"407087917031228312","parent":{"clean_handlers":"table:
0x7fdd4917e0b0","createdIndex":79,"value":"table:
0x7fdd4cad5c70","key":"\/apisix\/upstreams\/407087917031228312","modifiedIndex":162,"has_domain":false}},"key":"\/apisix\/upstreams\/407087917031228312","modifiedIndex":162,"has_domain":false},
client: 172.20.4.221, server: _, request: "GET /explorer/graphiql HTTP/1.1",
host: "xxx-api.xxx.io"
2022/05/12 03:37:55 [info] 43#43: *35664 [lua] init.lua:317: nodes(): get
empty endpoint version from discovery DICT testnet/explorer-reader, client:
172.20.4.221, server: _, request: "GET /explorer/graphiql HTTP/1.1", host:
"xxx-api.xxx.io"
2022/05/12 03:37:55 [error] 43#43: *35664 [lua] init.lua:512:
http_access_phase(): failed to set upstream: no valid upstream node: nil,
client: 172.20.4.221, server: _, request: "GET /explorer/graphiql HTTP/1.1",
host: "xxx-api.xxx.io"
2022/05/12 03:37:57 [info] 45#45: *37332 [lua] radixtree.lua:564:
match_route_opts(): hosts match: false, client: 172.20.29.104, server: _,
request: "GET / HTTP/1.1", host: "172.20.61.219:9080"
2022/05/12 03:37:57 [info] 45#45: *37332 [lua] init.lua:383:
http_access_phase(): not find any matched route, client: 172.20.29.104, server:
_, request: "GET / HTTP/1.1", host: "172.20.61.219:9080"
2022/05/12 03:37:57 [info] 46#46: *37336 [lua] radixtree.lua:564:
match_route_opts(): hosts match: false, client: 172.20.4.221, server: _,
request: "GET / HTTP/1.1", host: "172.20.61.219:9080"
2022/05/12 03:37:57 [info] 46#46: *37336 [lua] init.lua:383:
http_access_phase(): not find any matched route, client: 172.20.4.221, server:
_, request: "GET / HTTP/1.1", host: "172.20.61.219:9080"
172.20.4.221 - - [12/May/2022:03:37:55 +0000] xxx-api.xxx.io "GET
/explorer/graphiql HTTP/1.1" 503 596 0.000 "-" "Mozilla/5.0 (Macintosh; Intel
Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54
Safari/537.36" - - - "http://xxx-api.xxx.io"
```
--
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]