lua_redis 使用时出现异常:MOVED 10743

当我使用 lua 连接 redis 时,无法从 redis 获取键值,并且出现了异常。以下是详细说明:

这是我的 lua 代码:

local ip_list,err = red:get("eask:gray:ips");
if not ip_list then
    ngx.log(ngx.INFO,"redis ","failed to get,"..err.." ")
end
ngx.log(ngx.INFO,"=====ip_list=====",ip_list)

错误日志:

[lua] gray_redis.lua:53: redis failed to get,MOVED 10743 133.*.*.5:16388
[lua] gray_redis.lua:58: =====ip_list=====false,

原文链接 https://stackoverflow.com/questions/70299287

点赞
stackoverflow用户16240196
stackoverflow用户16240196

我似乎理解了,我使用 Redis 集群,该键不在此节点中。

2021-12-10 03:14:16