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

   ### Description
   
   Access an upstream discovered through Eureka service via version 3.12 of 
apisix, where the Eureka registered address is a domain name: dev-test.com, not 
an IP address. Access via http://dev-test.com/HJService/info works alone. 
However, when accessed via apisix, the following error occurs:
   
   2025/05/20 11:10:39 [error] 1470660#1470660: *359 [lua] balancer.lua:388: 
run(): failed to set server peer [dev-integ-env.k8s.iflyrec.com:80] err: no 
host allowed while connecting to upstream, client: 10.10.120.117, server: _, 
request: "GET /HJService/info HTTP/1.1", host: "172.30.94.83:9080"
   
   dns resolve  worked good:
   nslookup dev-integ-env.k8s.iflyrec.com 10.255.255.88
   Server:         10.255.255.88
   Address:        10.255.255.88#53
   
   Non-authoritative answer:
   Name:   dev-integ-env.k8s.iflyrec.com
   Address: 172.30.9.198
   
   
   I tried modifying eureka/init.lua, adding logic for domain name resolution 
to IP addresses. The process worked, but I found another issue: the forwarded 
request cannot carry the original domain name of the service discovery target 
node.
   
   
   how to resolve this problem?
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.12
   - Operating system (run `uname -a`): Linux 172.30.94.83 
5.10.0-60.18.0.50.oe2203.x86_64 #1 SMP Wed Mar 30 03:12:24 UTC 2022 x86_64 
x86_64 x86_64 GNU/Linux
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): 
openresty/1.27.1.1
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):  etcd_version":"3.4.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: notifications-unsubscr...@apisix.apache.org.apache.org

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

Reply via email to