oddfar / campus-imaotai

i茅台app自动预约,每日自动预约,支持docker一键部署(本项目不提供成品,使用的是已淘汰的算法)
https://oddfar.github.io/campus-doc/campus-imaotai
Apache License 2.0
4.11k stars 1.35k forks source link

[bug]: 发送短信异常错误,烦请诊断。 #340

Closed sdlyzhuangd closed 6 months ago

sdlyzhuangd commented 7 months ago

请确保您已阅读以上注意事项,并勾选下方的确认框。

campus框架版本

最新

本项目 campus-imaotai 版本

1.0.12

运行环境

Ubuntu

运行架构

AMD64

问题描述

ubuntu第一安装了,什么问题也没出,成功了。 找了服务器安装,安装也没有错误,登录正常,添加i茅台用户,发送短信错误。 ConnectException: Connection refused (Connection refused) 不知道什么问题。

另外有朋友说接口异常等错误,也遇到过几次,up后,稍等一会就可以了。第一次安装后重启一下。可能是刚刚启动起来,四个容器之间有链接延时猜测吧

期望的结果是什么?

发送短信,或给与指导

简单的复现代码/链接(可选)

得到

日志记录(可选)

得到

补充说明(可选)

No response

sdlyzhuangd commented 7 months ago

补充日志:发短信时,跳出的错误 campus-server | 2024-04-02 15:56:45 |ERROR |GlobalExceptionHandler.java:64 |请求地址'/imt/user/sendCode',发生未知异常. campus-server | cn.hutool.core.io.IORuntimeException: ConnectException: Connection refused (Connection refused) campus-server | at cn.hutool.http.HttpRequest.send(HttpRequest.java:1350) campus-server | at cn.hutool.http.HttpRequest.doExecute(HttpRequest.java:1188) campus-server | at cn.hutool.http.HttpRequest.execute(HttpRequest.java:1051) campus-server | at cn.hutool.http.HttpRequest.execute(HttpRequest.java:1027) campus-server | at cn.hutool.http.HttpUtil.get(HttpUtil.java:145) campus-server | at cn.hutool.http.HttpUtil.get(HttpUtil.java:133) campus-server | at com.oddfar.campus.business.service.impl.IMTServiceImpl.getMTVersion(IMTServiceImpl.java:87) campus-server | at com.oddfar.campus.business.service.impl.IMTServiceImpl.sendCode(IMTServiceImpl.java:119) campus-server | at com.oddfar.campus.business.service.impl.IMTServiceImpl$$FastClassBySpringCGLIB$$fb9c8022.invoke() campus-server | at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) campus-server | at org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386) campus-server | at org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85) campus-server | at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704) campus-server | at com.oddfar.campus.business.service.impl.IMTServiceImpl$$EnhancerBySpringCGLIB$$ed7afc7f.sendCode() campus-server | at com.oddfar.campus.business.controller.IUserController.sendCode(IUserController.java:54) campus-server | at com.oddfar.campus.business.controller.IUserController$$FastClassBySpringCGLIB$$49068076.invoke() campus-server | at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) campus-server | at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) campus-server | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) campus-server | at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) campus-server | at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64) campus-server | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) campus-server | at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) campus-server | at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:57) campus-server | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) campus-server | at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) campus-server | at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:61) campus-server | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) campus-server | at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) campus-server | at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) campus-server | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) campus-server | at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) campus-server | at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) campus-server | at com.oddfar.campus.business.controller.IUserController$$EnhancerBySpringCGLIB$$6a33576d.sendCode() campus-server | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) campus-server | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) campus-server | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) campus-server | at java.lang.reflect.Method.invoke(Method.java:498) campus-server | at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) campus-server | at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) campus-server | at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) campus-server | at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) campus-server | at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) campus-server | at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) campus-server | at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072) campus-server | at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965) campus-server | at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) campus-server | at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) campus-server | at javax.servlet.http.HttpServlet.service(HttpServlet.java:645) campus-server | at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) campus-server | at javax.servlet.http.HttpServlet.service(HttpServlet.java:750) campus-server | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209) campus-server | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) campus-server | at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) campus-server | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) campus-server | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) campus-server | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111) campus-server | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) campus-server | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) campus-server | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111) campus-server | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) campus-server | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) campus-server | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327) campus-server | at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115) campus-server | at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81) campus-server | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) campus-server | at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:121) campus-server | at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115) campus-server | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) campus-server | at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126) campus-server | at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81) campus-server | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) campus-server | at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:105) campus-server | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) campus-server | at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149) campus-server | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) campus-server | at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) campus-server | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) campus-server | at com.oddfar.campus.framework.security.filter.JwtAuthenticationTokenFilter.doFilterInternal(JwtAuthenticationTokenFilter.java:45) campus-server | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) campus-server | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) campus-server | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111) campus-server | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) campus-server | at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103) campus-server | at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89) campus-server | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) campus-server | at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91) campus-server | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) campus-server | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) campus-server | at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) campus-server | at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) campus-server | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) campus-server | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) campus-server | at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110) campus-server | at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80) campus-server | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) campus-server | at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55) campus-server | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) campus-server | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) campus-server | at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211) campus-server | at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183) campus-server | at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) campus-server | at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) campus-server | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) campus-server | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) campus-server | at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) campus-server | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) campus-server | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) campus-server | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) campus-server | at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) campus-server | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) campus-server | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) campus-server | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) campus-server | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) campus-server | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) campus-server | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) campus-server | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) campus-server | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) campus-server | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) campus-server | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) campus-server | at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) campus-server | at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) campus-server | at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926) campus-server | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791) campus-server | at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) campus-server | at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) campus-server | at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) campus-server | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) campus-server | at java.lang.Thread.run(Thread.java:750) campus-server | Caused by: java.net.ConnectException: Connection refused (Connection refused) campus-server | at java.net.PlainSocketImpl.socketConnect(Native Method) campus-server | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) campus-server | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:204) campus-server | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) campus-server | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) campus-server | at java.net.Socket.connect(Socket.java:607) campus-server | at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:293) campus-server | at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173) campus-server | at sun.net.NetworkClient.doConnect(NetworkClient.java:180) campus-server | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) campus-server | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) campus-server | at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:264) campus-server | at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) campus-server | at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:203) campus-server | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) campus-server | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) campus-server | at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:189) campus-server | at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:167) campus-server | at cn.hutool.http.HttpConnection.connect(HttpConnection.java:384) campus-server | at cn.hutool.http.HttpRequest.send(HttpRequest.java:1345) campus-server | ... 128 common frames omitted

oddfar commented 7 months ago

请看此pr:https://github.com/oddfar/campus-imaotai/pull/284 ,请手动打包最新代码,