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.CacheV1InnerServiceSMOImpl$$FastClassBySpringCGLIB$$965b3ac8.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.CacheV1InnerServiceSMOImpl$$EnhancerBySpringCGLIB$$9d2e020d.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 小时前
Redis 从入门到精通(十三):哨兵与集群
数据库·redis·缓存
dyyshb2 小时前
PostgreSQL 终极兜底方案
数据库·postgresql
他们叫我技术总监3 小时前
零依赖!FineReport11 快速对接 TDengine 数据库:从驱动部署到报表实现
大数据·数据库·ai·tdengine
TDengine (老段)3 小时前
TDengine IDMP 可视化 —— 定时报告
大数据·数据库·人工智能·物联网·时序数据库·tdengine·涛思数据
曹牧3 小时前
Oracle:
数据库·oracle
kobel283 小时前
Linux x86快速部署openGauss3.1.1指南
数据库
一个有温度的技术博主3 小时前
Lua语法详解:从变量声明到循环遍历的避坑指南
redis·缓存·lua
草莓熊Lotso3 小时前
【Linux 线程进阶】进程 vs 线程资源划分 + 线程控制全详解
java·linux·运维·服务器·数据库·c++·mysql
supericeice3 小时前
创邻科技 Galaxybase Graph Intelligence 图智能平台:一站式可视化图数据存储、图计算与图挖掘平台
数据库·科技
heimeiyingwang3 小时前
【架构实战】NewSQL数据库对比(TiDB/CockroachDB)
数据库·架构·tidb