dyrnq opened a new issue, #8827:
URL: https://github.com/apache/apisix/issues/8827

   ### Current Behavior
   
   ```bash
   curl -fsL http://127.0.0.1:9090/v1/discovery/consul/dump | jq
   {
     "config": {
       "weight": 1,
       "fetch_interval": 3,
       "servers": [
         "http://127.0.0.1:8500";
       ],
       "timeout": {
         "wait": 60,
         "read": 2000,
         "connect": 2000
       },
       "keepalive": true
     },
     "services": {
       "netshoot-2-netshoot-group": [
         {
           "weight": 1,
           "port": 8080,
           "host": "10.5.42.20"
         }
       ],
       "nomad": [
         {
           "weight": 1,
           "port": 4648,
           "host": "192.168.33.4"
         },
         {
           "weight": 1,
           "port": 4646,
           "host": "192.168.33.4"
         },
         {
           "weight": 1,
           "port": 4647,
           "host": "192.168.33.4"
         }
       ],
       "nomad-client": [
         {
           "weight": 1,
           "port": 4646,
           "host": "192.168.33.4"
         }
       ]
     }
   }
   ```
   
   
   ```bash
   curl -fsSL 
http://127.0.0.1:8500/v1/catalog/service/netshoot-2-netshoot-group |jq -r 
".[].ServiceAddress"
   10.5.42.20
   10.5.53.28
   10.5.53.26
   10.5.53.27
   10.5.37.30
   10.5.93.25
   10.5.93.23
   10.5.93.2
   10.5.93.24
   10.5.93.22
   ```
   
   
   ### Expected Behavior
   
   get all svc endpotins on this consul agent and other consul agent
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   1、run apisix 3.1.0
   2、config disconvery
   ```bash
   discovery:                       # service discovery center
     dns:
       servers:
         - "127.0.0.1:8600"         # use the real address of your dns server
     consul:
       servers:
         - "http://127.0.0.1:8500";
   ```
   3、put route
   ```bash
   curl http://127.0.0.1:9180/apisix/admin/routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
     "uri": "/",
     "name": "consul-netshoot-2-netshoot-group",
     "upstream": {
       "timeout": {
         "connect": 6,
         "send": 6,
         "read": 6
       },
       "type": "roundrobin",
       "scheme": "http",
       "discovery_type": "consul",
       "pass_host": "pass",
       "service_name": "netshoot-2-netshoot-group",
       "keepalive_pool": {
         "idle_timeout": 60,
         "requests": 1000,
         "size": 320
       }
     }
   }'
   ```
   
   ### Environment
   
   - APISIX version (run `apisix version`): docker.io/apache/apisix:3.1.0-debian
   - Operating system (run `uname -a`): `Linux vm4 5.4.0-132-generic 
#148-Ubuntu SMP Mon Oct 17 16:02:06 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux`
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`): 
`{"id":"ecd7565b-73f0-4c62-8cf2-20d42eb2766d","hostname":"9e6fc857823c","boot_time":1676009281,"etcd_version":"3.5.0","version":"3.1.0"}`
   - 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