wklken opened a new issue, #10093:
URL: https://github.com/apache/apisix/issues/10093
### Current Behavior
In our production, when the dns server reload frequently.
The requests will be all fail, while the dns resolution not ok `failed to
parse domain: test.com, error: failed to query the DNS server: dns client
error: 101 empty record received`;
But when the dns server is stable, the dns resolution of apisix did not
resume immediately, the requests got error `[lua] init.lua:486:
handle_upstream(): failed to set upstream: no valid upstream node` for hours,
until we do `apisix reload`, the dns turns ok.
And from the log, one apisix instance with 4 processes, 3 processes got the
dns failed, 1 processes got no error all the requests are ok.
---
apisix/core/dns/client.lua
```lua
function _M.resolve(self, domain, selector)
local client = self.client
local answers, err = client.resolve(domain)
if not answers then
return nil, "failed to query the DNS server: " .. err
end
```
how the `client.resolve` detect the dns server is ok?
### Expected Behavior
dns resolution resume immediately
### Error Logs
[lua] upstream.lua:79: parse_domain_for_nodes(): dns resolver domain:
test.com error: failed to query the DNS server: dns client error: 101 empty
record received
[lua] resolver.lua:80: parse_domain(): failed to parse domain: test.com,
error: failed to query the DNS server: dns client error: 101 empty record
received
### Steps to Reproduce
For now, I cannot reproduce it, but it has occurred three times in our
production.
Any clues or advice for making dns server reload frequently?
### Environment
- APISIX version (run `apisix version`): 3.2.1
- Operating system (run `uname -a`):
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`): nginx
version: openresty/1.21.4.1
- etcd version, if relevant (run `curl
http://127.0.0.1:9090/v1/server_info`):
- 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]