springboot2集成redis5报错:io.lettuce.core.RedisException: io.lettuce.core.RedisConnectionException: DENIED Redis is running in protected
报错信息如下:
Caused by: io.lettuce.core.RedisException: io.lettuce.core.RedisConnectionException: 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.
at io.lettuce.core.LettuceFutures.awaitOrCancel(LettuceFutures.java:129)
at io.lettuce.core.FutureSyncInvocationHandler.handleInvocation(FutureSyncInvocationHandler.java:69)
at io.lettuce.core.internal.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:80)
at com.sun.proxy.$Proxy84.setex(Unknown Source)
at org.springframework.data.redis.connection.lettuce.LettuceStringCommands.setEx(LettuceStringCommands.java:230)
... 72 more
报错说得很详细,说明redis是以受保护的模式在运行,没有指定地址,也没有设置密码,只能使用环回接口。 如果想连接外部的计算机,可以采用以下措施之一:
1. 使用 "CONFIG SET protected-mode no" 设置
2. 修改redis.conf 配置文件,然后重启服务

3. 如果仅是为了测试,在启动redis服务时,加上 “--protected-mode no ”
./redis-server ./redis.conf --protected-mode no
4. 绑定明确的地址,或者设计密码

经过测试,确实可以!!!
springboot2集成redis5报错:io.lettuce.core.RedisException: io.lettuce.core.RedisConnectionException: DENIED Redis is running in protected的更多相关文章
- redis问题解决 Caused by: io.lettuce.core.RedisException: io.lettuce.core.RedisConnectionException: DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specifie
1找到redis的配置文件 redis.conf vim redis.conf 修改 protected-mode yes 改为 protected-mode no 注释掉 #bin 127.0.0 ...
- error) DENIED Redis is running in protected mode because protected mode is enabled报错
官网地址:https://redis.io/download 官方安装文档如下: Installation Download, extract and compile Redis with: $ wg ...
- 2017.7.10 Redis报错:DENIED Redis is running in protected mode
参考来自: java 客户端链接不上redis解决方案 DENIED Redis is running in protected mode 完整错误信息: Caused by: redis.clien ...
- 【Redis】【报错】redis.exceptions.ResponseError: DENIED Redis is running in protected mode
(一)报错前提 写flask 项目的时候,因为连接了私有云中的redis地址指定了IP host,启动项目的时候报错 (二)解决方法 首先要切换到root用户 root@:/etc/redis# pw ...
- Redis报错:DENIED Redis is running in protected mode
转:Redis使用认证密码登录 Redis默认配置是不需要密码认证的,也就是说只要连接的Redis服务器的host和port正确,就可以连接使用.这在安全性上会有一定的问题,所以需要启用Redis ...
- 解决使用jedis连接是报DENIED Redis is running in protected mode错误
DENIED Redis is running in protected mode because protected mode is enabled, no bind address was spe ...
- SpringBoot2整合Shiro报错 UnavailableSecurityManagerException: No SecurityManager accessible to the calling code 【已解决】
SpringBoot集成Shiro报错 UnavailableSecurityManagerException: No SecurityManager accessible to the callin ...
- eclipse连接远程Hadoop报错,Caused by: java.io.IOException: 远程主机强迫关闭了一个现有的连接。
eclipse连接远程Hadoop报错,Caused by: java.io.IOException: 远程主机强迫关闭了一个现有的连接.全部报错信息如下: Exception in thread & ...
- Ambari集成Kerberos报错汇总
Ambari集成Kerberos报错汇总 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.查看报错的配置信息步骤 1>.点击Test Kerberos Client,查看相 ...
随机推荐
- 网站名,服务器名,url,ip,域名的区别和联系。
平时我们可能容易混淆这几个名词含义,今天我打算捋一捋这几个概念. 我们知道,两台计算机要想互相通信,就像古代写信一样,地址必须要唯一的,不然就会出错.计算机之间通信也是一样的,要保证计算机的地址的唯一 ...
- php面试专题---MYSQL查询语句优化
php面试专题---MYSQL查询语句优化 一.总结 一句话总结: mysql的性能优化包罗甚广: 索引优化,查询优化,查询缓存,服务器设置优化,操作系统和硬件优化,应用层面优化(web服务器,缓存) ...
- 牛客提高D4t3 清新题
分析 树上从下往上线性基合并即可 并不需要启发式/xyx 代码 #include<iostream> #include<cstdio> #include<cstring& ...
- zabbix 接入钉钉机器人报警
import requests import json import sys import os headers = {'Content-Type': 'application/json;charse ...
- php基础/类型
1.php的格式: <?php ?> 内嵌格式: <? ?> (php可以写在html文件里面) 2.php的输出:echo (每段的结束必须加;) 3.定义变量: 不需要管他 ...
- nginx配置多个虚拟主机(mac)
1 . 安装 通过homebrew安装nginx,默认安装在:/usr/local/Cellar/nginx/版本号.配置文件在路径:/usr/local/etc/nginx ,默认配置文件ngin ...
- C++ bitset的使用
bitset 一般代替 bool 数组使用,常用于优化空间,因为 bitset 中一个元素只占 1 bit. bitset 的大小在定义使就需要确定.如果想要不定长的 bitset,就需要使用 vec ...
- Hibernate入门1
Hibernate概述: 1. 什么是框架: 写程序,在使用框架之后,帮我们实现一部分的功能,使用框架的好处可以少写一部分代码实现功能 2. 什么是hibernate框架: hibernate框架应用 ...
- android环境问题
1.android studio bundle和android studio ide区别 android studio bundle和android studio ide区别 准确的说是这三种: 最开 ...
- [HDU 1529]Cashier Employment(差分约束系统)
[HDU 1529]Cashier Employment(差分约束系统) 题面 有一个超市,在24小时对员工都有一定需求量,表示为\(r_i\),意思为在i这个时间至少要有i个员工,现在有n个员工来应 ...