HC小区管理系统安装,提示redis连接错误

错误信息:

2026-02-03 16:49:55.412 main ERROR com.java110.boot.BootApplicationStart - 系统启动失败

org.springframework.data.redis.RedisConnectionFailureException: java.net.SocketException: Connection reset; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Connection reset

at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:67)

at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:41)

at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:44)

at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:42)

at org.springframework.data.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:181)

at org.springframework.data.redis.connection.jedis.JedisConnection.close(JedisConnection.java:365)

at org.springframework.data.redis.core.RedisConnectionUtils.releaseConnection(RedisConnectionUtils.java:214)

at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:234)

at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:184)

at org.springframework.data.redis.core.RedisTemplate.keys(RedisTemplate.java:840)

at com.java110.core.cache.JedisClientTemplate.keys(JedisClientTemplate.java:148)

at com.java110.utils.cache.BaseCache.removeData(BaseCache.java:35)

at com.java110.dev.smo.impl.DevServiceCacheSMOImpl.doFlushAppRoute(DevServiceCacheSMOImpl.java:427)

at com.java110.dev.smo.impl.DevServiceCacheSMOImpl.startFlush(DevServiceCacheSMOImpl.java:101)

at com.java110.dev.smo.impl.CacheV1InnerServiceSMOImpl.startFlush(CacheV1InnerServiceSMOImpl.java:42)

at com.java110.dev.smo.impl.CacheV1InnerServiceSMOImplFastClassBySpringCGLIB965b3ac8.invoke(<generated>)

at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)

at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)

at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)

at com.java110.core.trace.Java110TraceLogAop.around(Java110TraceLogAop.java:49)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)

at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)

at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:174)

at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)

at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)

at com.java110.dev.smo.impl.CacheV1InnerServiceSMOImplEnhancerBySpringCGLIB9d2e020d.startFlush(<generated>)

at com.java110.boot.BootApplicationStart.flushMainCache(BootApplicationStart.java:238)

at com.java110.boot.BootApplicationStart.main(BootApplicationStart.java:211)

Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Connection reset

at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:202)

at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40)

at redis.clients.jedis.Protocol.process(Protocol.java:151)

at redis.clients.jedis.Protocol.read(Protocol.java:215)

at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)

at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:239)

at redis.clients.jedis.BinaryJedis.quit(BinaryJedis.java:253)

at org.springframework.data.redis.connection.jedis.JedisConnection.close(JedisConnection.java:355)

... 29 common frames omitted

Caused by: java.net.SocketException: Connection reset

at java.net.SocketInputStream.read(SocketInputStream.java:210)

at java.net.SocketInputStream.read(SocketInputStream.java:141)

at java.net.SocketInputStream.read(SocketInputStream.java:127)

at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:196)

... 36 common frames omitted

在排除:

redis启动正常后,修改yam配置文件中redis的配置

由于使用的是jedis作为连接,配置应该在jedis下

正确配置如下:

复制代码
  redis:
    database: 0
    host: 127.0.0.1
    port: 6379
    password: 123456
    timeout: 3000  # 一级参数,连接超时时间(毫秒)
    jedis: # Jedis客户端专属节点,嵌套连接池配置
      pool:
        max-active: 16  # 推荐值8-16,适配Redis 7.x/8.x
        max-wait: 3000   # 最大等待时间(毫秒)
        max-idle: 8      # 最大空闲连接数
        min-idle: 2      # 最小空闲连接数
相关推荐
倔强的石头_2 小时前
《Kingbase护城河》——猎捕慢查询:执行计划的微观解析与索引调优实战
数据库
SelectDB4 小时前
Apache Doris Python UDF:让 SQL 直接调用 Python 生态,支撑 Agent 时代复杂业务逻辑
大数据·数据库·python
jiayou641 天前
KingbaseES 表级与列级加密完全指南
数据库·后端
用户3074596982072 天前
Redis 延时队列详解
redis
GBASE2 天前
G术时刻 |GBase 8s数据库事务并发控制之封锁技术介绍(下)
数据库
烤代码的吐司君2 天前
Redis 数据结构 ZSet, BIT, HyperLogLog,Geo 空间数据
redis·后端
xiezhr3 天前
逛GitHub发现了一款免费的带AI功能的数据库管理工具
数据库·ai编程·dba
吃糖的小孩3 天前
给 QQ AI 机器人设计“可控记忆”:会话摘要、手动长期记忆与角色卡边界
数据库
笃行3504 天前
金仓数据库数据安全双防线:静态存储加密与传输加密实战
数据库
笃行3504 天前
金仓数据库物理备份实战:sys_rman 全流程演练与误覆盖抢救
数据库