# Access dashboard for LocalCluster on pangeo deployments

**URL:** <https://discourse.pangeo.io/t/access-dashboard-for-localcluster-on-pangeo-deployments/2171>\
**Category:** Cloud\
**Created:** [February 15, 2022, 3:56pm UTC](https://discourse.pangeo.io/t/access-dashboard-for-localcluster-on-pangeo-deployments/2171 "2022-02-15T15:56:57Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbusecke](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/jbusecke/32/118_2.png) [@jbusecke](https://discourse.pangeo.io/u/jbusecke)\
**Post date:** [February 15, 2022, 3:56pm UTC](https://discourse.pangeo.io/t/access-dashboard-for-localcluster-on-pangeo-deployments/2171/1 "2022-02-15T15:56:57Z")

</div>

Yesterday I found myself in a situation where it was very nice to have a dask dashboard to see things like the task stream and progress bars. I ended up getting a dask\_gateway cluster, but would love if I could get these things working for a LocalCluster too.

What I tried on the pangeo google deployment:

```python
from dask.distributed import Client
client = Client()
client

```

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/2X/e/e67f88b5a3c5dae5ae9c5a4a0d2674ea39acefba.png)

The link to the dashboard is not useful in this instance. I wonder if there is a way to display a working link (accessible from the outside) in some clever way.

Cheers

---

<div class="post-metadata">

**Author:** ![TomAugspurger](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/tomaugspurger/32/21_2.png) [@TomAugspurger](https://discourse.pangeo.io/u/TomAugspurger)\
**Post date:** [February 15, 2022, 4:47pm UTC](https://discourse.pangeo.io/t/access-dashboard-for-localcluster-on-pangeo-deployments/2171/2 "2022-02-15T16:47:20Z")

</div>

I think that Hub’s configuration could be updated to set the environment variable `DASK_DISTRIBUTED __DASHBOARD__ LINK` to be `'/user/{JUPYTERHUB_USER}/proxy/{port}/status'`. See [planetary-computer-hub/values.yaml at 480d206e0dc49155847352c0e89f49ae64720639 · microsoft/planetary-computer-hub · GitHub](https://github.com/microsoft/planetary-computer-hub/blob/480d206e0dc49155847352c0e89f49ae64720639/helm/values.yaml#L203).

Julius, you should be able to test this yourself by setting that config value.

```auto
In [13]: import dask, distributed

In [14]: dask.config.set(**{"distributed.dashboard.link": "/user/{JUPYTERHUB_USER}/proxy/{port}/status"})
Out[14]: <dask.config.set at 0x7f40e4fa7f40>

```

And then creating your LocalCluster. I don’t think that will affect clusters created by dask gateway, which set their own dashboard link, but it’s worth confirming.

---

<div class="post-metadata">

**Author:** ![rabernat](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/rabernat/32/22_2.png) [@rabernat](https://discourse.pangeo.io/u/rabernat)\
**Post date:** [February 16, 2022, 3:28pm UTC](https://discourse.pangeo.io/t/access-dashboard-for-localcluster-on-pangeo-deployments/2171/3 "2022-02-16T15:28:58Z")

</div>

Thanks Tom! So helpful!

Maybe we should make this the default via the dask config file…

---

<div class="post-metadata">

**Author:** ![jbusecke](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/jbusecke/32/118_2.png) [@jbusecke](https://discourse.pangeo.io/u/jbusecke)\
**Post date:** [February 16, 2022, 9:57pm UTC](https://discourse.pangeo.io/t/access-dashboard-for-localcluster-on-pangeo-deployments/2171/4 "2022-02-16T21:57:38Z")

</div>

Yayyyy! That worked. I would love if this is the default on the deployment!

---

<div class="post-metadata">

**Author:** ![jbusecke](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/jbusecke/32/118_2.png) [@jbusecke](https://discourse.pangeo.io/u/jbusecke)\
**Post date:** [April 25, 2022, 8:03pm UTC](https://discourse.pangeo.io/t/access-dashboard-for-localcluster-on-pangeo-deployments/2171/5 "2022-04-25T20:03:55Z")

</div>

> [@TomAugspurger](#):
>
> `dask.config.set(**{"distributed.dashboard.link": "/user/{JUPYTERHUB_USER}/proxy/{port}/status"})`

I just tried that on the gcloud production environment and it does not seem to work anymore.

I am doing

```python
import dask
from distributed import LocalCluster, Client

dask.config.set(**{"distributed.dashboard.link": "/user/{JUPYTERHUB_USER}/proxy/{port}/status"})
cluster = LocalCluster()
client = Client(cluster)
client

```

and get

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/2X/2/2be7dcf13b050a9c507a6cf06e485da7f7168a5d.png)  
But the link does not work anymore, like it did before. Very grateful for any advice. Cheers

---

<div class="post-metadata">

**Author:** ![TomAugspurger](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/tomaugspurger/32/21_2.png) [@TomAugspurger](https://discourse.pangeo.io/u/TomAugspurger)\
**Post date:** [April 26, 2022, 11:21am UTC](https://discourse.pangeo.io/t/access-dashboard-for-localcluster-on-pangeo-deployments/2171/6 "2022-04-26T11:21:15Z")

</div>

The first thing to check is whether it’s something that changed in dask / distributed, or in jupyter-server-proxy.

Can you try starting another server like `python -m http.server` and see if you can navigate to it?

---

<div class="post-metadata">

**Author:** ![rabernat](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/rabernat/32/22_2.png) [@rabernat](https://discourse.pangeo.io/u/rabernat)\
**Post date:** [May 10, 2022, 2:05pm UTC](https://discourse.pangeo.io/t/access-dashboard-for-localcluster-on-pangeo-deployments/2171/7 "2022-05-10T14:05:04Z")

</div>

I just hit the same problem. I started an http server from the command line

```bash
$ jovyan@jupyter-rabernat:~$ python -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...

```

And tried to access it at `https://leap.2i2c.cloud/user/rabernat/proxy/8000`, but I got a 404. This is the version of jupyter-server-proxy installed in this image

```nohighlight
jupyter-server-proxy 3.2.1 pyhd8ed1ab_0 conda-forge

```

---

<div class="post-metadata">

**Author:** ![scottyhq](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/scottyhq/32/162_2.png) [@scottyhq](https://discourse.pangeo.io/u/scottyhq)\
**Post date:** [May 10, 2022, 9:14pm UTC](https://discourse.pangeo.io/t/access-dashboard-for-localcluster-on-pangeo-deployments/2171/8 "2022-05-10T21:14:04Z")

</div>

It seems there is an interplay of image package versions and infrastructure config here that would be good to test somehow for issues like this (see [Add dask proxy to labextension.yaml · Issue #253 · pangeo-data/pangeo-docker-images · GitHub](https://github.com/pangeo-data/pangeo-docker-images/issues/253) and [Automatically test a dask-gateway notebook for daskhubs · Issue #152 · 2i2c-org/infrastructure · GitHub](https://github.com/2i2c-org/infrastructure/issues/152)).

One thing we should do is get in the habit of noting which image is being used when things are working (`echo $JUPYTER_IMAGE`), that makes identifying changes easier. Otherwise, it’s a bit of reverse engineering and guess work:

1. last image bump [Bump pangeo image tags · 2i2c-org/infrastructure@36c854d · GitHub](https://github.com/2i2c-org/infrastructure/commit/36c854d4b0af8dac1d6e98980d2871f06e80e4dd)

2. difference in package versions [Comparing 2022.02.04..2022.04.20 · pangeo-data/pangeo-docker-images · GitHub](https://github.com/pangeo-data/pangeo-docker-images/compare/2022.02.04..2022.04.20)

I see `jupyter-server-proxy=3.2.1` in both but distributed bumped from 2022.1.1 to 2022.4.1 …

---

<div class="post-metadata">

**Author:** ![jbusecke](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/jbusecke/32/118_2.png) [@jbusecke](https://discourse.pangeo.io/u/jbusecke)\
**Post date:** [June 16, 2022, 5:33pm UTC](https://discourse.pangeo.io/t/access-dashboard-for-localcluster-on-pangeo-deployments/2171/9 "2022-06-16T17:33:29Z")

</div>

I just tried it again, and it seems to work again! 🎉

---

<div class="post-metadata">

**Author:** ![consideRatio](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/consideratio/32/217_2.png) [@consideRatio](https://discourse.pangeo.io/u/consideRatio)\
**Post date:** [July 7, 2022, 12:15pm UTC](https://discourse.pangeo.io/t/access-dashboard-for-localcluster-on-pangeo-deployments/2171/10 "2022-07-07T12:15:37Z")

</div>

I’ve verified that [https://leap.2i2c.cloud](https://leap.2i2c.cloud) now has a functional jupyter-server-proxy with the local webserver example, and fixed a bug in how the dashboard link is configured in [Fix dask daskboard link configuration by consideRatio · Pull Request #1503 · 2i2c-org/infrastructure · GitHub](https://github.com/2i2c-org/infrastructure/pull/1503).

Thanks for investigating this so clearly everyone and leaving great documentation while doing it!
