Java链接Redis时出现 “ERR Client sent AUTH, but no password is set” 异常的原因及解决办法
Java链接Redis时出现 “ERR Client sent AUTH, but no password is set” 异常的原因及解决办法
【错误提示】
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
at redis.clients.util.Pool.getResource(Pool.java:53)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:226)
at cn.hncu.RedisPool.getJedis(RedisPool.java:66)
at cn.hncu.RedisJava.main(RedisJava.java:15)
Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set
at redis.clients.jedis.Protocol.processError(Protocol.java:127)
at redis.clients.jedis.Protocol.process(Protocol.java:161)
at redis.clients.jedis.Protocol.read(Protocol.java:215)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)
at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:239)
at redis.clients.jedis.BinaryJedis.auth(BinaryJedis.java:2139)
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:108)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868)
【问题原因】
Redis服务器没有设置密码,但客户端向其发送了AUTH(authentication,身份验证)请求。
【解决办法】
确定Redis启动时指定是哪个配置文件。
如上图是 redis.windows.conf 文件,用文本编辑工具打开文件,找到“requirepass”,去掉注释设置密码。
编辑完后保存,重新启动Redis,再运行程序,OK。
Java链接Redis时出现 “ERR Client sent AUTH, but no password is set” 异常的原因及解决办法的更多相关文章
- Java链接Redis时出现 “ERR Client sent AUTH, but no password is set”
Java链接Redis时出现 “ERR Client sent AUTH, but no password is set” 异常的原因及解决办法. [错误提示] redis.clients.jedis ...
- Tomcat redis session manager connect redis show: ERR Client sent AUTH, but no password is set
解决问题redis问题:ERR Client sent AUTH, but no password is set - 东篱煮酒 - 博客园https://www.cnblogs.com/niepeis ...
- 解决问题redis问题:ERR Client sent AUTH, but no password is set
是的,这又是一个坑爹的问题. 明明在redis.conf中设置了密码,而且redis还启动了,为什么说没有密码呢? 大家都知道linux下启动redis有很多种方法, 其中有 ./redis-serv ...
- 连接redis错误:ERR Client sent AUTH, but no password is set
问题原因:没有设置redis的密码 解决:命令行进入Redis的文件夹: D:\Redis-x64-3.2.100>redis-cli.exe 查看是否设置了密码: 127.0.0.1:6379 ...
- java程序启动redis报错ERR Client sent AUTH, but no password is set
配置文件中注释掉password一句 重启程序即可
- 解决ERR Client sent AUTH, but no password is set
在搭建cookies池时,需要将账号密码保存到redis,保存时报错:ERR Client sent AUTH, but no password is set 报错原因:Redis服务器没有设置密码, ...
- 【java异常】【redis】ERR Client sent AUTH, but no password is set
项目中使用jedis或redisson连接redis时,如果redis没有密码,但在配置文件中写为 spring: redis: database: 0 host: 127.0.0.1 passwor ...
- Redis错误:jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set
原文链接:http://blog.csdn.net/rchm8519/article/details/48347797 redis.clients.util.Pool.getResource(Pool ...
- redis.clients.jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set
使用哨兵模式连接redis连接池时,遇到错误: Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR Client sen ...
随机推荐
- POJ——T 2891 Strange Way to Express Integers
http://poj.org/problem?id=2891 Time Limit: 1000MS Memory Limit: 131072K Total Submissions: 16849 ...
- [React Native] Animate the Scale of a React Native Button using Animated.spring
In this lesson we will use Animated.spring and TouchableWithoutFeedback to animate the scale of a bu ...
- ZOJ 3587 Marlon's String 扩展KMP
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3587 题意:给出两个字符串S和T.S,T<=100000.拿出 ...
- Linux 内存管理与系统架构设计
Linux 提供各种模式(比如,消息队列),但是最著名的是 POSIX 共享内存(shmem,shared memory). Linux provides a variety of schemes ( ...
- Linux下搭建JSP环境
Linux下搭建JSP环境 作为一名Java EE系统架构工程师,经常需要搭配和建立JSP(Java Server Pages)的开发环境和运行环境,所以本人在平时的工作中积累了一些在Linu ...
- beego的orm ,用的数据库sqlite3
测试 beego的orm ,用的数据库sqlite3 1 package main import ( "fmt" "github.com/astaxie/beego/or ...
- ubuntu14.04 printk()默认打印的位置
tail /var/log/syslog 即可显示printk打印的信息
- SGU 253 Theodore Roosevelt 快速判断点是否在凸包内
http://acm.sgu.ru/problem.php?contest=0&problem=253 题意简单易懂...给你n个点的凸包(经测试已经是极角序)...判断m个点是否在凸包内.. ...
- NOI2005维修数列(splay)
题目描述: Description 请写一个程序,要求维护一个数列,支持以下 6 种操作: 请注意,格式栏 中的下划线‘ _ ’表示实际输入文件中的空格 Input 输入的第1 行包含两个数N 和M( ...
- bzoj3786星系探索(splay维护dfs序)
Description 物理学家小C的研究正遇到某个瓶颈. 他正在研究的是一个星系,这个星系中有n个星球,其中有一个主星球(方便起见我们默认其为1号星球),其余的所有星球均有且仅有一个依赖星球.主星球 ...