2017.7.10 Redis报错:DENIED Redis is running in protected mode
参考来自:
DENIED Redis is running in protected mode
完整错误信息:
Caused by: redis.clients.jedis.exceptions.JedisDataException:
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.

2017.7.27 又遇到了这个错误,之前明明将protected-mode改为了no,就ok的。
原因是:之前redis的服务端和客户端都是在本机上,现在客户端在其他机器上,访问redis就出错了。
因此采取了第4种。设置redis的密码。
操作过程:
(1)开启168.2.237.207上的redis
(2)在88环境上连接168.2.237.207上的redis,出错

(3)在168.2.237.207上开一个redis的客户端,连接本机的redis,并且设置密码。

(4)回到88环境,重新连接redis,报错提示:NOAUTH Authentication required。

(5)输入密码,连接成功。

但这里有一个问题:一旦redis服务器重启,又报这个DENIED Redis is running in protected mode的错误了。每次重启后都要重新设置密码才能在别的机器上成功连接。
有没有只设置一次密码就ok的办法?
2017.7.10 Redis报错:DENIED Redis is running in protected mode的更多相关文章
- docker启动redis报错 oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
docker启动redis报错 1:C 17 Jun 08:18:04.613 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo1:C 17 Jun 08 ...
- Redis报错:redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snap
首先找到出现错误的原因: redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but ...
- redis报错MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist
解决方法:通过redis-cli连接到服务器后执行以下命令: config set stop-writes-on-bgsave-error no 注意:这种方法只是忽略了问题,并没有解决问题,具体问题 ...
- 使用Lua 脚本实现redis 分布式锁,报错:ERR Error running script (call to f_8ea1e266485534d17ddba5af05c1b61273c30467): @user_script:10: @user_script: 10: Lua redis() command arguments must be strings or integers .
在使用SpringBoot开发时,使用RedisTemplate执行 redisTemplate.execute(lockScript, redisList); 发现报错: ERR Error run ...
- redis报错解决
1.Connecting to node 127.0.0.17000 [ERR] Sorry, can't connect to node 192.168.1.917000 redis集群:Conne ...
- mac brew install redis 报错
mac brew install redis 报错 /usr/local/opt/php55/bin/phpize /usr/local/opt/php55/bin/phpize: line 61: ...
- redis报错Windows error 0x70(a large memory)
redis报错Windows error 0x70 redis 嫌弃你内存不够了,就给你不开第二个实例. The Windows version of Redis allocates a large ...
- redis 报错及解决
报错: (error) MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persi ...
- filebeat output redis 报错 i/o timeout
filebeat output redis 报错 i/o timeout 先把报错内容贴出来. ERROR redis/client. go: Failed to RPUSH to redis li ...
随机推荐
- gdb server调试步骤
编译gdb/gdbserver 编译arm-linux-gdb 下载gdb-7.12,解压缩进入目录 ./configure --target=arm-linux --program-prefix=a ...
- 花花的礼物 (huahua)
花花的礼物 (huahua) 花花是个爱动脑子的孩子,在她的生日的时候,她的爸爸给她准备了个礼物.但是,她的爸爸并不想让她轻易得到礼物,他把礼物放在了一个箱子里面,只有输入正确的密码才能打开箱子,而她 ...
- PriorityQueue详解(一)
在Java SE 5.0中,引入了一些新的Collection API,PriorityQueue就是其中的一个.今天由于机缘巧合,花了一个小时看了一下这个类的内部实现,代码很有点意思,所以写下来跟大 ...
- centos编译安装vim并支持lua
系统环境:centos6.5 x86 (basic server) 1.安装编译环境. # yum groupinstall "Development Tools" 2.安装vim ...
- 读取文本文件时<U+FEFF> 导致的奇怪问题
项目中经常会从一些文本文件中读取数据进行业务处理,最近遇到一个问题,另外一个部门提供一个txt文本给我们进行业务处理,当我们使用字符流读取文本之后,处理时,发现第一行数据无法匹配,其他数据可以正常处理 ...
- 使用dom4j工具包对xml文件解析
xml文件 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http: ...
- 【转载】Photoshop-制作图片圆角2种方法
学习网址:http://www.23ps.com/photoshop/cjjc/300002034.htm 方案一: 使用选区和蒙版相结合,用图章制作圆角选区,删除多余部分 效果: 实现步骤: 一.如 ...
- CF978C Letters【前缀和+二分查找/几房几号】
[链接]:CF978C [分析]:在前缀和数组种二分找到>=询问数的位置,根据位置就好操作了 [代码]: #include<bits/stdc++.h> using namespac ...
- HDU 1847 【巴什博弈】
Good Luck in CET-4 Everybody! Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Ja ...
- 51nod 1096 距离之和最小【中位数】
1096 距离之和最小 基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题 收藏 关注 X轴上有N个点,求X轴上一点使它到这N个点的距离之和最小,输出这个最小的距离 ...