The project used to do cache server, today after a restart after the following exception, after a variety of redis, positioning for the following reasons, record for forgetting.
The exception is as follows:
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)
The reason for the problem seems clear: ERR Client sent AUTH, but no password is set
It means that the Redis server did not set the password, but the client sent it a AUTH request, so that all the Jedis in the program to send authorization to remove the place, but found that the exception exists. It's almost silent.
Finally remembered in Tomcat also has the synchronization session to the Redis configuration, here also set the password, and even if is empty "" also not. Kill the whole password, reboot, 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= "a"/>
In addition: About Redis startup mode:
1, specify the configuration file $:./redis-server/usr/local/redis.conf
2, does not specify the configuration: $:./redis-server &
Do not specify configuration file startup with default configuration, no password
Redis the access password through the property Requirepass, but when the property is not set, the client sends a AUTH request to the server and the server returns an exception: ERR Client sent AUTH, but no password is set