在使用 redis-cli 连接 redis 集群,进行数据操作时,有报错
./redis-cli -h 192.24.54.1 -p 6379 -a '123456' 192.24.54.1:6379> get name (error) MOVED 5798 192.24.54.2:6379
解决方法:
这种情况一般是因为启动 redis-cli 时没有设置集群模式所导致。
启动时使用 -c 参数来启动集群模式,命令如下:
./redis-cli -h 192.24.54.1 -p 6379 -a '123456' -c 192.24.54.1:6379> get name -> Redirected to slot [5798] located at 192.24.54.2:6379 "yayun"
更多redis知识请关注redis入门教程栏目。
以上就是连接redis集群报错:(error) MOVED的解决方法的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号