2020-02-02

Jupyter server OSError: [Errno 99] Cannot assign requested address

If you run into this error:
OSError: [Errno 99] Cannot assign requested address
a likely fix is going to /etc/hosts and pointing localhost only to ipv4 loopback (127.0.0.1), not to ipv6's (::1).

For example, on my computer, /etc/hosts looks like this:

127.0.0.1       localhost

# The following lines are desirable for IPv6 capable hosts
::1     localhost       ip6-localhost   ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

xxx.xxx.xxx.xxx  tinyai  tinyai

Just change it to


127.0.0.1       localhost

# The following lines are desirable for IPv6 capable hosts
::1           ip6-localhost   ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

xxx.xxx.xxx.xxx  tinyai  tinyai

Note the change at the ::1 line.

For more details, read https://github.com/ipython/ipython/issues/6193#issuecomment-466082026

No comments: