albertz / background-zmq-ipython

Background ZMQ IPython/Jupyter kernel
BSD 2-Clause "Simplified" License
17 stars 4 forks source link

Sometimes gethostbyname() fails #13

Open user202729 opened 2 years ago

user202729 commented 2 years ago

On macOS, sometimes the line

ip = socket.gethostbyname(socket.gethostname())

fails with the message gaierror: [Errno 8] nodename nor servname provided, or not known

Actually I'm not sure if this is the package's fault or not, since ping $(hostname) also fails.

There's workaround of passing allow_remote_connection=False, but this is only available in a new (git-only, not pushed to pypi?) version

TODO test if 0.0.0.0 is sufficient to allow binding from any port?