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
{{ message }}
Repository navigation
Problem accessing the dashboard when the cluster frontend has an internal and an external IP #80
Funnily enough I helped solve the problem in #71 but I now realise that the dashboard is not accessible in our SGE cluster and the ssh tunneling work-around I proposed does not cut it.
Even more fun, when I use dask-drmaa, I can access the dashboard fine (a ssh tunnel is needed of course).
Here is my current understanding:
I run the scheduler on the cluster frontend called sequoia
the cluster frontend has a external IP, which is used for example when I ssh from my local machine to the frontend:
# from my local machine
$ ping sequoia
PING sequoia.paris.inria.fr (128.93.90.8) 56(84) bytes of data.
the cluster frontend has an internal IP that is used when I am on the cluster:
# from sequoia i.e. the cluster frontend
$ ping sequoia
PING sequoia.cm.cluster (10.141.255.254) 56(84) bytes of data.
the scheduler is using the internal IP address which means that even with ssh tunneling, the dashboard is not going to be reachable. Here is an excerpt of client._repr_html_() for completeness:
in my case (using dask-jobqueue), the internal IP is used by the scheduler so the dashboard is not accessible from the outside.
in their case (using dask-drmaa), the external IP was used by the scheduler but this was a problem because the workers can only access the internal IP of the frontend. cc @maxnoe in case I misunderstood something. In particular I would be very interested to see client._repr_html_() on their setup.
Inputs more than welcome:
is my cluster setup quite unusual? A bit of a simplification, but changing our cluster setup is not a very likely solution.
do we need to have the scheduler use the internal IP and the dashboard the external IP (if that is even is)?
other things I may have missed ?
I'd be more than happy to provide more info if that can help!
the scheduler is using the internal IP address which means that even with ssh tunneling, the dashboard is not going to be reachable
I don't quite understand why, from what I understand, the important point is that the IP you tunnel to is visible from the server you ssh on, note the one you ssh from. Could you paste here your ssh tunneling command?
I think the ssh tunnel command is unlikely to be flat out wrong (I can access the dashboard with dask-drmaa after all), but there may be subleties that I am missing.
Here is the ssh tunneling command that I use from my local machine:
# from my local machine
ssh -fN lesteve@sequoia -L 51597:localhost:51597
when I open localhost:51597/status in a browser
I get something like this in the browser:
The connection was reset
The connection to the server was reset while the page was loading.
and something like this in the terminal I ran the ssh tunnel command:
channel 2: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
Did you try with the internal ip between the port, e.g. from your example above:
45961:10.141.255.254:45961
Sorry I was editing my message above with additional info so see my message above, short answer is yes and the ssh tunnel command seems to hang (it kind of makes sense to me since I can not ssh to the internal IP from my local machine).
Our doc seems wrong to me, the one on pangeo for using jupyter on hpc is better. You should ssh to a node that you can access to (your public ip), and that node should be able to access the scheduler ip and port (the private ip).
Right this one works, thanks a lot! Feeling slightly dumb now ... I guess all the ssh tunnel command I used until now were using localhost and I considered them as black magic too.
Oh well I'll update the documentation and add a link to the pangeo doc to make me feel better about the whole thing 😉
It took a long time for me to actually go beyond the magic and take a moment to really understand ssh tunneling!
@jakirkham I did'nt know about nbserverproxy. The Readme is concise, but from what I understand this could be really interesting. If used correctly, we only have to be able to access jupyter, and then the dask dashboard can accessible from it, is that right? Is there some more detailed doc about dask and nbserverproxy somewhere?
Yep, it advertises itself as a JupyterHub project, but was able to get it to work with the Jupyter Notebook by merely installing it. Should add the conda-forge package runs the jupyter-serverextension part for you as part of the install. So if using conda, just installing it seems to work (for me at least :).
Assuming default Jupyter Notebook port and Dask Dashboard port, the URL looks something like this, http://localhost:8888/proxy/8787/, or more generally, http://localhost:<notebook_port>/proxy/<dask_dashboard_port>/. This drops you on the application menu of Dask Dashboard. The status page lives at http://localhost:<notebook_port>/proxy/<dask_dashboard_port>/status.
There is a small issue about links on the Dask Dashboard main page being wrong. However this comes up in other cases as well. So the problem is not unique to nbserverproxy and may require a little work on Distributed side of things. ( dask/distributed#2073 ) Should add the problem does not extend to the application header bar shown when a single application is running.
Edit: Can run dask.config.set({"distributed.dashboard.link": "/proxy/{port}/status"}) to ensure the links in Client and Cluster widgets point to the status page relative to your current URL.
Note that all of Dask's pages use relative links and should be fine. It's
just the bokeh index that requires to be told the prefix. In practice just
not showing users the index page works pretty well
On Thu, Jun 28, 2018 at 3:58 AM, jakirkham ***@***.***> wrote:
Yep, it advertises itself as a JupyterHub project, but was able to get it
to work with the Jupyter Notebook by merely installing it. Should add the
conda-forge package runs the jupyter-serverextension part for you as part
of the install. So if using conda, just installing it seems to work (for
me at least :).
Assuming default Jupyter Notebook port and Dask Dashboard port, the URL
looks something like this, http://localhost:8888/proxy/8787/, or more
generally, http://localhost:<notebook_port>/proxy/<dask_dashboard_port>/.
This drops you on the application menu of Dask Dashboard. The status page
lives at http://localhost:<notebook_port>/proxy/<dask_dashboard_
port>/status.
There is a small issue about links on the Dask Dashboard main page being
wrong. However this comes up in other cases as well. So the problem is not
unique to nbserverproxy and may require a little work on Distributed side
of things. ( dask/distributed#2073
<dask/distributed#2073> ) Should add the
problem does not extend to the application header bar shown when a single
application is running.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASszPhVTBsrlurIFRnLzbjFsiG9ttoJks5uBIy7gaJpZM4U51ty>
.
changed the title [-]bokeh dashboard not accessible because the IP used by the dashboard is the internal IP and not the externall IP (i.e. not the IP accessible from the outside world)[/-][+]Problem accessing the dashboard when the cluster frontend has an internal and an external IP[/+]on Jun 28, 2018
Activity
guillaumeeb commentedon Jun 27, 2018
I don't quite understand why, from what I understand, the important point is that the IP you tunnel to is visible from the server you ssh on, note the one you ssh from. Could you paste here your ssh tunneling command?
lesteve commentedon Jun 27, 2018
Thanks for your answer!
I think the ssh tunnel command is unlikely to be flat out wrong (I can access the dashboard with dask-drmaa after all), but there may be subleties that I am missing.
Here is the ssh tunneling command that I use from my local machine:
# from my local machine ssh -fN lesteve@sequoia -L 51597:localhost:51597when I open
localhost:51597/statusin a browserI get something like this in the browser:
and something like this in the terminal I ran the ssh tunnel command:
If on the other hand I try to follow our doc
then
scheduler-ip-addressis the internal IP address of the scheduler and I can not SSH to it (the ssh command seems to hang).guillaumeeb commentedon Jun 27, 2018
Did you try with the internal ip between the port, e.g. from your example above:
45961:10.141.255.254:45961
lesteve commentedon Jun 27, 2018
Sorry I was editing my message above with additional info so see my message above, short answer is yes and the ssh tunnel command seems to hang (it kind of makes sense to me since I can not ssh to the internal IP from my local machine).
guillaumeeb commentedon Jun 27, 2018
Our doc seems wrong to me, the one on pangeo for using jupyter on hpc is better. You should ssh to a node that you can access to (your public ip), and that node should be able to access the scheduler ip and port (the private ip).
guillaumeeb commentedon Jun 27, 2018
There is some misunderstanding here I believe. Command you should try:
lesteve commentedon Jun 27, 2018
Right this one works, thanks a lot! Feeling slightly dumb now ... I guess all the ssh tunnel command I used until now were using localhost and I considered them as black magic too.
Oh well I'll update the documentation and add a link to the pangeo doc to make me feel better about the whole thing 😉
jakirkham commentedon Jun 27, 2018
Maybe it's worth including
nbserverproxyto simplify this behavior or perhaps noting how to enable/use it in the docs?guillaumeeb commentedon Jun 27, 2018
@lesteve glad to hear it works!
It took a long time for me to actually go beyond the magic and take a moment to really understand ssh tunneling!
@jakirkham I did'nt know about nbserverproxy. The Readme is concise, but from what I understand this could be really interesting. If used correctly, we only have to be able to access jupyter, and then the dask dashboard can accessible from it, is that right? Is there some more detailed doc about dask and nbserverproxy somewhere?
jakirkham commentedon Jun 28, 2018
Yep, it advertises itself as a JupyterHub project, but was able to get it to work with the Jupyter Notebook by merely installing it. Should add the conda-forge package runs the
jupyter-serverextensionpart for you as part of the install. So if usingconda, just installing it seems to work (for me at least :).Assuming default Jupyter Notebook port and Dask Dashboard port, the URL looks something like this,
http://localhost:8888/proxy/8787/, or more generally,http://localhost:<notebook_port>/proxy/<dask_dashboard_port>/. This drops you on the application menu of Dask Dashboard. The status page lives athttp://localhost:<notebook_port>/proxy/<dask_dashboard_port>/status.There is a small issue about links on the Dask Dashboard main page being wrong. However this comes up in other cases as well. So the problem is not unique to
nbserverproxyand may require a little work on Distributed side of things. ( dask/distributed#2073 ) Should add the problem does not extend to the application header bar shown when a single application is running.Edit: Can run
dask.config.set({"distributed.dashboard.link": "/proxy/{port}/status"})to ensure the links in Client and Cluster widgets point to the status page relative to your current URL.mrocklin commentedon Jun 28, 2018
[-]bokeh dashboard not accessible because the IP used by the dashboard is the internal IP and not the externall IP (i.e. not the IP accessible from the outside world)[/-][+]Problem accessing the dashboard when the cluster frontend has an internal and an external IP[/+]guillaumeeb commentedon Jul 31, 2018
Closing this as this is fixed, I've open #111 to keep the nbserverproxy idea.