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。

原文地址:https://www.cnblogs.com/jpfss/p/10159277.html

时间: 2024-11-03 03:29:48

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.exceptions.JedisConnectionException: Could not get a resource from the poolat redis.clients.util.Pool.getResource(Pool.java:53) at 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/niepeishen/p/6371270.html authentication - ERR Client sent AUTH, but no password is set - Stack Overflowhttps://stackoverflow.com/questions/44598321/err-clie

解决ERR Client sent AUTH, but no password is set

在搭建cookies池时,需要将账号密码保存到redis,保存时报错:ERR Client sent AUTH, but no password is set 报错原因:Redis服务器没有设置密码,但客户端向其发送了AUTH(authentication,身份验证)请求. 解决方法:设置密码,并指定配置文件进行启动redis. 原文地址:https://www.cnblogs.com/2sheep2simple/p/10346969.html

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.Java:50)redis.clients.jedis.JedisPool.getResource(JedisPool.java:88)com.radiadesign.catalina.session.RedisSessionManager.acquireConnection(RedisSessi

redis.clients.jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set

1.项目启动报错: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool redis.clients.util.Pool.getResource(Pool.java:50) redis.clients.jedis.JedisPool.getResource(JedisPool.java:88) com.radiadesign.catalina.session.

安装Redis之后,报(error) ERR Client sent AUTH, but no password is set

Win10下,在安装完成Redis后,需要登录auth账户,验证是否安装成功. 在redis目录下redis.windows-service.conf文件找到requirepass,追加一行,输入requirepass 123456,即为登录密码,重启redis服务再登录即可.但是我并没有成功,后来发现是需要在命令行设置密码才行 解决步骤如下:1.启动redis服务 2.cmd命令行切换至Redis的文件夹中redis-cli目录或者点击redis-cli右击以管理员身份运行,打开命令窗口 ?C

jedis 连接 redis:Could not get a resource from the pool——我的出错原因和解决办法

windows 下安装的,本机使用 现象:刚装好开发使用好好的, 重启电脑后就报这个错 网上的所有可能都试过,没有用. 最后,放弃所有包装,用最原始的代码进行连接测试: Jedis jedis=new Jedis("127.0.0.1"); jedis.auth("7777");//password jedis.set("firstKey", "hello redis!"); ERR Client sent AUTH, but

[Redis]ResponseError: Client sent AUTH, but no password is set

由于在代码中给redis添加了密码,如下 redis_store = redis.Redis(host='localhost', port=6379, db=4, password='root') 然而redis.conf中并没有设置密码,因此报ResponseError: Client sent AUTH, but no password is set 解决方法:将password字段去除即可

[Phonegap+Sencha Touch] 移动开发24 打包wp8.1的App,运行时输入框聚焦弹出软键盘之后,界面上移而不恢复原位的解决办法

这个现象只出现在phonegap打包sencha touch的wp8.1程序会出现(仅wp8.1,wp8正常),其它js框架我测试了几个(app framework, jquery mobile),好像没有这个问题. 我来描述一下这个现象: 1.运行phonegap打包的wp8程序,打开一个有输入框的界面,如下图: 2.点击输入框,使其弹出软键盘,界面会上移,如下图: 3.点返回键隐藏软键盘(或者点击界面上其它地方隐藏软键盘),此时界面不恢复原位,如下图: 我的一些研究结果: 1.这种现象只出现