参考来自:

java 客户端链接不上redis解决方案

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.
这里列举了四个解决办法。
我用了第二种。将配置文件里的protected mode改为了no,原本是yes。

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的更多相关文章

  1. 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 ...

  2. Redis报错:redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snap

    首先找到出现错误的原因: redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but ...

  3. 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 注意:这种方法只是忽略了问题,并没有解决问题,具体问题 ...

  4. 使用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 ...

  5. redis报错解决

    1.Connecting to node 127.0.0.17000 [ERR] Sorry, can't connect to node 192.168.1.917000 redis集群:Conne ...

  6. mac brew install redis 报错

    mac brew install redis 报错 /usr/local/opt/php55/bin/phpize /usr/local/opt/php55/bin/phpize: line 61: ...

  7. redis报错Windows error 0x70(a large memory)

    redis报错Windows error 0x70 redis 嫌弃你内存不够了,就给你不开第二个实例. The Windows version of Redis allocates a large ...

  8. redis 报错及解决

    报错: (error) MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persi ...

  9. filebeat output redis 报错 i/o timeout

    filebeat output  redis 报错 i/o timeout 先把报错内容贴出来. ERROR redis/client. go: Failed to RPUSH to redis li ...

随机推荐

  1. 【CF Edu 28 C. Four Segments】

    time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...

  2. mongo-aggregate命令详解

    一.aggregate执行流程和特性 1.执行流程: db.collection.aggregate()是基于数据处理的聚合管道,每个文档通过一个由多个阶段(stage)组成的管道,可以对每个阶段的管 ...

  3. Guns V2.5

    Guns V2.5 新版Guns基于SpringBoot全面升级,完美整合springmvc + shiro + MyBatis 通用 Mapper + 分页插件 PageHelper + beetl ...

  4. Build RPM package from source code

    # yum install rpm-build# wget http://rsync.samba.org/ftp/rsync/rsync-3.0.9.tar.gz# vim rsync.specNam ...

  5. centos 7 服务器网卡做bond

    前期环境准备 [root@ /root] alibaba cloud#cat /etc/redhat-releaseCentOS Linux release 7.4.1708 (Core)[root@ ...

  6. windows 系统下git 的安装

    在linux系统下,可以直接在命令窗口安装和使用git.但是,在windows系统下,想要达到同样的效果,可以安装git,使用git bash到达效果.具体安装步骤如下: 第一步:官网上下载git 网 ...

  7. 翻煎饼_简单模拟_C++

    一.题目描述(懒人可直接跳过看题目概述) 题目来源: SWUST OJ  题目0254 http://acm.swust.edu.cn/problem/0254/ 二.问题概述 给出一列数,每次可将包 ...

  8. Log4Net日志分类和自动维护

    背景 在程序中,我们调试运行时信息,Log4Net是一个不错的解决方案.不知道是我用的不好,用到最后反而都不想看日志了.原因是因为我n个功能使用的默认的Logger来记录日志,这样以来,所有功能记录的 ...

  9. VS2015开发的C++应用如何不依赖Visual C++ 2015 redistributable?

    1,“项目属性,C/C++,代码生成”,“运行库改”为“多线程(/MT)”.* MT开头的是静态引用,MD开头的是动态引用,d结尾的是Debug调试版本,没有d的是Release发布版本,所以就一 共 ...

  10. sql多对多探讨

    --用sql语句探讨一对多 多对多关系 /**** 你有3个表  学生表(学生id 学生姓名) 课程表(课程id 课程名) 成绩表 (学生id 课程id 分数) 班级表(班级id 学生id) 这里的班 ...