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      # 最小空闲连接数
相关推荐
栗子~~9 小时前
JAVA - 二层缓存设计(本地缓冲+redis缓冲+广播所有本地缓冲失效) demo
java·redis·缓存
隔窗听雨眠9 小时前
多活部署、CDN加速与边缘缓存全链路优化实战
缓存
星星也在雾里9 小时前
PgBouncer 解决 PostgreSQL 连接数超限 + 可视化监控
数据库·postgresql
未若君雅裁10 小时前
MyBatis 一级缓存、二级缓存与清理机制
java·缓存·mybatis
雨辰AI11 小时前
SpringBoot3 + 人大金仓读写分离 + 分库分表 + 集群高可用 全栈实战
java·数据库·mysql·政务
长城202411 小时前
关于MySql的ONLY_FULL_GROUP_BY问题
数据库·mysql·聚合列
常常有12 小时前
MySQL 底层执行原理:输入SQL语句到两阶段提交
数据库·sql·mysql
Mr. zhihao12 小时前
深入解析redis基本数据结构
数据结构·数据库·redis
m0_7488394912 小时前
利用天正暖通CAD快速掌握风管数量统计的方法
数据库
随身数智备忘录12 小时前
什么是设备管理体系?设备管理体系包含哪些核心模块?
网络·数据库·人工智能