xianshun163 commented on issue #5767:
URL: https://github.com/apache/apisix/issues/5767#issuecomment-995393922
I write a log at the upstream.lua at 250 line:
246 local new_nodes, err = dis.nodes(up_conf.service_name,
up_conf.discovery_args)
247 if not new_nodes then
248 return HTTP_CODE_UPSTREAM_UNAVAILABLE, "no valid
upstream node: " .. (err or "nil")
249 end
>> 250 core.log.warn("upstream.lua return
nodes:",core.json.delay_encode(new_nodes,true)) --- here is the log I add
251 local same = upstream_util.compare_upstream_node(up_conf,
new_nodes)
252 if not same then
and when I make a call , the log will tell me that is two node ,they
are all like each other. here is the log:
2021/12/16 10:46:54 [warn] 24648#24648: *39459760 [lua] upstream.lua:250:
set_upstream(): upstream.lua return
nodes:[{"weight":1,"host":"172.16.11.13","port":8086},{"weight":1,"host":"172.16.11.13","port":8086}],
client: 127.0.0.1, server: _, request: "GET /demo1026-13/index HTTP/1.1",
host: "local.xsapp.org"
------- here is my route config:
{
"uri": "/demo1026-13/*",
"name": "测试nacos-13",
"plugins": {
"proxy-rewrite": {
"regex_uri": [
"^/demo1026-13/(.*)",
"/${1}"
]
}
},
"upstream": {
"type": "roundrobin",
"hash_on": "vars",
"scheme": "http",
"discovery_type": "nacos",
"pass_host": "pass",
"service_name": "demo1026"
},
"status": 1
}
---- here is my call
curl -i -X GET http://127.0.0.1:9080/demo1026-13/index -H
"api-key-auth: key-of-sam"
I have config only route and upstream, so, that is tow duplicates.
If I config a service too, that will be three duplicates.
--
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]