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

[Windows] Only first dns server on the list queried #596

Open
jacekchalupka opened this issue Jan 10, 2020 · 1 comment
Open

[Windows] Only first dns server on the list queried #596

jacekchalupka opened this issue Jan 10, 2020 · 1 comment

Comments

@jacekchalupka
Copy link

With eventlet-0.25.1

Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import eventlet
>>> eventlet.monkey_patch()
>>> import socket
>>> socket.getaddrinfo('google.com', 0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\virtualenvs\dev\lib\site-packages\eventlet\support\greendns.py", line 537, in getaddrinfo
    raise socket.gaierror(socket.EAI_NONAME, 'No address found')
socket.gaierror: [Errno 11001] No address found

Without monkey_patching:

Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.getaddrinfo('google.com', 0)
[(<AddressFamily.AF_INET: 2>, 0, 0, '', ('172.217.164.110', 0))]

It is not #589, because:

>>> import eventlet
>>> eventlet.monkey_patch()
>>> import dns.resolver
>>> dns.resolver.Resolver().nameservers
['10.5.88.20', '10.5.88.23', '8.8.8.8', '8.8.4.4', '10.1.0.20']

After catching packets with Wireshark I noticed that after monkey_patching only first DNS server on the list is queried and on my setup it is not responding right now.

@zhangyangyu
Copy link

The green dns.getaddrinfo uses dnspython. According to rthalley/dnspython#367 the behavior is expected.

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

No branches or pull requests

2 participants