问题一:

RedisConnectionException: Unable to init enough connections amount Only 23 from 32 were initialized.

连接数需要32个但是只有23个连上了,其余没连上告警

问题解决办法:

降低idlesize数

masterConnectionMinimumIdleSize

slaveConnectionMinimumIdleSize

subscriptionConnectionMinimumIdleSize

示例:

spring.redis.redisson.config.sentinelServersConfig.masterConnectionMinimumIdleSize = 2
spring.redis.redisson.config.sentinelServersConfig.slaveConnectionMinimumIdleSize = 2
spring.redis.redisson.config.sentinelServersConfig.subscriptionConnectionMinimumIdleSize = 1

问题二:

org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/data/redis/connection/RedisStreamCommands\n",

_msg=["Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/data/redis/connection/RedisStreamCommands"]||throwable=["org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/data/redis/connection/RedisStreamCommands\n","at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1055)\n","at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)\n","at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n","at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)\n","at javax.servlet.http.HttpServlet.service(HttpServlet.java:626)\n","at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n","at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)\n","at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\n","at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n","at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n","at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n","at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n","at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88)\n","at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)\n","at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n","at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n","at com.xiaojukeji.lathe.kettle.web.component.MdcInitFilterBean.doFilter(MdcInitFilterBean.java:28)\n","at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n","at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n","at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)\n","at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)\n","at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n","at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n","at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)\n","at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)\n","at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n","at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n","at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:94)\n","at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)\n","at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n","at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n","at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:114)\n","at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:104)\n","at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)\n","at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n","at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n","at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n","at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)\n","at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n","at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n","at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)\n","at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\n","at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)\n","at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\n","at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n","at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\n","at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\n","at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)\n","at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n","at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)\n","at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)\n","at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n","at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n","at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n","at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n","at java.lang.Thread.run(Thread.java:748)\nCaused by: java.lang.NoClassDefFoundError: org/springframework/data/redis/connection/RedisStreamCommands\n","at org.redisson.spring.data.connection.RedissonConnectionFactory.getConnection(RedissonConnectionFactory.java:113)\n","at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:134)\n","at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:97)\n","at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:84)\n","at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:212)\n","at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:185)\n","at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:172)\n","at com.xiaojukeji.lathe.kettle.process.AbstractEtlTaskProcessHandler.isTransitRunnable(AbstractEtlTaskProcessHandler.java:94)\n","at com.xiaojukeji.lathe.kettle.process.KtrScriptEtlTaskProcessHandler.processKtrTask(KtrScriptEtlTaskProcessHandler.java:66)\n","at com.xiaojukeji.lathe.kettle.service.admin.EtlRuleService.executeKettleKtrRuleTask(EtlRuleService.java:135)\n","at com.xiaojukeji.lathe.kettle.service.admin.EtlRuleService$$FastClassBySpringCGLIB$$6a2dd3bf.invoke(<generated>)\n","at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n","at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:752)\n","at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n","at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\n","at com.xiaojukeji.lathe.kettle.config.DefaultKettleServiceLogAspect.around(DefaultKettleServiceLogAspect.java:43)\n","at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n","at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n","at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n","at java.lang.reflect.Method.invoke(Method.java:498)\n","at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\n","at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\n","at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\n","at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n","at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\n","at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n","at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)\n","at com.xiaojukeji.lathe.kettle.service.admin.EtlRuleService$$EnhancerBySpringCGLIB$$2f587a26.executeKettleKtrRuleTask(<generated>)\n","at com.xiaojukeji.lathe.kettle.web.controller.EtlRuleController.runKettleRuleTask(EtlRuleController.java:62)\n","at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n","at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n","at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n","at java.lang.reflect.Method.invoke(Method.java:498)\n","at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)\n","at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)\n","at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)\n","at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)\n","at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)\n","at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n","at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)\n","... 55 more\nCaused by: java.lang.ClassNotFoundException: org.springframework.data.redis.connection.RedisStreamCommands\n","at java.net.URLClassLoader.findClass(URLClassLoader.java:382)\n","at java.lang.ClassLoader.loadClass(ClassLoader.java:418)\n","at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93)\n","at java.lang.ClassLoader.loadClass(ClassLoader.java:351)\n","... 95 more\n"]

检查redisson的版本与springboot和redis是否匹配

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐