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.RedisSessionManager.acquireConnection(RedisSessionManager.java:107)
com.radiadesign.catalina.session.RedisSessionManager.loadSessionFromRedis(RedisSessionManager.java:388)
com.radiadesign.catalina.session.RedisSessionManager.findSession(RedisSessionManager.java:330)
org.apache.catalina.connector.Request.doGetSession(Request.java:2981)
org.apache.catalina.connector.Request.getSessionInternal(Request.java:2599)
com.radiadesign.catalina.session.RedisSessionHandlerValve.invoke(RedisSessionHandlerValve.java:28)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)
root cause

redis.clients.jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set
redis.clients.jedis.Protocol.processError(Protocol.java:113)
redis.clients.jedis.Protocol.process(Protocol.java:138)
redis.clients.jedis.Protocol.read(Protocol.java:192)
redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:282)
redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:181)
redis.clients.jedis.BinaryJedis.auth(BinaryJedis.java:1930)
redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:71)
org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:819)
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:429)
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:360)
redis.clients.util.Pool.getResource(Pool.java:48)
redis.clients.jedis.JedisPool.getResource(JedisPool.java:88)
com.radiadesign.catalina.session.RedisSessionManager.acquireConnection(RedisSessionManager.java:107)
com.radiadesign.catalina.session.RedisSessionManager.loadSessionFromRedis(RedisSessionManager.java:388)
com.radiadesign.catalina.session.RedisSessionManager.findSession(RedisSessionManager.java:330)
org.apache.catalina.connector.Request.doGetSession(Request.java:2981)
org.apache.catalina.connector.Request.getSessionInternal(Request.java:2599)
com.radiadesign.catalina.session.RedisSessionHandlerValve.invoke(RedisSessionHandlerValve.java:28)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)

2.报错的原因:是redis服务没设置密码,而项目配置文件中写了有redis密码

解决方案1.是把项目配置文件中的密码password设置为空

2.是设置redis服务密码

#1.启动redis-server.exe
#2.启动redis-cli.exe
#3.设置redis配置密码(每次redis服务重启都要设置一下)
redis 127.0.0.1:6379> CONFIG SET requirepass "123456"
OK
redis 127.0.0.1:6379> AUTH 123456
Ok

然后启动项目就可以连接本机的redis服务了。

原文地址:https://www.cnblogs.com/zs-notes/p/11395961.html

时间: 2024-10-04 05:41:41

redis.clients.jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set的相关文章

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 unknown command 'PSETEX'

在spring中 针对 RedisTemplate类: private RedisTemplate<String, String> template; 当调用下面方法 template.opsForValue().set(key, value,times, timeUnit); 当指定timeUnit为TimeUnit.MILLISECONDS 将抛出下面异常 redis.clients.jedis.exceptions.JedisDataException: ERR unknown comm

redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots

最近在学习Redis ,在写test测试的时候碰到这个报错: redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis

redis.clients.jedis.exceptions.JedisDataException :READONLY You can&#39;t write

分布式直连同步调用测试时出现的错误:主从复制架构下,默认Slave是只读的,如果写入则会报错: redis.clients.jedis.exceptions.JedisDataException: READONLY You can't write 解决方案: 主redis修改redis.windows.conf文件中的    appendonly no redis.clients.jedis.exceptions.JedisDataException :READONLY You can't wr

安装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

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.JedisPool.getResource(JedisPool.java:226)at cn.hncu.RedisPool.getJedis(Re

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

解决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.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect time out

redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed outat redis.clients.jedis.Connection.connect(Connection.java:154)at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:83)at redis.clients