zhikaichen123 commented on issue #4874:
URL: https://github.com/apache/apisix/issues/4874#issuecomment-904430469


   > When I try to reproduce it via:
   > 
   > ```
   > === TEST 13: set route(with upstream)
   > --- FIRST
   > --- config
   >     location /t {
   >         content_by_lua_block {
   >             local t = require("lib.test_admin").test
   >             local code, body = t('/apisix/admin/upstreams/1',
   >                 ngx.HTTP_PUT,
   >                 [[{
   >                     "nodes": {
   >                         "yhk.market.alicloudapi.com:1980": 1
   >                     },
   >                     "type": "roundrobin",
   >                     "desc": "new upstream"
   >                 }]]
   >                 )
   > 
   >             if code >= 300 then
   >                 ngx.status = code
   >                 ngx.say(body)
   >                 return
   >             end
   > 
   >             local code, body = t('/apisix/admin/routes/1',
   >                 ngx.HTTP_PUT,
   >                 [[{
   >                     "uri": "/server_port",
   >                     "upstream_id": "1"
   >                 }]]
   >                 )
   > 
   >             if code >= 300 then
   >                 ngx.status = code
   >             end
   >             ngx.say(body)
   >         }
   >     }
   > --- request
   > GET /t
   > --- response_body
   > passed
   > --- no_error_log
   > [error]
   > 
   > 
   > 
   > === TEST 14: roundrobin
   > --- config
   > location /t {
   >     content_by_lua_block {
   >         local t = require("lib.test_admin").test
   >         local bodys = {}
   >         for i = 1, 3 do
   >             local _, _, body = t('/server_port', ngx.HTTP_GET)
   >             bodys[i] = body
   >         end
   >         table.sort(bodys)
   >         ngx.say(table.concat(bodys, ", "))
   >     }
   > }
   > --- request
   > GET /t
   > --- response_body
   > 1980, 1981, 1981
   > --- no_error_log
   > [error]
   > ```
   > 
   > I got error log `run(): proxy request to 47.110.211.55:1980`, which is 
equal to the result got via dig:
   > 
   > ```
   > dig yhk.market.alicloudapi.com
   > 
   > ; <<>> DiG 9.16.1-Ubuntu <<>> yhk.market.alicloudapi.com
   > ;; global options: +cmd
   > ;; Got answer:
   > ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57466
   > ;; flags: qr rd ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
   > ;; WARNING: recursion requested but not available
   > 
   > ;; QUESTION SECTION:
   > ;yhk.market.alicloudapi.com.    IN      A
   > 
   > ;; ANSWER SECTION:
   > yhk.market.alicloudapi.com. 0   IN      CNAME   
d6e9851ee5654feb8a3060c085e57bd4-cn-hangzhou.alicloudapi.com.
   > d6e9851ee5654feb8a3060c085e57bd4-cn-hangzhou.alicloudapi.com. 0 IN A 
47.110.211.55
   > 
   > ;; Query time: 39 msec
   > ;; SERVER: 172.24.80.1#53(172.24.80.1)
   > ;; WHEN: 二 8月 24 16:05:39 CST 2021
   > ;; MSG SIZE  rcvd: 220
   > ```
   > 
   > No resolver error was found.
   
   
     谢谢回复!是这样的 
     直接在ECS上运行,原始域名的跟cname域名都能正常转发; 部署在阿里的k8s集群上,就会报上面的错误
   


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