Skip to content

Does channels-redis support redis cluster?I meat some problems when I use channels-redis with redis cluster. #345

@njuptfx

Description

@njuptfx

Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 184, in run_asgi
result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
File "/usr/local/lib/python3.7/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.7/site-packages/channels/routing.py", line 71, in call
Routes to different applications/consumers based on the URL path.
File "/mnt/bolean/backend/utils/core/middlewares.py", line 172, in call
return await self.inner(dict(scope, user=user), receive, send)
File "/mnt/bolean/backend/utils/core/router.py", line 38, in call
send,
File "/usr/local/lib/python3.7/site-packages/channels/consumer.py", line 94, in app
return await consumer(scope, receive, send)
File "/usr/local/lib/python3.7/site-packages/channels/consumer.py", line 59, in call
[receive, self.channel_receive], self.dispatch
File "/usr/local/lib/python3.7/site-packages/channels/utils.py", line 58, in await_many_dispatch
except asyncio.CancelledError:
File "/usr/local/lib/python3.7/site-packages/channels_redis/core.py", line 368, in receive
real_channel
File "/usr/local/lib/python3.7/site-packages/channels_redis/core.py", line 423, in receive_single
index, channel_key, timeout=self.brpop_timeout
File "/usr/local/lib/python3.7/site-packages/channels_redis/core.py", line 258, in _brpop_with_clean
await connection.eval(cleanup_script, 0, channel, backup_queue)
File "/usr/local/lib/python3.7/site-packages/redis/asyncio/client.py", line 491, in execute_command
lambda error: self._disconnect_raise(conn, error),
File "/usr/local/lib/python3.7/site-packages/redis/asyncio/retry.py", line 59, in call_with_retry
return await do()
File "/usr/local/lib/python3.7/site-packages/redis/asyncio/client.py", line 463, in _send_command_parse_response
return await self.parse_response(conn, command_name, **options)
File "/usr/local/lib/python3.7/site-packages/redis/asyncio/client.py", line 505, in parse_response
response = await connection.read_response()
File "/usr/local/lib/python3.7/site-packages/redis/asyncio/connection.py", line 954, in read_response
raise response from None
redis.exceptions.ResponseError: Script attempted to access a non local key in a cluster node script: 8d28fb4c84249684940e751f9f15170eb9a96e1a, on @user_script:2.

Python3.7.9, channels=4.0.0,channels-redis=4.0.0

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