NutzCN Logo
问答 ButzBook 我想不启用redis运行,关闭了后运行出现如下错误
发布于 1234天前 作者 shuxinyun 1137 次浏览 复制 上一个帖子 下一个帖子
标签:

配置

redis.enable=false
redis.host=localhost
redis.port=6379
redis.timeout=2000
#redis.password=wqh
redis.database=0

运行错误:

redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
	at redis.clients.util.Pool.getResource(Pool.java:53) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.JedisPool.getResource(JedisPool.java:226) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.JedisPool.getResource(JedisPool.java:16) ~[jedis-2.9.0.jar:?]
	at org.nutz.integration.jedis.JedisAgent.jedis(JedisAgent.java:49) ~[nutz-integration-jedis-1.r.67-SNAPSHOT.jar:?]
	at org.nutz.plugins.cache.impl.lcache.LCacheManager.jedis(LCacheManager.java:52) ~[nutz-plugins-cache-1.r.67-SNAPSHOT.jar:?]
	at org.nutz.plugins.cache.impl.lcache.LCacheManager.run(LCacheManager.java:79) [nutz-plugins-cache-1.r.67-SNAPSHOT.jar:?]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused: connect
	at redis.clients.jedis.Connection.connect(Connection.java:207) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:93) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1767) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:106) ~[jedis-2.9.0.jar:?]
	at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868) ~[commons-pool2-2.4.2.jar:2.4.2]
	at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435) ~[commons-pool2-2.4.2.jar:2.4.2]
	at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363) ~[commons-pool2-2.4.2.jar:2.4.2]
	at redis.clients.util.Pool.getResource(Pool.java:49) ~[jedis-2.9.0.jar:?]
	... 6 more
Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[?:1.8.0_161]
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) ~[?:1.8.0_161]
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_161]
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_161]
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_161]
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[?:1.8.0_161]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_161]
	at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_161]
	at redis.clients.jedis.Connection.connect(Connection.java:184) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:93) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1767) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:106) ~[jedis-2.9.0.jar:?]
	at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868) ~[commons-pool2-2.4.2.jar:2.4.2]
	at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435) ~[commons-pool2-2.4.2.jar:2.4.2]
	at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363) ~[commons-pool2-2.4.2.jar:2.4.2]
	at redis.clients.util.Pool.getResource(Pool.java:49) ~[jedis-2.9.0.jar:?]
	... 6 more
11:08:06.568 DEBUG (LCacheManager.java:78) run - psubscribe LCache:*
11:08:07.583 DEBUG (LCacheManager.java:85) run - psubscribe fail, retry after 3 seconds
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

6 回复

我需要关闭哪儿呀?就用了admin基础模块

说的是nutzcn的源码吗?

只用了,core,admin,webapp三个模块

那你得把redis的依赖去掉, 删掉IdGenerator及实现类, 修改bean类的@Prev, 改回数据库自增

添加回复
请先登陆
回到顶部