redis集群,模块启动报错:PoolException: Returned connection io.lettuce.core.cluster.StatefulRedisClusterConnectionImpl@49bd0985 was either previously returned or does not belong to this connection provider
redis 3主3从的配置 启动正常,客户端命令使用正常,突然今天开发测试环境 有些模块报错了:
org.springframework.data.redis.connection.PoolException: Returned connection io.lettuce.core.cluster.StatefulRedisClusterConnectionImpl@49bd0985 was either previously returned or does not belong to this connection provider
有些模块重启正常,能拿到连接,但是之后的报错信息就是 一直ping失败:
2023-04-06 09:52:11.924|ERROR|10.42.12.188|redisson-timer-4-1|org.redisson.client.handler.PingConnectionHandler|run|Unable to send PING command over channel: [id: 0x59d6f772, L:/$ip:$port - R:/$redis1-ip:$redis1-port ]
2023/4/6 09:52:11 org.redisson.client.RedisTimeoutException: Command execution timeout for command: (PING), params: [], Redis client: [addr=redis://$redis1-ip:$redis1-port]
我就纳闷为什么总是这一台,所以想去重启,shutdown报错,让我去看日志
(error) ERR Errors trying to SHUTDOWN. Check logs.
结果去redis配置文件看日志目录 (logfile "/usr/local/redis/log/redis_6379_log.log" ),发现日志很大,df -h看了下磁盘,满了!! 所以 清除日志:cat /dev/null > redis_6379_log.log 后 ,恢复成功