You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The nbserverproxy allows Jupyter servers to proxy other ports on localhost to anyone with access to the Jupyter server.
We have a similar problem in dask. People often have access to the dask-scheduler dashboard, but don't have access to each of the dask-worker dashboards. However the dask-worker dashboards are visible to the scheduler.
I'm curious if functionality from nbserverproxy could be adapted to suit Dask's needs as well. There are some similarities
In both cases we have a server at an accessible location can see an inaccessible location
In both cases that server is a Tornado web server
And some differences
The accessible server (scheduler) is likely on a different host than the inaccessible servers (workers)
One is Jupyter, the other isn't
cc @yuvipanda, is this worth investigating? Is it worth generalizing nbserverproxy? "Nope, nbserverproxy is pretty tied to Jupyter internals" is a fine answer. This isn't a huge pain point right now, I'm just curious about the possibility.
The HTTP / websocket proxying parts of nbserverproxy sound great for this. The only jupyter specific thing we do is use it for authentication, so you will have to do something yourself for authentication. There needs to be some auth at the target of the proxy too, to make sure only the proxy can talk to it.
For better or worse, Dask's worker and scheduler dashboards are fully open (they leak information, but don't provide any control). Does this mean that we can drop the Jupyter parts (the IPythonHandler?)
Also, looking at the LocalProxyHandler I see that it pins 127.0.0.1. Presumably we would extend the route to include some escaped form of the full address, rather than just the port. Do you see any problem with this?
I am interested in picking this up but running into an issue early on. I setup a dask-scheduler and one dask-worker and I'm unable to navigate to worker bokeh pages (getting 404s) on worker pages. Is this a bug or a user error ?
127.0.0.1:58477 returns 404
1 ❯ dask-worker tcp://127.0.0.1:8786
distributed.nanny - INFO - Start Nanny at: 'tcp://127.0.0.1:58475'
distributed.diskutils - INFO - Found stale lock file and directory '/Users/bzaitlen/worker-5mrizwz9', purging
distributed.worker - INFO - Start worker at: tcp://127.0.0.1:58476
distributed.worker - INFO - Listening to: tcp://127.0.0.1:58476
distributed.worker - INFO - nanny at: 127.0.0.1:58475
distributed.worker - INFO - bokeh at: 127.0.0.1:58477
distributed.worker - INFO - Waiting to connect to: tcp://127.0.0.1:8786
distributed.worker - INFO - -------------------------------------------------
distributed.worker - INFO - Threads: 12
distributed.worker - INFO - Memory: 17.18 GB
distributed.worker - INFO - Local Directory: /Users/bzaitlen/worker-iv2mlc0_
distributed.worker - INFO - -------------------------------------------------
distributed.worker - INFO - Registered to: tcp://127.0.0.1:8786
distributed.worker - INFO - -------------------------------------------------
distributed.core - INFO - Starting established connection
Interesting, we're routing / to /status where for workers it should be /main. We should change this either by changing the routing, or being consistent about using /status everywhere.
Activity
yuvipanda commentedon Aug 4, 2018
The HTTP / websocket proxying parts of nbserverproxy sound great for this. The only jupyter specific thing we do is use it for authentication, so you will have to do something yourself for authentication. There needs to be some auth at the target of the proxy too, to make sure only the proxy can talk to it.
mrocklin commentedon Aug 4, 2018
For better or worse, Dask's worker and scheduler dashboards are fully open (they leak information, but don't provide any control). Does this mean that we can drop the Jupyter parts (the IPythonHandler?)
Also, looking at the
LocalProxyHandlerI see that it pins 127.0.0.1. Presumably we would extend the route to include some escaped form of the full address, rather than just the port. Do you see any problem with this?If someone makes these changes should they modify
nbserverproxy, go upstream to https://github.com/senko/tornado-proxy (adding back in your web-socket stuff), or fork again and make a dask-server-proxy? Given the simplicity of the project I'm currently leaning towards option 3.yuvipanda commentedon Aug 4, 2018
I too recommend option 3 for now.
mrocklin commentedon Apr 25, 2019
I would have used this today :)
Presumably to help with the auth problem, we could probably only proxy the addresses of the worker dashboards that we know about.
quasiben commentedon May 10, 2019
I am interested in picking this up but running into an issue early on. I setup a dask-scheduler and one dask-worker and I'm unable to navigate to worker bokeh pages (getting 404s) on worker pages. Is this a bug or a user error ?
127.0.0.1:58477 returns 404
mrocklin commentedon May 10, 2019
Interesting, we're routing
/to/statuswhere for workers it should be/main. We should change this either by changing the routing, or being consistent about using/statuseverywhere.Try http://127.0.0.1:58477/main
quasiben commentedon May 10, 2019
Yup! That works. I'll submit a PR now for this fix. I prefer keeping everything on
/status