dask / dask/distributed

Check if port is in use (before trying to publish the dashboard to it)

Open
#1,926 5 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
1.7k
Forks
778
Avg merge
2h 50m
Merged PRs (30d)
3

Description

Recently had the awkward experience of connecting to someone else's Dask Distributed instance (their Dashboard in particular) by accident as they were using the same node and port as I was trying to use. To help prevent this, it would be useful if Distributed (optionally) protected itself against this a bit by checking if a port is already in use and either failing with a traceback or attempt to connect with the next available port (e.g. 8787 to 8788 for example) of course this means a few other ports would need to be bumped in the process. FWIW the latter (bumping port number) is what the Jupyter Notebook does with this problem. So there might be some tips to be learned from looking in the Jupyter Notebook code base. There may be other ways to solve this that I haven't thought of. So please feel free to share.

Side note: Can also see how this might be a useful feature. So other options might include warning or an option to always starting a new scheduler with new services.

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.