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(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)

问题原因看起来很清楚,就是这句: ERR Client sent AUTH, but no password is set

它的意思就是redis服务器没有设置密码,但客户端向其发送了AUTH请求,于是把程序中所有jedis发送授权的地方都去掉,可是发现异常还是存在!!简直无语了

最后想起在tomcat中还有同步session到redis的配置,这里还设置了password,而且即使是空“”也不行。把整个password干掉,重启,ok啦!

<Valve className="com.radiadesign.catalina.session.RedisSessionHandlerValve" />
      <Manager className="com.radiadesign.catalina.session.RedisSessionManager"
               host="172.11.22.33" password="" port="6379" database="5" maxInactiveInterval="60" />

另外:关于redis的启动方式:

1、指定配置文件 $: ./redis-server /usr/local/redis.conf

2、不指定配置:$: ./redis-server &

不指定配置文件启动时采用默认配置,无密码

redis通过属性requirepass 设置访问密码,但没有设置该属性时,客户端向服务端发送AUTH请求,服务端就好返回异常:ERR Client sent AUTH, but no password is set

时间: 2024-11-10 14:25:28

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

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.clients.jedis.exceptions.JedisDataException: ERR unknown command &#39;PSETEX&#39;

在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之后,报(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.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.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

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