Failed to start worker with IPv6?
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 778
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 3
Description
**What happened**:
Using a IPv6 VM for dask, was unable to start the worker
user@host:~> python -m distributed.cli.dask_worker tls://[xx:xx:xx:xx:xx:xx:xx:xx]:45783 --dashboard-address 127.0.0.1 --nthreads 1 --memory-limit 5274M --local-directory /xxx/dask/ --nprocs 3 --name common_classify --host [xx:xx:xx:xx:xx:xx:xx:xx]
/xxx/python3/lib/python3.9/site-packages/distributed/cli/dask_worker.py:315: FutureWarning: The --nprocs flag will be removed in a future release. It has been renamed to --nworkers.
warnings.warn(
Start Nanny at: 'tls://[xx:xx:xx:xx:xx:xx:xx:xx]:41627'
Start Nanny at: 'tls://[xx:xx:xx:xx:xx:xx:xx:xx]:52347'
Start Nanny at: 'tls://[xx:xx:xx:xx:xx:xx:xx:xx]:51671'
/xxx/python3/lib/python3.9/site-packages/distributed/utils.py:135: RuntimeWarning: Couldn't detect a suitable IP address for reaching 'xx:xx:xx:xx:xx:xx:xx:xx', defaulting to hostname: [Errno -9] Address family for hostname not supported
warnings.warn(
Failed to start worker
Traceback (most recent call last):
File "/xxx/python3/lib/python3.9/site-packages/toolz/functoolz.py", line 459, in memof
return cache[k]
KeyError: ('xx:xx:xx:xx:xx:xx:xx:xx', 80)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/xxx/python3/lib/python3.9/site-packages/distributed/utils.py", line 131, in _get_ip
sock.connect((host, port))
socket.gaierror: [Errno -9] Address family for hostname not supported
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/xxx/python3/lib/python3.9/site-packages/distributed/nanny.py", line 869, in run
await worker
File "/xxx/python3/lib/python3.9/site-packages/distributed/core.py", line 299, in _
await self.start()
File "/xxx/python3/lib/python3.9/site-packages/distributed/worker.py", line 1285, in start
kwargs["default_host"] = get_ip(
File "/xxx/python3/lib/python3.9/site-packages/distributed/utils.py", line 155, in get_ip
return _get_ip(host, port, family=socket.AF_INET)
File "/xxx/python3/lib/python3.9/site-packages/toolz/functoolz.py", line 463, in memof
cache[k] = result = func(*args, **kwargs)
File "/xxx/python3/lib/python3.9/site-packages/distributed/utils.py", line 140, in _get_ip
addr_info = socket.getaddrinfo(
File "/xxx/python3/lib/python3.9/socket.py", line 954, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
**What you expected to happen**:
To load the worker from the IPv6 VM, and dask_worker started successfully.
**Minimal Complete Verifiable Example**:
python -m distributed.cli.dask_worker tls://[xx:xx:xx:xx:xx:xx:xx:xx]:45783 --dashboard-address 127.0.0.1 --nthreads 1 --memory-limit 5274M --local-directory /xxx/dask/ --nprocs 3 --name common_classify --host [xx:xx:xx:xx:xx:xx:xx:xx]
```python
# Put your MCVE code here
```
**Anything else we need to know?**:
Looks like it comes from here:
https://github.com/dask/distributed/blob/c083790da4b419fe39c2481084442fe3e3e990ad/distributed/worker.py#L1311
https://github.com/dask/distributed/blob/c083790da4b419fe39c2481084442fe3e3e990ad/distributed/nanny.py#L280
**Environment**:
- Dask version: 2022.3.0
- Python version: 3.9.11
- Operating System: SUSE Linux Enterprise Server 12 (x86_64)
- Install method (conda, pip, source): pip
Contributor guide
Assessment
This issue has not been assessed yet.