dask / distributed

A distributed task scheduler for Dask
https://distributed.dask.org
BSD 3-Clause "New" or "Revised" License
1.58k stars 720 forks source link

LocalCluster not using default ports #4429

Open jacobtomlinson opened 3 years ago

jacobtomlinson commented 3 years ago

What happened:

When creating a LocalCluster object the comm is started on a random high port, even if there are no other clusters running.

What you expected to happen:

Should use port 8786.

Minimal Complete Verifiable Example:

$ conda create -n dask-lc-test -c conda-forge -y python=3.8 ipython dask distributed
$ conda activate dask-lc-test

The dask-scheduler command works as expeted.

$ dask-scheduler
distributed.scheduler - INFO - -----------------------------------------------
distributed.scheduler - INFO - -----------------------------------------------
distributed.scheduler - INFO - Clear task state
distributed.scheduler - INFO -   Scheduler at:   tcp://10.51.100.43:8786
distributed.scheduler - INFO -   dashboard at:                     :8787

But LocalCluster does not.

>>> from dask.distributed import LocalCluster
>>> cluster = LocalCluster()
>>> cluster.scheduler_address
'tcp://127.0.0.1:45083'

Anything else we need to know?:

quasiben commented 3 years ago

Thanks @jacobtomlinson -- this would be a good first issue if someone want to pick it up. Might not be more than changing the port number here: https://github.com/dask/distributed/blob/da3d2a4e0145286620c7e3dad901351164ab3702/distributed/deploy/local.py#L104

Yasir323 commented 1 year ago

Is this issue still not resolved? May I work in it?