question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ssh cluster does not close

See original GitHub issue

Hi,

when starting a sshcluster via:

from distributed.deploy.ssh import SSHCluster

def start_cluster():
    hosts = ['localhost']
    nthreads = 1
    nprocs = 2
    c = SSHCluster(hosts * (nprocs+1),
                   connect_options={"known_hosts": None},
                   worker_options={"nthreads": nthreads, },
                   scheduler_options={"port": 0, "dashboard_address": ":8787"},
                   )
    c.scale(nprocs)
    c.close()

if __name__ == '__main__':
    start_cluster()

the scheduler and the worker are still alive even if the calling python process is finished. The dashboard is reachable and the python processes are shown in “top”.

Is there another way to close the ssh cluster?

Using Linux: distributed 2.9.1 dask 2.9.1 python 3.6.9

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:18 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
condoratberlincommented, Jan 30, 2020

It seems to fixed in OpenSSH version 7.9 as described in the release nodes.

0reactions
Keou0007commented, Jun 12, 2020

No immediate happiness with the patch, I’ll post my findings on the PR.

I did figure out a workaround for this issue that works for me for now. I followed partially the instructions here to run a second instance of ssh-server on a different port and configured the init script to launch the conda-forge version of sshd. I did need to modify the settings in anaconda/etc/sshd_config a bit to make it work without complaining.

I then provide that port number in the connect_options dict when I launch the SSHCluster and it connects to the newer version of the ssh server and works as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to prevent SSH from disconnecting if it's been idle for a ...
I am using Mobaxterm and have also met with this problem. Mobaxterm also ships with an option to keep the client alive when...
Read more >
dask scheduler SSHCluster() not establishing connection
ssh (openssh 8.6.0p1) to self works. But, unable to connect scheduler on localhost using SSHCluster(). Few alternatives i've tried: Manual ...
Read more >
SSH - Dask documentation
dask-ssh. Launch a distributed cluster over SSH. A 'dask scheduler' process will run on the first host specified in [HOSTNAMES] or in the...
Read more >
Connecting to the Clusters via SSH
This should close the connection, and your local computer's command-line ... Windows 8 does not have a built-in SSH client, nor does it...
Read more >
Cluster SSH - Manage Multiple Linux Servers Simultaneously
I learned this lesson the hard way so you don't have to. Because of the way Cluster SSH operates when something goes wrong,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found