TypeError: add_worker() got an unexpected keyword argument 'versions'

Viewed 278

when I try to add a worker with the scheduler address by running the below command:

dask-worker tcp://10.142.0.3:8786

My scheduler gives "add_worker() got an unexpected keyword argument 'versions' as shown below":

 distributed.core - ERROR - add_worker() got an unexpected keyword argument 'versions'
    Traceback (most recent call last):
      File "/home/rsa-key-20180725/.local/lib/python3.6/site-packages/distributed/core.py", line 412, in handle_comm
        result = handler(comm, **msg)
    TypeError: add_worker() got an unexpected keyword argument 'versions'

But the worker didn't throw any error and it gave something like this

distributed.nanny - INFO -         Start Nanny at: 'tcp://10.142.0.6:45083'
distributed.worker - INFO -       Start worker at:     tcp://10.142.0.6:35275
distributed.worker - INFO -          Listening to:     tcp://10.142.0.6:35275
distributed.worker - INFO - Waiting to connect to:      tcp://10.142.0.3:8786
distributed.worker - INFO - -------------------------------------------------
distributed.worker - INFO -               Threads:                         16
distributed.worker - INFO -                Memory:                   63.32 GB
distributed.worker - INFO -       Local Directory: /home/rsa-key-20180725/dask-worker-space/worker-t9crpot3
distributed.worker - INFO - -------------------------------------------------

What is the problem and what could be done?... Thanks in advance!!

1 Answers

The problem could be that the dask versions are different on workers (packaged into .tar.gz) from scheduler, or from your local environment where you run python code. For me this error message was fixed after installing the same version.

Please check the worker log if you see warning there about package versions, like:

distributed.worker - WARNING - Mismatched versions found

+-------------+-------------+-----------+----------------------------+
| Package     | This Worker | scheduler | workers                    |
+-------------+-------------+-----------+----------------------------+
| dask        | 2021.11.2   | 2021.11.2 | {'2021.11.2', '2022.01.0'} |
| distributed | 2021.11.2   | 2021.11.2 | {'2021.11.2', '2022.01.0'} |
+-------------+-------------+-----------+----------------------------+
Related