You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/11/17 01:18:44 UTC

[GitHub] [apisix] tzssangglass opened a new issue, #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

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

   ### Discussed in https://github.com/apache/apisix/discussions/8338
   
   <div type='discussions-op-text'>
   
   <sup>Originally posted by **Fabriceli** November 16, 2022</sup>
   Version info:
   - APISIX 3.0.0
   - Consul 1.9.5
   - Linux arch x86_64
   
   ERROR:
   ```sh
   [error] 43382#43382: *1626 [lua] init.lua:428: handle_upstream(): failed to set upstream: no valid upstream node: failed to query the DNS server: dns server error: 3 name error, client: a.a.a.a, server: _, request: "GET /api/v0/test/ HTTP/1.1", host: "b.b.b.b"
   ```
   
   with `/usr/local/apisix/conf/config.yaml`:
   ```yaml
   discovery:
     dns:
       servers:
         - "x.x.x.x:8600" 
         - "y.y.y.y:8600"
   ```
   service A is **only** valid in Consul y.y.y.y:8600. APISIX is not support multi Consul DNS? </div>


-- 
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] Fabriceli commented on issue #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

Posted by GitBox <gi...@apache.org>.
Fabriceli commented on issue #8345:
URL: https://github.com/apache/apisix/issues/8345#issuecomment-1321553811

   @tokers
   for this feature, I create a Consul register not Consul with kv, May I create a PR to merger in master? for help other guys


-- 
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] tzssangglass commented on issue #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #8345:
URL: https://github.com/apache/apisix/issues/8345#issuecomment-1318145247

   > How to fix it ?
   
   I don't think it needs to be fixed. I think this is a new feature. I don't have any good ideas to implement it at the moment.
   


-- 
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 #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

Posted by GitBox <gi...@apache.org>.
Fabriceli commented on issue #8345:
URL: https://github.com/apache/apisix/issues/8345#issuecomment-1323090469

   > 
   
   I created [#8371](https://github.com/apache/apisix/issues/8371), Could you assign this feature to me?


-- 
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 #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

Posted by GitBox <gi...@apache.org>.
Fabriceli commented on issue #8345:
URL: https://github.com/apache/apisix/issues/8345#issuecomment-1322289875

   @tokers please assign it to me


-- 
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] tokers commented on issue #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #8345:
URL: https://github.com/apache/apisix/issues/8345#issuecomment-1319435776

   > > I think a good way to support this is to let users define multiple DNS service registries, and for each registry, one can define a group of DNS servers, which are the same for the domain resolving. While for different DNS service registries, the resolve result might be different.
   > 
   > I think on a high level, this requires APISIX discovery mode to support multiple clusters and orchestrate query rules.
   
   Right.


-- 
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] shreemaan-abhishek commented on issue #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

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

   closing this as completed by #8380


-- 
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] tokers commented on issue #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #8345:
URL: https://github.com/apache/apisix/issues/8345#issuecomment-1321806729

   > @tokers for this feature, I create a Consul register not Consul with kv, May I create a PR to merger in master? for help other guys
   
   That's cool. Welcome to submit PR!


-- 
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] tzssangglass commented on issue #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #8345:
URL: https://github.com/apache/apisix/issues/8345#issuecomment-1318407946

   > When can add this new feature? or make a discussion about this feature at next Community Weekly Meeting
   
   Yes, if there is a community meeting in the near future, we will let you know in the discussion and on the mailing list.


-- 
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 #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

Posted by GitBox <gi...@apache.org>.
Fabriceli commented on issue #8345:
URL: https://github.com/apache/apisix/issues/8345#issuecomment-1318203323

   When can add this new feature? or make a discussion about this feature at next Community Weekly Meeting


-- 
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] tokers commented on issue #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #8345:
URL: https://github.com/apache/apisix/issues/8345#issuecomment-1322849705

   > @tokers please assign it to me
   
   We can create another issue to track the new consul service discovery.


-- 
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] shreemaan-abhishek closed issue #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek closed issue #8345: request help: APISIX retuen error 3 name error with multi Consul DNS
URL: https://github.com/apache/apisix/issues/8345


-- 
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 #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

Posted by GitBox <gi...@apache.org>.
Fabriceli commented on issue #8345:
URL: https://github.com/apache/apisix/issues/8345#issuecomment-1318089420

   How to fix it ? 


-- 
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] tokers commented on issue #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #8345:
URL: https://github.com/apache/apisix/issues/8345#issuecomment-1318383895

   @tzssangglass I think a good way to support this is to let users define multiple DNS service registries, and for each registry, one can define a group of DNS servers, which are the same for the domain resolving. While for different DNS service registries, the resolve result might be different.


-- 
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] tzssangglass commented on issue #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #8345:
URL: https://github.com/apache/apisix/issues/8345#issuecomment-1318069142

   hi @Fabriceli , I eventually tracked it down here: https://github.com/openresty/lua-resty-dns/blob/master/lib/resty/dns/resolver.lua#L870-L896
   
   ```
               for _ = 1, 128 do
                   buf, err = sock:receive(4096)
                   if err then
                       local server = _get_cur_server(self)
                       err = "failed to receive reply from UDP server "
                           .. concat(server, ":") .. ": " .. err
                       break
                   end
   
   
                   if buf then
                       local answers
                       answers, err = parse_response(buf, id, opts)
                       if err == "truncated" then
                           answers, err = _tcp_query(self, query, id, opts)
                       end
   
   
                       if err and err ~= "id mismatch" then
                           break
                       end
   
   
                       if answers then
                           return answers, nil, tries
                       end
                   end
                   -- only here in case of an "id mismatch"
               end
           end
   ```
   
   1. first query "service-name-x.service.dc-name-x.consul" from `x.x.x.x:8600`
   2. then get the `buf`, and `err` is nil, so it won't go into ` if err then`, just `parse_response(buf, id, opts)` and the answers is
   
   ```
   {
     errcode = 3,
     errstr = "name error"
   }
   ```
   
   3. and then return this error directly, won't try to query on `y.y.y.y:8600` again.
   
   > or multi DNS, APISIX is not work like this ??:
   <img width="845" alt="image" src="https://user-images.githubusercontent.com/30819887/202358605-08407b84-24e2-4af1-8229-7cc99efc5057.png">
   
   yes


-- 
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] tzssangglass commented on issue #8345: request help: APISIX retuen error 3 name error with multi Consul DNS

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #8345:
URL: https://github.com/apache/apisix/issues/8345#issuecomment-1318406309

   > I think a good way to support this is to let users define multiple DNS service registries, and for each registry, one can define a group of DNS servers, which are the same for the domain resolving. While for different DNS service registries, the resolve result might be different.
   
   I think on a high level, this requires APISIX discovery mode to support multiple clusters and orchestrate query rules.


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