After the project starts, the console reports the following error:
Org.springframework.data.redis.RedisConnectionFailureException:Cannot get Jedis connection; Nested exception is redis.clients.jedis.exceptions.JedisConnectionException:Could does get a resource from the pool
At Org.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector ( JEDISCONNECTIONFACTORY.JAVA:97)
At Org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection ( jedisconnectionfactory.java:143)
At Org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection ( JEDISCONNECTIONFACTORY.JAVA:41)
At Org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection (redisconnectionutils.java:128)
At Org.springframework.data.redis.core.RedisConnectionUtils.getConnection (redisconnectionutils.java:91)
At Org.springframework.data.redis.core.RedisConnectionUtils.getConnection (redisconnectionutils.java:78)
At Org.springframework.data.redis.core.RedisTemplate.execute (redistemplate.java:177)
At Org.springframework.data.redis.core.RedisTemplate.execute (redistemplate.java:152)
At Org.springframework.data.redis.core.AbstractOperations.execute (abstractoperations.java:84)
At Org.springframework.data.redis.core.DefaultValueOperations.get (defaultvalueoperations.java:43)
At Com.xinghe.conf.service.impl.MiddlewareProviderImpl.get (middlewareproviderimpl.java:35)
At Com.xinghe.interaction.thread.MiddlewareTask.run (middlewaretask.java:33)
At Java.util.concurrent.executors$runnableadapter.call (Unknown Source)
At Java.util.concurrent.FutureTask.runAndReset (Unknown Source)
At java.util.concurrent.scheduledthreadpoolexecutor$scheduledfuturetask.access$301 (Unknown Source)
At Java.util.concurrent.scheduledthreadpoolexecutor$scheduledfuturetask.run (Unknown Source)
At Java.util.concurrent.ThreadPoolExecutor.runWorker (Unknown Source)
At Java.util.concurrent.threadpoolexecutor$worker.run (Unknown Source)
At Java.lang.Thread.run (Unknown Source)
caused by:redis.clients.jedis.exceptions.JedisConnectionException:Could not get a resource from the pool
At Redis.clients.util.Pool.getResource (pool.java:42)
At Org.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector ( JEDISCONNECTIONFACTORY.JAVA:90)
... More
caused By:redis.clients.jedis.exceptions.JedisConnectionException:java.net.ConnectException:Connection refused: Connect
At Redis.clients.jedis.Connection.connect (connection.java:142)
At Redis.clients.jedis.BinaryClient.connect (binaryclient.java:75)
At Redis.clients.jedis.BinaryJedis.connect (binaryjedis.java:1724)
At Redis.clients.jedis.JedisFactory.makeObject (jedisfactory.java:65)
At Org.apache.commons.pool2.impl.GenericObjectPool.create (genericobjectpool.java:836)
At Org.apache.commons.pool2.impl.GenericObjectPool.borrowObject (genericobjectpool.java:434)
At Org.apache.commons.pool2.impl.GenericObjectPool.borrowObject (genericobjectpool.java:361)
At Redis.clients.util.Pool.getResource (pool.java:40)
... More
caused By:java.net.ConnectException:Connection refused:connect
At Java.net.DualStackPlainSocketImpl.waitForConnect (Native Method)
At Java.net.DualStackPlainSocketImpl.socketConnect (Unknown Source)
At Java.net.AbstractPlainSocketImpl.doConnect (Unknown Source)
At Java.net.AbstractPlainSocketImpl.connectToAddress (Unknown Source)
At Java.net.AbstractPlainSocketImpl.connect (Unknown Source)
At Java.net.PlainSocketImpl.connect (Unknown Source)
At Java.net.SocksSocketImpl.connect (Unknown Source)
At Java.net.Socket.connect (Unknown Source)
At Redis.clients.jedis.Connection.connect (connection.java:137)
... More
This error is caused by the reason that the connection is not on Redis.
Check to see if Redis is started or inaccessible due to firewalls and other reasons.
Org.springframework.data.redis.RedisConnectionFailureException