You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "bin-53 (via GitHub)" <gi...@apache.org> on 2023/05/24 05:18:53 UTC

[GitHub] [apisix] bin-53 opened a new issue, #9537: consul fetch nodes failed

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: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] lingsamuel commented on issue #9537: consul fetch nodes failed

Posted by "lingsamuel (via GitHub)" <gi...@apache.org>.
lingsamuel commented on issue #9537:
URL: https://github.com/apache/apisix/issues/9537#issuecomment-1596385686

   Close, as answered. If there are any further questions, feel free to reopen or file a new issue.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] hulining commented on issue #9537: consul fetch nodes failed

Posted by "hulining (via GitHub)" <gi...@apache.org>.
hulining commented on issue #9537:
URL: https://github.com/apache/apisix/issues/9537#issuecomment-1560813304

   Maybe your "service_name" config is wrong, please check. See [consul_kv/#upstream-setting](https://apisix.apache.org/docs/apisix/2.15/discovery/consul_kv/)


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] Fabriceli commented on issue #9537: consul fetch nodes failed

Posted by "Fabriceli (via GitHub)" <gi...@apache.org>.
Fabriceli commented on issue #9537:
URL: https://github.com/apache/apisix/issues/9537#issuecomment-1563157981

   if you want to use consul you can get more info: [How to Integrate API Gateway and Consul? Not Consul K/V](https://apisix.apache.org/blog/2023/01/18/consul-with-apisix/)


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] lingsamuel closed issue #9537: consul fetch nodes failed

Posted by "lingsamuel (via GitHub)" <gi...@apache.org>.
lingsamuel closed issue #9537: consul   fetch nodes failed
URL: https://github.com/apache/apisix/issues/9537


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org