Skip to content

"TypeError: security must be a Security object" when initiating Client(security=False) #8973

Closed
@carusyte

Description

Describe the issue:
While the doc says the Client class accepts security argument as bool, the instantiation failed with the following error:

Traceback (most recent call last):
...
irrelevant stacks omitted
...
  File "/home/kemove/.pyenv/versions/3.12.2/lib/python3.12/site-packages/distributed/client.py", line 1158, in __init__
    raise TypeError("security must be a Security object")
TypeError: security must be a Security object

Minimal Complete Verifiable Example:

cluster = LocalCluster(
        host="0.0.0.0",
        scheduler_port=8999,
        n_workers=1,
        threads_per_worker=1,
        processes=True,
        dashboard_address=":8787",
        memory_limit=0,
    )
    client = Client(
        cluster, direct_to_workers=True, connection_limit=4096, security=False
    )

Anything else we need to know?:

Intention to disable security: I've been troubleshooting communication errors between worker processes and the scheduler. I'm suspecting that this could be due to TCP timeout and / or secured connection overheads during heavy workload with some noticed CPU IO_WAIT. While I'm trying to balance the workload, I'd like to tweak Dask and the cluster to allow for more resources for the workload. Since my cluster runs on standalone workstation machine I'd like to remove the SSL overhead.

Environment:

  • Dask version: 2024.12.0
  • Python version: 3.12.2
  • Operating System: Ubuntu 22.04.5 LTS
  • Install method (conda, pip, source): pip

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions