Skip to content

Critical. Celery=5.2.2 does not create a connection to the Redis Sentinel when using kombu=5.6.1 #2420

@UrbanKeith

Description

@UrbanKeith

This morning, while updating, I came across an error in celery. After investigation, I found out that the error is due to yesterday's release of kombu=5.6.1. When rolling back to the kombu version=5.5.4. Everything is working.

  • Python 3.10.19
  • Celery 5.2.2
  • Kombu 5.6.1
  • Redis Sentinel Cluster
  • Docker python:3.10-slim-bookworm

Log:

[CRITICAL] 26/11/2025 05:34:42  -  Unrecoverable error: TypeError('NoneType takes no arguments')
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/kombu/transport/virtual/base.py", line 951, in create_channel
    return self._avail_channels.pop()
IndexError: pop from empty list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/celery/worker/worker.py", line 203, in start
    self.blueprint.start(self)
  File "/usr/local/lib/python3.10/site-packages/celery/bootsteps.py", line 116, in start
    step.start(parent)
  File "/usr/local/lib/python3.10/site-packages/celery/bootsteps.py", line 365, in start
    return self.obj.start()
  File "/usr/local/lib/python3.10/site-packages/celery/worker/consumer/consumer.py", line 326, in start
    blueprint.start(self)
  File "/usr/local/lib/python3.10/site-packages/celery/bootsteps.py", line 116, in start
    step.start(parent)
  File "/usr/local/lib/python3.10/site-packages/celery/worker/consumer/connection.py", line 21, in start
    c.connection = c.connect()
  File "/usr/local/lib/python3.10/site-packages/celery/worker/consumer/consumer.py", line 422, in connect
    conn = self.connection_for_read(heartbeat=self.amqheartbeat)
  File "/usr/local/lib/python3.10/site-packages/celery/worker/consumer/consumer.py", line 428, in connection_for_read
    return self.ensure_connected(
  File "/usr/local/lib/python3.10/site-packages/celery/worker/consumer/consumer.py", line 454, in ensure_connected
    conn = conn.ensure_connection(
  File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 408, in ensure_connection
    self._ensure_connection(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 461, in _ensure_connection
    return retry_over_time(
  File "/usr/local/lib/python3.10/site-packages/kombu/utils/functional.py", line 318, in retry_over_time
    return fun(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 941, in _connection_factory
    self._connection = self._establish_connection()
  File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 863, in _establish_connection
    conn = self.transport.establish_connection()
  File "/usr/local/lib/python3.10/site-packages/kombu/transport/virtual/base.py", line 975, in establish_connection
    self._avail_channels.append(self.create_channel(self))
  File "/usr/local/lib/python3.10/site-packages/kombu/transport/virtual/base.py", line 953, in create_channel
    channel = self.Channel(connection)
  File "/usr/local/lib/python3.10/site-packages/kombu/transport/redis.py", line 757, in __init__
    self.client.ping()
  File "/usr/local/lib/python3.10/site-packages/kombu/utils/objects.py", line 40, in __get__
    return super().__get__(instance, owner)
  File "/usr/local/lib/python3.10/functools.py", line 981, in __get__
    val = self.func(instance)
  File "/usr/local/lib/python3.10/site-packages/kombu/transport/redis.py", line 1304, in client
    return self._create_client(asynchronous=True)
  File "/usr/local/lib/python3.10/site-packages/kombu/transport/redis.py", line 1260, in _create_client
    return self.Client(connection_pool=self.async_pool)
  File "/usr/local/lib/python3.10/site-packages/kombu/transport/redis.py", line 1298, in async_pool
    self._async_pool = self._get_pool(asynchronous=True)
  File "/usr/local/lib/python3.10/site-packages/kombu/transport/redis.py", line 1487, in _get_pool
    params = self._connparams(asynchronous=asynchronous)
  File "/usr/local/lib/python3.10/site-packages/kombu/transport/redis.py", line 1245, in _connparams
    class Connection(connection_cls):
TypeError: NoneType takes no arguments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions