unreal-altran opened a new issue, #9033: URL: https://github.com/apache/apisix/issues/9033
### Current Behavior The bug is linked to the same enviroment/context describe in this [issue](https://github.com/apache/apisix/issues/9032) For all versions of consult with which the integration works properly: consul:1.8 ok consul:1.10 ok consul:1.11 ok consul:1.12 ok consul:1.13 ok consul:1.14 oK if a consul service is added with DNS names instead of IPs, APISix while correctly retrieving the service from consul discovery, fails in the creating the upstream. Everything works fine if you only use IP addresses. ``` # Register with the corresponding IP and port --> works well on ApiSix curl --location --request PUT 'http://127.0.0.1:8500/v1/agent/service/register' \ --header 'Content-Type: application/json' \ --data '{ "ID": "service_a1", "Name": "service_a", "Tags": ["primary", "v1"], "Address": "172.21.0.5", "Port": 9081, "Weights": { "Passing": 10, "Warning": 1 } }' ``` # Register with the corresponding DNS and port not works on ApiSix curl --location --request PUT 'http://127.0.0.1:8500/v1/agent/service/register' \ --header 'Content-Type: application/json' \ --data '{ "ID": "service_a1", "Name": "service_a", "Tags": ["primary", "v1"], "Address": "myservice.mysubdomain.com", "Port": 9081, "Weights": { "Passing": 10, "Warning": 1 } }' ### Expected Behavior That the consul discovery works well and then: the first request curl -s http://127.0.0.1:9080/consul/web/ Output hello web2% the second request curl -s http://127.0.0.1:9080/consul/web/ Output hello web1% ### Error Logs 2023/03/07 08:16:22 [error] 68#68: *50298 [lua] balancer.lua:388: run(): failed to set server peer [myservice.mysubdomain.com:9081] err: no host allowed while connecting to upstream, client: 100.64.0.7, server: _, request: "GET /consul/web/ HTTP/1.1", host: "apisix-gateway.apps.lab.okd.devops.com:30732" ### Steps to Reproduce The same step in this [guide](https://apisix.apache.org/blog/2023/01/18/consul-with-apisix/) with docker or installation with helm on k8s (same behaviour). Use all DNS name instead IP address. ### Environment Environment APISIX 3.2 Consul 1.8 to 1.14.x -- 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]
