其它机子的PHP访问redis爆“protocol error, got 'n' as reply type byte ”错误

 

解决办法:

在redis配置文件redis.conf中注释掉bind配置项的同时把redis3.2新增的配置项

protected-mode由yes改为no,改完后重启redis服务,其它机子就可访问redis服务

 

注意如果使用src/redis-server 这个指令重启服务器,那问题还是依旧存在,解决方式是使 ./redis-server redis.conf

redis.conf是一个默认的配置文件。刚才我们已经修改里面的配置。 这样其他服务器访问就不会在报错了!

 

修改 redis.conf 中,将 daemonize no 改成:

daemonize yes

然后运行

./redis-server redis.conf

 

相关文章:

  • 2022-01-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-08
  • 2021-06-28
  • 2022-12-23
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2021-12-28
  • 2021-12-16
  • 2021-06-18
  • 2021-09-30
相关资源
相似解决方案