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
When using interfaces like infiniband it's often the case that one can't get the dashboard to show up. This is because the bokeh server is expecting to be called by its IP address on the infiniband network, not the normal network.
One solution to this would be to provide services={('bokeh', ('', 8787)): BokehScheduler} to LocalCluster.
That would make things simpler, yes, but I think that we don't want to do
it in the true LocalCluster case, where we expect to be on the localhost
and would be confused if someone else connected to our machine and wanted
to see our dashboard.
The fact that our cluster objects use LocalCluster is a bit of a historical
artifact. Ideally they would create a scheduler manually with all of their
own options.
and would be confused if someone else connected to our machine and wanted to see our dashboard.
Would we? Would that be happening a lot?
The fact that our cluster objects use LocalCluster is a bit of a historical artifact. Ideally they would create a scheduler manually with all of their own options.
Should we do that? Or maybe implement some more generic superclass to LocalCluster upstream, that we can reuse here?
Perhaps. I haven't investigated this enough to know what the right
approach is. If someone wants to make progress on this they might look at
all of the modifications that LocalCluster does when starting up a
scheduler and write those up so that it can help inform discussion. I
suspect that we might be able to put some of that logic into the Scheduler
constructor itself, or perhaps some other class as you suggest. I suspect
that there will be some balance between making Scheduler construction fully
featured and keeping it lightweight.
On Wed, Aug 1, 2018 at 7:27 AM, Guillaume EB ***@***.***> wrote:
and would be confused if someone else connected to our machine and wanted
to see our dashboard.
Would we? Would that be happening a lot?
The fact that our cluster objects use LocalCluster is a bit of a
historical artifact. Ideally they would create a scheduler manually with
all of their own options.
Should we do that? Or maybe implement some more generic superclass to
LocalCluster upstream, that we can reuse here?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#90 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASszOdcw5okFAmShvm1bcS_tCNiurggks5uMZCkgaJpZM4VLb_x>
.
This feature is important for being able to use Dask easily with infiniband, and to make sure it works with nbserverproxy.
I observed the same problem as @lesteve trying its diff, the other way around though (specifing 8787, having some random port displayed, but dashboard up on 8787), but I assume it is the same issue.
Current solution is not really elegant though, it is more of a hack. Ideally, I would prefer to have at least a kwargs in LocalCluster, so we can call something like:
Another solution, that does not need modification to LocalCluster, is to just use ip='' parameter when launching LocalCluster. From what I understant looking at dask distributed sources, it will bind all services (scheduler too), to listen to all interfaces.
But we could also make it by default directly in core.py:
# Find the IP address and (if requested) set interface for workerslocalhost_kwargs= {}
ifinterface:
localhost_kwargs['ip'] =get_ip_interface(interface)
extra+=' --interface %s '%interfaceelse:
localhost_kwargs['ip'] =''
Or just drop #107, because binding on '' by default should solve it...
On Tue, Aug 7, 2018 at 5:38 AM, Guillaume EB ***@***.***> wrote:
Another solution, that does not need modification to LocalCluster, is to
just use ip='' parameter when launching LocalCluster. From what I
understant looking at dask distributed sources, it will bind all services
(scheduler too), to listen to all interfaces.
Do someone believe that this is a problem ?
With #107 <#107>, we can easily
do this:
cluster = PBSCluster( ... , interface='ib0', ip='')
But we could also make it by default directly in core.py:
# Find the IP address and (if requested) set interface for workers
localhost_kwargs = {}
if interface:
localhost_kwargs['ip'] = get_ip_interface(interface)
extra += ' --interface %s ' % interface
else:
localhost_kwargs['ip'] = ''
Or just drop #107 <#107>,
because binding on '' by default should solve it...
Any thoughts?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#90 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASszPSXjv-irNeS0dXXFhuVSh4tXaXFks5uOWAKgaJpZM4VLb_x>
.
So @mrocklin, once #107 is in (I believe we should keep it, to give the choice to the user to not bind on all interfaces if he wants), is this okay for you if I propose another PR wich sets LocalCluster ip = '' by default ?
This will probably remove some lines from the one added in #107, as this default will get set no matter if interface is provided or not. I prefer to do this in another PR to keep things clear.
The common case use of LocalCluster is for local machines. It should
continue to respond only to localhost or 127.0.0.1 by default for these
cases. Otherwise we open up all dask users to having their machines stolen.
Recall that Dask opens up a connection that other people can connect to to
run arbitrary Python code. Having the required address for the TCP server
remain localhost is a very useful way to provide some level of security.
This is the same as with other applications, like Jupyter.
I agree with that, but I'm not sure that my proposal was clear enough. I just want to do the modifications in dask-jobqueue core.py file, when initializing LocalCluster here. Replace the defaults socket.gethostname() and get_ip_interface(interface) by ''.
Activity
lesteve commentedon Jul 11, 2018
Interesting, I do seem to remember to have bumped into this problem ...
lesteve commentedon Jul 11, 2018
Hmmm I think I got something like you suggested working, but the
_repr_html_is not showing the right port for some reason ...lesteve commentedon Jul 11, 2018
Just to put a bit more context, here is my diff (I hard-code the BokehScheduler port to 12345):
I run this ssh proxy command (redirecting the 12345 port to 9898 locally):
and then I can access the dashboard at http://localhost:9898/status.
The widget for
client.clustershows the dashboard at 8787 though:I made sure I had the latest release of dask (0.18.1) and distributed (1.22).
mrocklin commentedon Jul 12, 2018
Indeed. It looks like this is broken in dask/distributed. We just do a hard overwrite of the bokeh key:
https://github.com/dask/distributed/blob/fd8ca5ebc3a781d5f6625d3daa4d09ce806938a3/distributed/deploy/local.py#L119-L127
guillaumeeb commentedon Jul 15, 2018
Don't you think this modification should be done upstream in distributed? Always bind bokeh UI to all network address by default?
mrocklin commentedon Jul 15, 2018
guillaumeeb commentedon Aug 1, 2018
Would we? Would that be happening a lot?
Should we do that? Or maybe implement some more generic superclass to LocalCluster upstream, that we can reuse here?
mrocklin commentedon Aug 1, 2018
guillaumeeb commentedon Aug 7, 2018
This feature is important for being able to use Dask easily with infiniband, and to make sure it works with nbserverproxy.
I observed the same problem as @lesteve trying its diff, the other way around though (specifing 8787, having some random port displayed, but dashboard up on 8787), but I assume it is the same issue.
Current solution is not really elegant though, it is more of a hack. Ideally, I would prefer to have at least a kwargs in LocalCluster, so we can call something like:
What do you think about that?
guillaumeeb commentedon Aug 7, 2018
Another solution, that does not need modification to LocalCluster, is to just use
ip=''parameter when launchingLocalCluster. From what I understant looking at dask distributed sources, it will bind all services (scheduler too), to listen to all interfaces.Do someone believe that this is a problem ?
With #107, we can easily do this:
But we could also make it by default directly in core.py:
Or just drop #107, because binding on '' by default should solve it...
Any thoughts?
mrocklin commentedon Aug 7, 2018
guillaumeeb commentedon Aug 7, 2018
So @mrocklin, once #107 is in (I believe we should keep it, to give the choice to the user to not bind on all interfaces if he wants), is this okay for you if I propose another PR wich sets LocalCluster
ip = ''by default ?This will probably remove some lines from the one added in #107, as this default will get set no matter if interface is provided or not. I prefer to do this in another PR to keep things clear.
mrocklin commentedon Aug 7, 2018
guillaumeeb commentedon Aug 7, 2018
I agree with that, but I'm not sure that my proposal was clear enough. I just want to do the modifications in dask-jobqueue core.py file, when initializing LocalCluster here. Replace the defaults
socket.gethostname()andget_ip_interface(interface)by''.mrocklin commentedon Aug 7, 2018