java EOF报错 Unexpected EOF read on the socket-问答-阿里云开发者社区-阿里云

开发者社区> 佚名4918> 正文

java EOF报错 Unexpected EOF read on the socket

2021-10-19 08:43:22 130 1
[ DEBUG] [2020-12-29 19:33:43] org.springframework.boot.web.filter.OrderedRequestContextFilter -Bound request context to thread: org.apache.catalina.connector.RequestFacade@56a5a5ba

[ DEBUG] [2020-12-29 19:33:43] org.springframework.web.servlet.DispatcherServlet -DispatcherServlet with name 'dispatcherServlet' processing POST request for [/uploadBigFile]

[ DEBUG] [2020-12-29 19:33:43] org.springframework.web.servlet.DispatcherServlet -Could not complete request

org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. java.io.EOFException: Unexpected EOF read on the socket

    at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.parseRequest(StandardMultipartHttpServletRequest.java:116)

    at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.<init>(StandardMultipartHttpServletRequest.java:90)

    at org.springframework.web.multipart.support.StandardServletMultipartResolver.resolveMultipart(StandardServletMultipartResolver.java:81)

    at org.springframework.web.servlet.DispatcherServlet.checkMultipart(DispatcherServlet.java:1104)

    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:936)

    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)

    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)

    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)

    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

    at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)

    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:110)

    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)

    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)

    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)

    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)

    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

    at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106)

    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)

    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)

    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)

    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)

    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

    at java.lang.Thread.run(Thread.java:748)

Caused by: java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. java.io.EOFException: Unexpected EOF read on the socket

    at org.apache.catalina.connector.Request.parseParts(Request.java:2950)

    at org.apache.catalina.connector.Request.parseParameters(Request.java:3242)

    at org.apache.catalina.connector.Request.getParameter(Request.java:1136)

    at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:381)

    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:84)

    ... 27 common frames omitted

Caused by: org.apache.tomcat.util.http.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. java.io.EOFException: Unexpected EOF read on the socket

    at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:297)

    at org.apache.catalina.connector.Request.parseParts(Request.java:2902)

    ... 31 common frames omitted

Caused by: org.apache.catalina.connector.ClientAbortException: java.io.EOFException: Unexpected EOF read on the socket

    at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:348)

    at org.apache.catalina.connector.InputBuffer.checkByteBufferEof(InputBuffer.java:663)

    at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:370)

    at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:183)

    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:977)

    at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:881)

    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:98)

    at org.apache.tomcat.util.http.fileupload.util.Streams.copy(Streams.java:68)

    at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:293)

    ... 32 common frames omitted

Caused by: java.io.EOFException: Unexpected EOF read on the socket

    at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:734)

    at org.apache.coyote.http11.Http11InputBuffer.access$300(Http11InputBuffer.java:40)

    at org.apache.coyote.http11.Http11InputBuffer$SocketInputBuffer.doRead(Http11InputBuffer.java:1084)

    at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:140)

    at org.apache.coyote.http11.Http11InputBuffer.doRead(Http11InputBuffer.java:263)

    at org.apache.coyote.Request.doRead(Request.java:581)

    at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:344)

    ... 45 common frames omitted

[ DEBUG] [2020-12-29 19:33:43] org.springframework.boot.web.filter.OrderedRequestContextFilter -Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@56a5a5ba

[ ERROR] [2020-12-29 19:33:43] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] -Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. java.io.EOFException: Unexpected EOF read on the socket] with root cause

java.io.EOFException: Unexpected EOF read on the socket

    at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:734)

    at org.apache.coyote.http11.Http11InputBuffer.access$300(Http11InputBuffer.java:40)

    at org.apache.coyote.http11.Http11InputBuffer$SocketInputBuffer.doRead(Http11InputBuffer.java:1084)

    at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:140)

    at org.apache.coyote.http11.Http11InputBuffer.doRead(Http11InputBuffer.java:263)

    at org.apache.coyote.Request.doRead(Request.java:581)

    at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:344)

    at org.apache.catalina.connector.InputBuffer.checkByteBufferEof(InputBuffer.java:663)

    at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:370)

    at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:183)

    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:977)

    at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:881)

    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:98)

    at org.apache.tomcat.util.http.fileupload.util.Streams.copy(Streams.java:68)

    at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:293)

    at org.apache.catalina.connector.Request.parseParts(Request.java:2902)

    at org.apache.catalina.connector.Request.parseParameters(Request.java:3242)

    at org.apache.catalina.connector.Request.getParameter(Request.java:1136)

    at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:381)

    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:84)

    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)

    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

    at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106)

    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)

    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)

    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)

    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)

    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

    at java.lang.Thread.run(Thread.java:748)

    
取消 提交回答
全部回答(1)
  • 无敌小将
    2021-10-19 09:10:30

    您好,看起来问题原因,上传文件还没到末尾就被客户端中断,是超出tomcat文件连接时间了,就被跳转。

    可以尝试咋在application.yml配置文件里加上一个tomcat连接时长

    server:
      connection-timeout: 18000000
    
    1 0
相关问答

40

回答

[@徐雷frank][¥20]什么是JAVA的平台无关性

大河人家 2018-10-29 23:55:20 144291浏览量 回答数 40

162

回答

惊喜翻倍:免费ECS+免费环境配置~!(ECS免费体验6个月活动3月31日结束)

豆妹 2014-10-29 17:52:21 223032浏览量 回答数 162

8

回答

OceanBase 使用动画(持续更新)

mq4096 2019-02-20 17:16:36 333892浏览量 回答数 8

13

回答

[@饭娱咖啡][¥20]我想知道 Java 关于引用那一块的知识

心意乱 2018-10-31 18:44:12 142144浏览量 回答数 13

110

回答

OSS存储服务-客户端工具

newegg11 2012-05-17 15:37:18 292311浏览量 回答数 110

22

回答

爬虫数据管理【问答合集】

我是管理员 2018-08-10 16:37:41 146804浏览量 回答数 22

18

回答

阿里云开放端口权限

xcxx 2016-07-20 15:03:33 643184浏览量 回答数 18

31

回答

[@倚贤][¥20]刚学完html/css/js的新手学习servlet、jsp需要注意哪些问题?

弗洛伊德6 2018-10-27 21:52:43 145640浏览量 回答数 31

10

回答

[@墨玖tao][¥20]为什么流式处理框架都是 java 写成的,JVM 是不是在流和批存在着特殊优势。还有分布式资源调度,感觉Mesos 的成长速度跟不上 Yarn。这是为什么?

管理贝贝 2018-10-23 13:18:03 136136浏览量 回答数 10

249

回答

阿里云LNAMP(Linux + Nginx + Apache + MySQL + PHP)环境一键安装脚本

云代维 2014-02-14 15:26:06 302625浏览量 回答数 249
+关注
0
文章
85
问答
推荐问答
相关电子书
更多
文娱运维技术
立即下载
《SaaS模式云原生数据仓库应用场景实践》
立即下载
《看见新力量:二》电子书
立即下载