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即可。