Error: Protocol error, got "H" as reply type byte

时间:2022-07-25
本文章向大家介绍Error: Protocol error, got "H" as reply type byte,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

Redis 报错

> get xxx
Error: Protocol error, got "H" as reply type byte

原来是 启动 redis-server的时候 没有加上配置文件,于是把redis.conf 复制到/etc/下一份,

在配置文件里redis.conf 注释掉bind 127.0.0.1, 然后 protected-mode no , 保存 然后指定配置文件重新启动,redis-server /etc/redis.conf. 重新测试,成功!

当然上面这种方式在本地玩玩就行了,毕竟外网都是可以访问的,线上的话还是需要bind ip,protected-mode 最好也设置为yes

bind 你需要访问的ip即可。