redis DENIED Redis is running in protected mode because protected mode is enabled....

(error) DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server. 3) If you started the server manually just for testing, restart it with the '--protected-mode no' option. 4) Setup a bind address or an authentication password. NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.(错误)否认复述是在保护模式下运行,因为启用保护模式,没有指定绑定地址,不要求客户身份验证密码。在这种模式下连接只接受从环回接口。如果你想从外部计算机连接到复述,你可能采取的解决方案:1)只是禁用保护模式发送命令的配置设置保护模式没有从loopback接口连接到复述同一主机服务器正在运行,然而确保复述,不是公开从互联网访问如果你这样做。利用配置重写这永久的改变。2)或者你可以禁用保护模式通过编辑复述,配置文件,并设置保护模式选择“不”,然后重新启动服务器。3)如果你手动测试,启动服务器重启”——保护模式没有选项。4)设置一个绑定地址或身份验证密码。注意:您只需要做上面的事情之一为了服务器开始接受来自外部的连接。



redis用127.0.0.1访问正常,但是用ip访问,就会报错,解决方法,修改redis.conf文件

1.bind 0.0.0.0                  设置允许访问的ip

2.requirepass 123456   设置访问密码

3.protected-mode no     关闭保护模式


然后指定默认默认配置文件启动   ./redis-server redis.conf

接着测试,通过。

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页