连接redis报此错误:ERR Client sent AUTH, but no password is set

rchm8519 阿里健康信息技术有限公司 服务器端工程师  2015-09-10 10:53:24
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)
配置如下:
<bean id="pool" class="redis.clients.jedis.JedisPool">
<constructor-arg index="0" ref="redisPoolConfig"/>
<constructor-arg index="1" type="java.lang.String" value="${redis.server.url}" />
<constructor-arg index="2" type="int" value="${redis.server.port}" />
</bean>

<bean id="redisPoolConfig" class="redis.clients.jedis.JedisPoolConfig"
p:maxTotal="20"
p:maxIdle="10"
p:maxWaitMillis="2000"
p:testOnBorrow="true"
p:testOnReturn="true" />
因为是应用刚启动就报此错误,redis服务器重启也不行,估计应不是数量的问题,还请高人指教!紧急!
...全文
40326 点赞 收藏 7
写回复
7 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
柳橙青芒 2017-07-04
为什么我按您的设置之后就出现了错误呢?报错是:Invalid argument during startup: Failed to open the .conf file: redis.conf CWD=E:\Redis\redis64-3.0.501您能帮我看一下吗?
回复
陌尘笑 2016-12-20
redis 127.0.0.1:6379> CONFIG SET requirepass "123456"
OK
redis 127.0.0.1:6379> AUTH 123456
Ok

设置下这个配置密码就好了
回复
天骄老祖 2016-09-01
请问怎么实现加密码呢?去掉密码毕竟不是最终的解决之道
回复
你这是去掉了密码,那加上密码怎么设置这个属性呢~
回复
兔子托尼啊 2015-09-10
密码没设置吧;。 那个redis 默认是没有密码,你是不是给redis 设值了密码。
回复
rchm8519 2015-09-10
引用 1 楼 rui888 的回复:
密码没设置吧;。 那个redis 默认是没有密码,你是不是给redis 设值了密码。
谢谢,问题解决了,确实是这样! 具体见:http://blog.csdn.net/rchm8519/article/details/48347797
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2015-09-10 10:53
社区公告
暂无公告