本地Dask工人无法连接到本地调度程序 [英] Local Dask worker unable to connect to local scheduler
问题描述
在OSX 10.12.6上运行Dask 0.16.0时,无法将本地dask-worker
连接到本地dask-scheduler
.我只是想遵循官方Dask教程.重现步骤:
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:
步骤1:运行dask-scheduler
步骤2:运行dask-worker 10.160.39.103:8786
该问题似乎与dask调度程序有关,与工人无关,因为我什至无法通过其他方式(例如nc -zv 10.160.39.103 8786
)访问端口.
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
).
但是,该进程显然仍在计算机上运行:
However, the process is clearly still running on the machine:
推荐答案
我的第一个猜测是,由于网络规则的原因,您的计算机可能不接受看起来像来自外界的网络连接.您可能想尝试使用dask-worker localhost:8786
并查看它是否有效.
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.
提醒一下,您始终可以直接从Python启动调度程序和工作程序,而无需创建dasch-scheduler和dask-worker进程
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
作为一种万无一失的方法,您还可以通过processes=False
,这将完全避免网络问题
As a foolproof method you can also pass processes=False
which will avoid networking issues entirely
client = Client(processes=False)
这篇关于本地Dask工人无法连接到本地调度程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!