Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jakirkham opened this issue Apr 19, 2018 · 5 comments
Open
Labels
enhancement Improve existing functionality or make things work better

Comments

@jakirkham
Copy link
Member

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.

@mrocklin
Copy link
Member

mrocklin commented Apr 19, 2018 via email

@jakirkham
Copy link
Member Author

Thanks for the info. Where is the code for this?

@mrocklin
Copy link
Member

mrocklin commented Apr 19, 2018 via email

@mrocklin
Copy link
Member

@jakirkham where does this stand? Is there anything that needs to be done here?

@jakirkham
Copy link
Member Author

Basically the current behavior is not what I would expect and it didn’t match the description you’ve provided. Distributed happily suggested using the Dashboard from my coworker’s instance. It was pretty obvious to me what was going on, but can see how this would quickly become a problem if lots of users started spinning up their own instances on the cluster.

@GenevieveBuckley GenevieveBuckley added the enhancement Improve existing functionality or make things work better label Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality or make things work better
Projects
None yet
Development

No branches or pull requests

3 participants