bind 0.0.0.0
protected-mode yes
port 0
tls-port 9875
tls-cert-file /home/centos/redis/tls-gen/basic/result/server_certificate.pem
tls-key-file /home/centos/redis/tls-gen/basic/result/server_key.pem
tls-ca-cert-file /home/centos/redis/tls-gen/basic/result/ca_certificate.pem
tls-replication yes
daemonize yes
pidfile /home/centos/redis/redis.pid
logfile /home/centos/redis/redis.log
dir /home/centos/redis
port 29876
tls-port 29875
tls-cert-file "/home/centos/redis/tls-gen/basic/result/server_certificate.pem"
tls-key-file "/home/centos/redis/tls-gen/basic/result/server_key.pem"
tls-ca-cert-file "/home/centos/redis/tls-gen/basic/result/ca_certificate.pem"
tls-replication yes
daemonize yes
pidfile /home/centos/redis/sentinel.pid
logfile /home/centos/redis/sentinel.log
dir /home/centos/redis
sentinel monitor mymaster 127.0.0.1 9875 1
sentinel deny-scripts-reconfig yes
sentinel config-epoch mymaster 6
I was expecting Celery to be able to connect to Sentinel, fetch the host and port of the Master.
And then use TLS to connect to the Redis Master.
Details
-------------- celery@ip v5.0.0 (singularity)
--- ***** -----
-- ******* ---- Linux-3.10.0-862.3.2.el7.x86_64-x86_64-with-centos-7.5.1804-Core 2020-11-02 14:00:50
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app: corridor_api:0x7fce57b40860
- ** ---------- .> transport: sentinel://IP:29876//
- ** ---------- .> results: memory:///
- *** --- * --- .> concurrency: 1 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> apilocal exchange=apilocal(direct) key=apilocal
.> celery exchange=celery(direct) key=celery
[2020-11-02 14:00:50,595: CRITICAL/MainProcess] Unrecoverable error: TypeError("init() got an unexpected keyword argument 'connection_pool'",)
Traceback (most recent call last):
File "/opt/app/venv/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 918, 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 "/opt/app/venv/lib/python3.6/site-packages/redis/connection.py", line 1185, in get_connection
connection = self._available_connections.pop()
IndexError: pop from empty list
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/app/venv/lib/python3.6/site-packages/celery/worker/worker.py", line 203, in start
self.blueprint.start(self)
File "/opt/app/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 116, in start
step.start(parent)
File "/opt/app/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 365, in start
return self.obj.start()
File "/opt/app/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 311, in start
blueprint.start(self)
File "/opt/app/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 116, in start
step.start(parent)
File "/opt/app/venv/lib/python3.6/site-packages/celery/worker/consumer/connection.py", line 21, in start
c.connection = c.connect()
File "/opt/app/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 398, in connect
conn = self.connection_for_read(heartbeat=self.amqheartbeat)
File "/opt/app/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 405, in connection_for_read
self.app.connection_for_read(heartbeat=heartbeat))
File "/opt/app/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 427, in ensure_connected
conn.connect()
File "/opt/app/venv/lib/python3.6/site-packages/kombu/connection.py", line 277, in connect
max_retries=1, reraise_as_library_errors=False
File "/opt/app/venv/lib/python3.6/site-packages/kombu/connection.py", line 439, in _ensure_connection
callback, timeout=timeout
File "/opt/app/venv/lib/python3.6/site-packages/kombu/utils/functional.py", line 325, in retry_over_time
return fun(*args, **kwargs)
File "/opt/app/venv/lib/python3.6/site-packages/kombu/connection.py", line 866, in _connection_factory
self._connection = self._establish_connection()
File "/opt/app/venv/lib/python3.6/site-packages/kombu/connection.py", line 801, in _establish_connection
conn = self.transport.establish_connection()
File "/opt/app/venv/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 938, in establish_connection
self._avail_channels.append(self.create_channel(self))
File "/opt/app/venv/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 920, in create_channel
channel = self.Channel(connection)
File "/opt/app/venv/lib/python3.6/site-packages/kombu/transport/redis.py", line 526, in init
self.client.ping()
File "/opt/app/venv/lib/python3.6/site-packages/redis/client.py", line 1378, in ping
return self.execute_command('PING')
File "/opt/app/venv/lib/python3.6/site-packages/redis/client.py", line 898, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File "/opt/app/venv/lib/python3.6/site-packages/redis/connection.py", line 1187, in get_connection
connection = self.make_connection()
File "/opt/app/venv/lib/python3.6/site-packages/redis/connection.py", line 1227, in make_connection
return self.connection_class(**self.connection_kwargs)
File "/opt/app/venv/lib/python3.6/site-packages/redis/connection.py", line 828, in init
super(SSLConnection, self).init(**kwargs)
TypeError: init() got an unexpected keyword argument 'connection_pool'
Checklist
masterbranch of Celery.contribution guide
on reporting bugs.
for similar or identical bug reports.
for existing proposed fixes.
to find out if the bug was already fixed in the master branch.
in this issue (If there are none, check this box anyway).
Mandatory Debugging Information
celery -A proj reportin the issue.(if you are not able to do this, then at least specify the Celery
version affected).
masterbranch of Celery.pip freezein the issue.to reproduce this bug.
Optional Debugging Information
and/or implementation.
result backend.
broker and/or result backend.
ETA/Countdown & rate limits disabled.
and/or upgrading Celery and its dependencies.
Related Issues and Possible Duplicates
Related Issues
Possible Duplicates
Environment & Settings
Steps to Reproduce
Required Dependencies
Other Dependencies
Needs SSL certificates for Redis TLS setup - I used https://github.com/michaelklishin/tls-gen to create them
Minimally Reproducible Test Case
I have the following configs:
With redis.conf:
With redis-sentinel.conf:
Expected Behavior
I was expecting Celery to be able to connect to Sentinel, fetch the host and port of the Master.
And then use TLS to connect to the Redis Master.
Actual Behavior
It gives an error
TypeError: __init__() got an unexpected keyword argument 'connection_pool'Traceback:
Details
-------------- celery@ip v5.0.0 (singularity) --- ***** ----- -- ******* ---- Linux-3.10.0-862.3.2.el7.x86_64-x86_64-with-centos-7.5.1804-Core 2020-11-02 14:00:50 - *** --- * --- - ** ---------- [config] - ** ---------- .> app: corridor_api:0x7fce57b40860 - ** ---------- .> transport: sentinel://IP:29876// - ** ---------- .> results: memory:/// - *** --- * --- .> concurrency: 1 (prefork) -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker) --- ***** ----- -------------- [queues] .> apilocal exchange=apilocal(direct) key=apilocal .> celery exchange=celery(direct) key=celery[2020-11-02 14:00:50,595: CRITICAL/MainProcess] Unrecoverable error: TypeError("init() got an unexpected keyword argument 'connection_pool'",)
Traceback (most recent call last):
File "/opt/app/venv/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 918, 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 "/opt/app/venv/lib/python3.6/site-packages/redis/connection.py", line 1185, in get_connection
connection = self._available_connections.pop()
IndexError: pop from empty list
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/app/venv/lib/python3.6/site-packages/celery/worker/worker.py", line 203, in start
self.blueprint.start(self)
File "/opt/app/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 116, in start
step.start(parent)
File "/opt/app/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 365, in start
return self.obj.start()
File "/opt/app/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 311, in start
blueprint.start(self)
File "/opt/app/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 116, in start
step.start(parent)
File "/opt/app/venv/lib/python3.6/site-packages/celery/worker/consumer/connection.py", line 21, in start
c.connection = c.connect()
File "/opt/app/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 398, in connect
conn = self.connection_for_read(heartbeat=self.amqheartbeat)
File "/opt/app/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 405, in connection_for_read
self.app.connection_for_read(heartbeat=heartbeat))
File "/opt/app/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 427, in ensure_connected
conn.connect()
File "/opt/app/venv/lib/python3.6/site-packages/kombu/connection.py", line 277, in connect
max_retries=1, reraise_as_library_errors=False
File "/opt/app/venv/lib/python3.6/site-packages/kombu/connection.py", line 439, in _ensure_connection
callback, timeout=timeout
File "/opt/app/venv/lib/python3.6/site-packages/kombu/utils/functional.py", line 325, in retry_over_time
return fun(*args, **kwargs)
File "/opt/app/venv/lib/python3.6/site-packages/kombu/connection.py", line 866, in _connection_factory
self._connection = self._establish_connection()
File "/opt/app/venv/lib/python3.6/site-packages/kombu/connection.py", line 801, in _establish_connection
conn = self.transport.establish_connection()
File "/opt/app/venv/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 938, in establish_connection
self._avail_channels.append(self.create_channel(self))
File "/opt/app/venv/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 920, in create_channel
channel = self.Channel(connection)
File "/opt/app/venv/lib/python3.6/site-packages/kombu/transport/redis.py", line 526, in init
self.client.ping()
File "/opt/app/venv/lib/python3.6/site-packages/redis/client.py", line 1378, in ping
return self.execute_command('PING')
File "/opt/app/venv/lib/python3.6/site-packages/redis/client.py", line 898, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File "/opt/app/venv/lib/python3.6/site-packages/redis/connection.py", line 1187, in get_connection
connection = self.make_connection()
File "/opt/app/venv/lib/python3.6/site-packages/redis/connection.py", line 1227, in make_connection
return self.connection_class(**self.connection_kwargs)
File "/opt/app/venv/lib/python3.6/site-packages/redis/connection.py", line 828, in init
super(SSLConnection, self).init(**kwargs)
TypeError: init() got an unexpected keyword argument 'connection_pool'