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

Autodetect dashboard URL with a proxy #109

Closed
ScottWales opened this issue Jan 30, 2020 · 2 comments
Closed

Autodetect dashboard URL with a proxy #109

ScottWales opened this issue Jan 30, 2020 · 2 comments

Comments

@ScottWales
Copy link

Is there a way to get dask-labextension to autodetect a jupyter-server-proxy URL like proxy/8787 instead of the cluster's dashboard URL?

I'm running Jupterlab on a remote machine, forwarding its port over SSH so I can connect to it.

If I start a cluster within a notebook, and then use the 'Autodetect dashboard URL' button in dask-labextension, it finds an address like http://127.0.0.1:8787

This URL doesn't work however, as I've not forwarded port 8787 locally (and in general can't predict which port the cluster will start on, it's a multi-user environment so the cluster might move to a different port), and all of the Dask control buttons stay dark.

If I manually enter a jupyter-server-proxy URL like proxy/8787 however all of the Dask buttons light up and I can see the worker panels etc.

@jacobtomlinson
Copy link
Member

Thanks for raising this @ScottWales.

The search button inspects the cluster object you created in order to find the dashboard URL. As the cluster object is local to your notebook in this case it will give you a default URL relative to the notebook, not the location you are port forwarding from.

You can override the default (which is "{scheme}://{host}:{port}/status") in your Dask config with the correct URL scheme for your setup. So for the example you gave above it would be

# ~/.config/dask/distributed.yaml

distributed:
 dashboard:
    link: "proxy/{port}/status"

Or you can set this by environment variable also before running Jupyter Lab.

export DASK_DISTRIBUTED__DASHBOARD__LINK="proxy/{port}/status"

@ScottWales
Copy link
Author

Works perfectly, thanks @jacobtomlinson

fnattino added a commit to RS-DAT/JupyterDaskOnSRC that referenced this issue Apr 6, 2023
nsmith- added a commit to CoffeaTeam/lpcjobqueue that referenced this issue Oct 26, 2023
nsmith- added a commit to CoffeaTeam/lpcjobqueue that referenced this issue Jan 10, 2024
* Use jupyterlab proxy for dashboard

Per dask/dask-labextension#109 (comment)

* Prioritize our configs

* From root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants