Having a similar problem with the rqworker command connecting to an upstash redis instance:
Traceback (most recent call last):
File "/app/manage.py", line 22, in <module>
File "/app/manage.py", line 18, in main
"/opt/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
File "/opt/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute
"/opt/venv/lib/python3.10/site-packages/django/core/management/base.py", line 414, in run_from_argv
File "/opt/venv/lib/python3.10/site-packages/django/core/management/base.py", line 460, in execute
output = self.handle(*args, **options)
"/opt/venv/lib/python3.10/site-packages/django_rq/management/commands/rqworker.py", line 122, in handle
w = get_worker(*args, **worker_kwargs)
"/opt/venv/lib/python3.10/site-packages/django_rq/workers.py", line 51, in get_worker
File "/opt/venv/lib/python3.10/site-packages/rq/worker.py", line 228, in __init__
self.ip_address = [
IndexError: list index out of range
I’ve tried connecting with the resolved ipv6 address and got the same exception.
Weird thing is, Django’s redis cache works fine, just the worker failing.
Are you appending the /0 database as well? Another thing to consider is the Upstash IPs are IPv6 addresses. That doesn’t seem like it should cause problems, but worth noting in case something specific is needed to make that work with Python.
UPDATE: I tried this using the redis library required by rq:
r = redis.Redis.from_url(“redis://default:email@example.com”)