user554481
user554481

Reputation: 2109

Local Dask worker unable to connect to local scheduler

While running Dask 0.16.0 on OSX 10.12.6 I'm unable to connect a local dask-worker to a local dask-scheduler. I simply want to follow the official Dask tutorial. Steps to reproduce:

Step 1: run dask-scheduler

enter image description here

Step 2: Run dask-worker 10.160.39.103:8786

enter image description here

The problem seems to related to the dask scheduler and not the worker, as I'm not even able to access the port by other means (e.g., nc -zv 10.160.39.103 8786).

enter image description here

However, the process is clearly still running on the machine:

enter image description here

Upvotes: 5

Views: 2786

Answers (1)

MRocklin
MRocklin

Reputation: 57271

My first guess is that due to network rules your computer may not accept network connections that look like they're coming from the outside world. You might want to try using dask-worker localhost:8786 and see if that works instead.

Also, as a reminder, you can always start a scheduler and worker directly from Python without creating dask-scheduler and dask-worker processes

from dask.distributed import Client
# client = Client('scheduler-address:8786')
client = Client()  # create scheduler and worker automatically

As a foolproof method you can also pass processes=False which will avoid networking issues entirely

client = Client(processes=False)

Upvotes: 5

Related Questions