bin-53 opened a new issue, #9537:
URL: https://github.com/apache/apisix/issues/9537

   ### Description
   
   When I used apisix's service discovery feature (consul), apisix could not 
get the service node, see the following error message:
   ```
   2023/05/24 13:16:01 [error] 27513#42285070: *82056 [lua] init.lua:78: 
nodes(): fetch nodes failed by netauth-sso, return default service, client: 
127.0.0.1, server: _, request: "GET /consul/sms/getpublicconfig HTTP/1.1", 
host: "10.20.11.29:8180"
   2023/05/24 13:16:01 [error] 27513#42285070: *82056 [lua] init.lua:590: 
http_access_phase(): failed to set upstream: no valid upstream node: nil, 
client: 127.0.0.1, server: _, request: "GET /consul/sms/getpublicconfig 
HTTP/1.1", host: "10.20.11.29:8180"
   ```
   
   apisix config:
   ```
   discovery:
     consul_kv:
       servers:
         - "http://10.210.21.150:8500";
   ``` 
   the route config:
   ```
   {
     "uris": [
       "/consul/*",
       "/*"
     ],
     "name": "consul_Kv",
     "priority": 1,
     "methods": [
       "GET",
       "POST",
       "PUT",
       "DELETE",
       "PATCH",
       "HEAD",
       "OPTIONS",
       "CONNECT",
       "TRACE",
       "PURGE"
     ],
     "plugins": {
       "proxy-rewrite": {
         "regex_uri": [
           "^/consul(/|$)(.*)",
           "/$2"
         ]
       }
     },
     "upstream": {
       "retries": 1,
       "timeout": {
         "connect": 6,
         "send": 6,
         "read": 6
       },
       "type": "roundrobin",
       "scheme": "http",
       "discovery_type": "consul_kv",
       "pass_host": "pass",
       "service_name": "netauth-sso",
       "keepalive_pool": {
         "idle_timeout": 60,
         "requests": 1000,
         "size": 320
       }
     },
     "labels": {
       "API_VERSION": "x"
     },
     "status": 1
   }
   ```
   
   What's the problem, please
   
   
   ### Environment
   
   - APISIX version (run `apisix version`):apisix 2.15.  etcd:3.4.15
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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