dask / dask/distributed

Warning when opening LocalCluster if not having network access

Open
#8,559 0 comments 0 reactions 0 assignees View on GitHub
bug good first issue help wanted
Dominant language
Python
Stars
1.7k
Forks
778
Avg merge
2h 50m
Merged PRs (30d)
3

Description

When creating a `LocalCluster` with `processes=False` and the machine I am on does not have network access a warning will be given. It tries to reach 8.8.8.8 which is unnecessary. When setting `processes=True` no warning will be given.

```python
>>> from distributed import LocalCluster
>>> LocalCluster(processes=False)
/home/rikard/devel/pharmpy/.tox/py311/lib/python3.11/site-packages/distributed/utils.py:181: RuntimeWarning: Couldn't detect a suitable IP address for reaching '8.8.8.8', defaulting to hostname: [Errno 101] Network is unreachable
warnings.warn(
LocalCluster(c0181f42, 'inproc://127.0.1.1/50519/1', workers=1, threads=8, memory=31.19 GiB)
```

I am using Python 3.11 and dask/distributed 2024.2.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.