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

The DNS operation timed out after seconds #1058

Closed
thucnd55 opened this issue Feb 20, 2024 · 1 comment
Closed

The DNS operation timed out after seconds #1058

thucnd55 opened this issue Feb 20, 2024 · 1 comment

Comments

@thucnd55
Copy link

  • dnspython version 2.1.0
  • Python version [3.11]

I'm trying to get IPs from domains . My code something like that

resolver = dns.resolver.Resolver(configure=True)
resolver.nameservers = ['8.8.8.8']
 answer = resolver.query("google.com")

I running code on VM in cloud . I wonder that is there any required outbound access of VM instance. But I try open anywhere it still error.

The DNS operation timed out after 5.401741027832031 seconds

@rthalley
Copy link
Owner

I think this must be something specific to your environment, perhaps firewall rules. 5 seconds is the usual dnspython timeout, and if you're getting it it generally means your packets are not getting out, or the replies are not getting in.

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

2 participants