1、问题

LettuceConnectionFactory was destroyed and cannot be used anymore

报错日志:应该是写了rfid 硬件扫描,但是电脑未连接RFID硬件扫描设备

java.lang.IllegalStateException: LettuceConnectionFactory was destroyed and cannot be used anymoreat org.springframework.util.Assert.state(Assert.java:76)at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.assertInitialized(LettuceConnectionFactory.java:1263)at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:414)at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:209)at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:189)at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:96)at org.springframework.data.redis.core.DefaultListOperations.rightPop(DefaultListOperations.java:239)at com.ruoyi.station.modbus.service.impl.RfidConsumer.lambda$processRfidScan$0(RfidConsumer.java:69)at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)at java.lang.Thread.run(Unknown Source)

2、场景

新电脑启动项目/某天项目重启。

3、原因

未排查原因

4、解决方案

清一下Idea缓存重启项目解决

再次出问题重启项目无法解决,重启电脑解决。

似乎是Redis 连接方案的问题。

分类: 解决方案