[英]Django Redis Error unknown command 'BZPOPMIN'
I've installed Redis 3.0.54
.我已经安装了
Redis 3.0.54
。 Django is updated. Django 已更新。 I'm learning channels from the tutorial page .
我正在从 教程页面学习频道。
This is my terminal window for redis-cli and redis server Image of Terminal这是我的终端 window 用于 redis-cli 和 redis 服务器终端图像
System check identified no issues (0 silenced).
August 06, 2020 - 16:04:58
Django version 3.1, using settings 'mysite.settings'
Starting ASGI/Channels version 2.4.0 development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
HTTP GET /chat/lobby/ 200 [0.02, 127.0.0.1:60841]
WebSocket HANDSHAKING /ws/chat/lobby/ [127.0.0.1:60843]
WebSocket CONNECT /ws/chat/lobby/ [127.0.0.1:60843]
Exception inside application: ERR unknown command 'BZPOPMIN'
Traceback (most recent call last):
File "C:\Users\\Envs\py2\lib\site-packages\channels\sessions.py", line 183, in __call__
return await self.inner(receive, self.send)
File "C:\Users\\Envs\py2\lib\site-packages\channels\middleware.py", line 41, in coroutine_call
await inner_instance(receive, send)
File "C:\Users\\Envs\py2\lib\site-packages\channels\consumer.py", line 59, in __call__
[receive, self.channel_receive], self.dispatch
File "C:\Users\\Envs\py2\lib\site-packages\channels\utils.py", line 58, in await_many_dispatch
await task
File "C:\Users\\Envs\py2\lib\site-packages\channels\utils.py", line 50, in await_many_dispatch
result = task.result()
File "C:\Users\\Envs\py2\lib\site-packages\channels_redis\core.py", line 453, in receive
real_channel
File "C:\Users\\Envs\py2\lib\site-packages\channels_redis\core.py", line 508, in receive_single
index, channel_key, timeout=self.brpop_timeout
File "C:\Users\\Envs\py2\lib\site-packages\channels_redis\core.py", line 345, in _brpop_with_clean
result = await connection.bzpopmin(channel, timeout=timeout)
aioredis.errors.ReplyError: ERR unknown command 'BZPOPMIN'
WebSocket DISCONNECT /ws/chat/lobby/ [127.0.0.1:60843]
BZPOPMIN and BZPOPMAX (also non-blocking versions ZPOPMIN
and ZPOPMAX
) are "Available since 5.0.0". BZPOPMIN和BZPOPMAX (也是非阻塞版本
ZPOPMIN
和ZPOPMAX
)“自 5.0.0 起可用”。 You need to upgrade your redis to at least version 5 to use them, since you use version 3.0.54.您需要将 redis 至少升级到版本 5 才能使用它们,因为您使用的是 3.0.54 版本。
You may check download page for available versions and instructions to download them.您可以查看下载页面以获取可用版本和下载说明。
download the latest version of Redis from here and try it will work从这里下载最新版本的 Redis 并尝试它会工作
https://github.com/tporadowski/redis/releases https://github.com/tporadowski/redis/releases
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.