Open harrisliuwk opened 2 years ago
Part of this may be a bug, but I'm pretty sure that this worked at all before was an accident. Going through your examples:
clu = dis.LocalCluster(host='localhost:9000')
The host
kwarg should take a hostname, not a host + port. I think that this worked before was accidental, but we could certainly have a better error message here.
clu = dis.LocalCluster(host='localhost', port=9000)
Since port
isn't a called out kwarg in LocalCluster
, it's forwarded directly to all the workers (which then all try to start on port 9000
). I'd be surprised if this ever worked - you probably meant to use scheduler_port=9000
here, which does work:
# This does work
clu = dis.LocalCluster(host="localhost", scheduler_port=9000)
Same applies for each of your cases with processes=False
- the host
kwarg should just be localhost
and you meant to specify scheduler_port
instead.
Some TODOs before closing this:
host
ever meant to accept a "{host}:{port}"
string? I think the answer is no, but if yes then this is a bug.I can confirm that @jcrist 's solution does work, thanks!
Nonetheless, like jcrist said, this raises futher questions, and I would like to add some on top of that.
Since host='{host}:{port}'
and (host='{host}', port='{port}')
has been working for so long that many users may have been used to regard host
argument as scheduler host and port
as scheduler port, so I suggest that to be the future settings as well? Also, it does not make sence to have port
to be worker's port, like jcrist has tested out, because workers' ports should be managed by the scheduler for the common use cases. If users really need to set workers' ports, maybe we can provide something like worker_ports=[1234, 5678]
.
What happened: Initiating
LocalCluster
after upadating dask to newest version reports errors.codes that used to work:
What you expected to happen: runs without error
Minimal Complete Verifiable Example: case 1:
reports "OSError: [Errno 98] Address already in use"
case 2:
reports "ValueError: not enough values to unpack (expected 3, got 1)"
In case 2, I tried tracing back and found at least
dis.comm.addressing.addresses_from_user_args
parses my input correctly.Anything else we need to know?: This is a bug introduced since version 2021.10.0. CLI tool
dask-scheduler --host localhost --port 9000
works fine with latest version.Environment:
log of case 1:
log of case 2: