dromara / Jpom

🚀简而轻的低侵入式在线构建、自动部署、日常运维、项目监控软件
https://jpom.dromara.org/
Other
1.49k stars 308 forks source link

发布项目时,部署服务器向目标服务器传 jar 文件中大概率报错 #90

Closed directionyu closed 2 months ago

directionyu commented 3 months ago

部署服务器配置:ubuntu 4 核8G 带宽 5M, 目标服务器配置:ubuntu 2核 16 G 10M 带宽

screenshot-20240716-191438

以下是目标服务器 jpom-agent 日志,

2024-07-16 18:15:32.733 [main] INFO o.d.j.JpomAgentApplication [StartupInfoLogger.java:55] - Starting JpomAgentApplication v2.11.8 using Java 1.8.0_312 on localhost with PID 6484 (/usr/local/jpom-agent/lib/Agent-2.11.8.jar started by root in /usr/local/jpom-agent/bin) 2024-07-16 18:15:32.734 [main] INFO o.d.j.JpomAgentApplication [SpringApplication.java:632] - No active profile set, falling back to 1 default profile: "default" 2024-07-16 18:15:34.018 [main] INFO o.s.b.w.e.t.TomcatWebServer [TomcatWebServer.java:108] - Tomcat initialized with port(s): 2123 (http) 2024-07-16 18:15:34.027 [main] INFO o.a.c.h.Http11NioProtocol [DirectJDKLog.java:173] - Initializing ProtocolHandler ["http-nio-2123"] 2024-07-16 18:15:34.028 [main] INFO o.a.c.c.StandardService [DirectJDKLog.java:173] - Starting service [Tomcat] 2024-07-16 18:15:34.029 [main] INFO o.a.c.c.StandardEngine [DirectJDKLog.java:173] - Starting Servlet engine: [Apache Tomcat/9.0.86] 2024-07-16 18:15:34.169 [main] INFO o.a.c.c.C.[.[.[/] [DirectJDKLog.java:173] - Initializing Spring embedded WebApplicationContext 2024-07-16 18:15:34.169 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext [ServletWebServerApplicationContext.java:292] - Root WebApplicationContext: initialization completed in 1365 ms 2024-07-16 18:15:34.548 [main] INFO o.d.j.c.JpomApplicationEvent [JpomApplicationEvent.java:117] - Jpom[2.11.8] Current data path:/usr/local/jpom-agent External configuration file path:file:/usr/local/jpom-agent/bin/../conf/application.yml 2024-07-16 18:15:34.726 [main] INFO o.d.j.c.JpomApplicationEvent [JpomApplicationEvent.java:132] - The local installation ID is: fec0f66315d6416d9181119bc04dee39 2024-07-16 18:15:34.774 [main] INFO o.d.j.c.AgentAuthorize [AgentAuthorize.java:94] - Already authorized account:jpomAgent password:3oxsr4gwqs Authorization information storage location:/usr/local/jpom-agent/data/agent_authorize.json 2024-07-16 18:15:35.036 [main] INFO o.d.j.c.JpomApplicationEvent [JpomApplicationEvent.java:249] - Agent Successfully started,Please go to the server to configure and use,Current node address => http://172.17.0.1:2123 【The current address is for reference only】 2024-07-16 18:15:35.590 [main] INFO o.a.c.h.Http11NioProtocol [DirectJDKLog.java:173] - Starting ProtocolHandler ["http-nio-2123"] 2024-07-16 18:15:35.606 [main] INFO o.s.b.w.e.t.TomcatWebServer [TomcatWebServer.java:220] - Tomcat started on port(s): 2123 (http) with context path '' 2024-07-16 18:15:35.616 [main] INFO o.d.j.JpomAgentApplication [StartupInfoLogger.java:61] - Started JpomAgentApplication in 3.689 seconds (JVM running for 4.114) 2024-07-16 18:15:35.619 [main] INFO o.d.j.JpomAgentApplication [JpomAgentApplication.java:54] - Time-consuming to start this time:3秒835毫秒 2024-07-16 18:15:55.669 [http-nio-2123-exec-1] INFO o.a.c.c.C.[.[.[/] [DirectJDKLog.java:173] - Initializing Spring DispatcherServlet 'dispatcherServlet' 2024-07-16 18:15:55.669 [http-nio-2123-exec-1] INFO o.s.w.s.DispatcherServlet [FrameworkServlet.java:525] - Initializing Servlet 'dispatcherServlet' 2024-07-16 18:15:55.670 [http-nio-2123-exec-1] INFO o.s.w.s.DispatcherServlet [FrameworkServlet.java:547] - Completed initialization in 1 ms 2024-07-16 18:19:40.309 [http-nio-2123-exec-7] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] [DirectJDKLog.java:175] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request; nested exception is org.apache.tomcat.util.http.fileupload.impl.IOFileUploadException: Processing of multipart/form-data request failed. java.net.SocketTimeoutException at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.handleParseFailure(StandardMultipartHttpServletRequest.java:127) at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.parseRequest(StandardMultipartHttpServletRequest.java:115) at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.(StandardMultipartHttpServletRequest.java:88) at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.(StandardMultipartHttpServletRequest.java:72) at org.dromara.jpom.common.transport.MultipartRequestWrapper.(MultipartRequestWrapper.java:37) at org.dromara.jpom.common.interceptor.DecryptionFilter.doFilter(DecryptionFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at org.dromara.jpom.common.ReplaceStreamFilter.doFilter(ReplaceStreamFilter.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1794) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.tomcat.util.http.fileupload.impl.IOFileUploadException: Processing of multipart/form-data request failed. java.net.SocketTimeoutException at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:321) at org.apache.catalina.connector.Request.parseParts(Request.java:2834) at org.apache.catalina.connector.Request.getParts(Request.java:2735) at org.apache.catalina.connector.RequestFacade.getParts(RequestFacade.java:795) at javax.servlet.http.HttpServletRequestWrapper.getParts(HttpServletRequestWrapper.java:326) at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.parseRequest(StandardMultipartHttpServletRequest.java:95) ... 37 common frames omitted Caused by: org.apache.catalina.connector.ClientAbortException: java.net.SocketTimeoutException at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:322) at org.apache.catalina.connector.InputBuffer.checkByteBufferEof(InputBuffer.java:612) at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:355) at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:132) at java.io.FilterInputStream.read(FilterInputStream.java:133) at org.apache.tomcat.util.http.fileupload.util.LimitedInputStream.read(LimitedInputStream.java:132) at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:954) at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:858) at java.io.FilterInputStream.read(FilterInputStream.java:133) at org.apache.tomcat.util.http.fileupload.util.LimitedInputStream.read(LimitedInputStream.java:132) at java.io.FilterInputStream.read(FilterInputStream.java:107) at org.apache.tomcat.util.http.fileupload.util.Streams.copy(Streams.java:97) at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:317) ... 42 common frames omitted Suppressed: org.apache.catalina.connector.ClientAbortException: java.net.SocketTimeoutException at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:322) at org.apache.catalina.connector.InputBuffer.checkByteBufferEof(InputBuffer.java:612) at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:355) at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:132) at java.io.FilterInputStream.read(FilterInputStream.java:133) at org.apache.tomcat.util.http.fileupload.util.LimitedInputStream.read(LimitedInputStream.java:132) at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:954) at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.close(MultipartStream.java:898) at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.close(MultipartStream.java:877) at java.io.FilterInputStream.close(FilterInputStream.java:181) at org.apache.tomcat.util.http.fileupload.util.LimitedInputStream.close(LimitedInputStream.java:163) at org.apache.tomcat.util.http.fileupload.util.Streams.copy(Streams.java:93) ... 43 common frames omitted Caused by: java.net.SocketTimeoutException: null at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1317) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1234) at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:785) at org.apache.coyote.http11.Http11InputBuffer.access$400(Http11InputBuffer.java:41) at org.apache.coyote.http11.Http11InputBuffer$SocketInputBuffer.doRead(Http11InputBuffer.java:1191) at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:97) at org.apache.coyote.http11.Http11InputBuffer.doRead(Http11InputBuffer.java:244) at org.apache.coyote.Request.doRead(Request.java:621) at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:313) ... 54 common frames omitted Caused by: java.net.SocketTimeoutException: null at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1317) at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1234) at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:785) at org.apache.coyote.http11.Http11InputBuffer.access$400(Http11InputBuffer.java:41) at org.apache.coyote.http11.Http11InputBuffer$SocketInputBuffer.doRead(Http11InputBuffer.java:1191) at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:97) at org.apache.coyote.http11.Http11InputBuffer.doRead(Http11InputBuffer.java:244) at org.apache.coyote.Request.doRead(Request.java:621) at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:313) ... 54 common frames omitted 2024-07-16 18:19:40.319 [http-nio-2123-exec-7] ERROR o.d.j.c.BaseMyErrorController [BaseMyErrorController.java:63] - 发生异常:500 /manage/file/upload-sharding/

bwcx-jzy commented 3 months ago

通过日志看出是网络超时相关的问题,需要自行排查网络问题

directionyu commented 3 months ago

通过日志看出是网络超时相关的问题,需要自行排查网络问题

服务器都在同一地区,且同一可用区,从哪排查呢?

bwcx-jzy commented 3 months ago

网络最简单的使用内网 ip,以及网速,服务器负载等。这种基本是因环境而异

directionyu commented 2 months ago

之前节点绑定的公网 ip,网络抖动导致中断,绑定内网 ip 目前没问题,速度很快