Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS query for X failed: too many retries. #84

Closed
avg0043 opened this issue Oct 26, 2017 · 10 comments
Closed

DNS query for X failed: too many retries. #84

avg0043 opened this issue Oct 26, 2017 · 10 comments

Comments

@avg0043
Copy link

avg0043 commented Oct 26, 2017

I'm getting this Exception error message from file "/react/dns/src/Query/RetryExecutor.php":

DNS query for X failed: too many retries

I'm using 8.8.8.8 dns server and my libraries version are:
"react/http-client": "0.4.17"
"react/dns":"0.4.11"

I have tried using OpenDNS (208.67.222.222 and 208.67.220.220) but the problems persists...

How can I solve this? Thanks.

@clue
Copy link
Member

clue commented Oct 26, 2017

Thanks for reporting! Similar issues have been reported before and we're currently not aware of any such issues.

Have you tried the search and in particular seen #78 (comment)?

@avg0043
Copy link
Author

avg0043 commented Oct 26, 2017

This error doesn't happen all the time, but generally yes. I'm using Ubuntu 16.04 but I have tried in another machine using Windows 10 system and the exception is thrown too..

@clue
Copy link
Member

clue commented Oct 26, 2017

Have you checked out the above links?

Here's what the "DNS query for www.google.com failed: too many retries" error basically means: This component sends a UDP message (DNS query) to your DNS server and waits for a reply. If no answer is received within 5s, it will send a new UDP message and then another one again if no answer is received. If an answer is received, it will verify the response message and resolve the promise. The error shows that no answer has been received.

So this basically means that we did not receive a reply messageg from your DNS server. This could be due to a number of reasons and could very likely be not something this package has control over.

If this does not happen all the time, if may be due to the fact that your network drops certain packages. Can you try running this from another network / host?

@avg0043
Copy link
Author

avg0043 commented Oct 27, 2017

Now I can't test this from another network.. So if someone finds the solution, please share it.
I need to realize thousands of http requests.. Thanks!

@clue
Copy link
Member

clue commented Oct 27, 2017

Unfortunately, we're currently unable to reproduce the problem you're seeing. Can you provide a gist for us to reproduce this?

@clue
Copy link
Member

clue commented Nov 7, 2017

Closing this due to a lack of feedback, as we can not reproduce this. Please come back with more details if this problem persists and we can reopen this 👍

@aikar
Copy link

aikar commented Jan 22, 2024

If anyone comes across this in googling, One source of this issue is using Tcp Transport and getting a large response back for TXT records.

You pretty much must use Udp instead of Tcp for reliable answers.

@clue
Copy link
Member

clue commented Jan 22, 2024

If anyone comes across this in googling, One source of this issue is using Tcp Transport and getting a large response back for TXT records.

You pretty much must use Udp instead of Tcp for reliable answers.

@aikar Please note you're commenting on a ticket that is several years old and your description doesn't match with what's been described here so far. If you are experiencing any issues, I would ask you to create a new ticket so we can take a look at this specifically.

In particular, this ticket here deals with a pre-1.0 version that didn't fully support loading default DNS configuration, automatically selecting TCP and UDP transports and didn't fully report many of the underlying error conditions. All of this has improved significantly ever since, so I invite you to run your tests with up-to-date components and report back if this problem persists.

@aikar
Copy link

aikar commented Jan 23, 2024

@clue I am very much aware how old this is, but this is what comes up when you google for this error, so i wanted to share a potential source of the issue for others having this problem and hitting a dead end. I am not trying to 'file a new issue'.

In my case i was not using the SelectiveTransportExecutor, as I am needing to use the executors directly, and needed to switch to using it, so im simply making sure anyone else who stumbles on this ticket gets the same solution.

And to add more follow up info - make sure your DNS resolver supports TCP mode. If your firewall is allowing UDP only, you will end up seeing this error. Remove your Retry Executor to see what error is generating the retries.

@SimonFrings
Copy link
Member

@aikar I think it's great to share your insights in this ticket in order to move forward in finding a solution, as this hasn't been completely resolved for those encountering this error message. It was also a bit difficult for me to see the relation to this ticket from your first comment, so thanks for the additional input.

We're still not able to reproduce this error message, so it is hard to say if you're suggested solutions will work, but I think it's a good starting point for those stuck with this error 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants