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
"[Errno 8] nodename nor servname provided, or not known" error when running gefyra up
#92
Comments
Hey @cappuc - thank you very much for reporting the issue, you're amazing! 🥇 I'm using Anyways, I dug into the code and suspect that this line is responsible for the error: At that point we're trying to find out some things about your local docker network. I suspect that - for some reason we're not able to resolve your hostname. At least this would probably result in the same error message. Note for me - reproduce the message with: socket.getaddrinfo(socket.gethostname() + "random", None) Do you happen to have a Python interpreter installed on your machine? import socket
socket.getaddrinfo(socket.gethostname(), None) If you feel like there are any sensible information about your network in the output - feel free to edit the IP addresses. |
Hey @SteinRobert, The error is from the Python 3.9.13 (main, May 24 2022, 21:28:44)
[Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.gethostname()
'MacBook-Pro-di-Fabio.local'
>>> socket.getaddrinfo(socket.gethostname(), None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 954, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known |
Hey @cappuc - this does help us a lot! Thank you very much. Now we just need to figure out how to address the issue :D |
Thank you! If you need some other testing, let me know |
@cappuc just looked into this - could you please try the following in your python interpreter? import socket
socket.gethostbyname(socket.gethostname()
socket.getaddrinfo(socket.gethostbyname(socket.gethostname()), None) Thank you! |
I have the same error calling Python 3.9.13 (main, May 24 2022, 21:28:44)
[Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.gethostbyname(socket.gethostname())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
socket.gaierror: [Errno 8] nodename nor servname provided, or not known |
I don't know if this is the result you need but with Python 3.9.13 (main, May 24 2022, 21:28:44)
[Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.gethostbyname('localhost')
'127.0.0.1'
>>> socket.getaddrinfo('localhost', None)
[
(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('127.0.0.1', 0)),
(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 0)),
(<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('::1', 0, 0, 0)),
(<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('::1', 0, 0, 0))
]
>>> |
I suspect it has something to do with the import socket
socket.getaddrinfo(socket.gethostname().replace(".local", ""), None) Thank you very much for your patience! |
Python 3.9.13 (main, May 24 2022, 21:28:44)
[Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.getaddrinfo(socket.gethostname().replace(".local", ""), None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 954, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known |
I found a temporary solution from stackoverflow. If I enable file sharing it works (but it stop working if I disable it): Python 3.9.13 (main, May 24 2022, 21:28:44)
[Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.getaddrinfo(socket.gethostname(), None)
[
(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('127.0.0.1', 0)),
(<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('::1', 0, 0, 0)),
(<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('::1', 0, 0, 0)),
(<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('fe80::1', 0, 0, 1)),
(<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('fe80::1', 0, 0, 1)),
(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 0)),
(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('192.168.1.99', 0)),
(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('192.168.1.99', 0)),
(<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('fe80::b:ffa7:475b:6f9e', 0, 0, 6)),
(<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('fe80::b:ffa7:475b:6f9e', 0, 0, 6))
] |
Oh well, thank you. I was somewhat hoping that the https://bugs.python.org/issue29705 Trying to figure out if this is a Python thing or it something on a lower level could you tell me what this command prints? nslookup $(hostname) €dit: Thanks! This is interesting - file sharing is disabled on my Mac and it still works. 🤔 Well this seems to have something to do with the OS settings and version then... €dit2: Just wondering - the time of your interpreter seems to be always the same. I guess it does not have something to do with this issue - was just wondering if you have any special OS settings or restrictions in place. |
It seems to be a macOs issue but maybe they fixed it in monterey.
I think that |
Thank you. I just found another method which might work. What does the following return for you? import socket
socket.gethostbyname_ex(socket.gethostname()) |
Same error: Python 3.9.13 (main, May 24 2022, 21:28:44)
[Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.gethostbyname_ex(socket.gethostname())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
socket.gaierror: [Errno 8] nodename nor servname provided, or not known |
Hi @cappuc thanks a bunch for your patience and support. I would be super happy if you may confirm it working and report the current state on your machine. |
Hi @Schille, Thank you! |
Hi,
I'm following the instruction to try gefyra but when I run
gefyra up
, it fails with this error.Here is the full log for
gefyra --debug up
:I've already some docker networks so maybe there is some conflict with existing networks:
System info:
OS: macOs Big Sur 11.6
Docker desktop: 4.8.2 (engine: 20.10.14)
Gefyra installed from homebrew
The text was updated successfully, but these errors were encountered: