org.apache.catalina.connector.ClientAbortException: java.io.EOFException: Unexpected EOF read on the
程序员文章站
2022-04-19 18:23:11
...
今天遇到个这样的问题,我的项目是前后端分离的,在前端是基于VUE-ADMIN脚手架做的,后端是一个标准的springboot工程,然后自己封装了一次http单独使用,并且在vue.config.js中配置了代理,但是一直请求不到后台服务器,服务器一直报异常信息如下
2021-01-14 11:16:44.143 WARN 22252 --- [nio-8080-exec-1] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotReadableException: I/O error while reading input message; nested exception is org.apache.catalina.connector.ClientAbortException: java.io.EOFException: Unexpected EOF read on the socket]
2021-01-14 11:18:43.592 WARN 22252 --- [nio-8080-exec-2] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotReadableException: I/O error while reading input message; nested exception is org.apache.catalina.connector.ClientAbortException: java.io.EOFException: Unexpected EOF read on the socket]
2021-01-14 11:18:52.449 WARN 22252 --- [nio-8080-exec-3] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotReadableException: I/O error while reading input message; nested exception is org.apache.catalina.connector.ClientAbortException: java.io.EOFException: Unexpected EOF read on the socket]
用postman直接请求接口是可以成功的,很奇怪,请求头都设置好了的,通过分析发现,是由于请求再发生时,请求体body已经没了,按照VUE-ADMIN脚手架的设计,只会是由于moke引起的,进入moke-server.js中发现,果然如此
注释掉上面四行代码就可以正常想服务器发送请求了!
推荐阅读
-
java.io.EOFException: Unexpected EOF read on the socket
-
解决文件上传 java.io.EOFException: Unexpected EOF read on the socket问题
-
Unexpected EOF read on the socket
-
记录:java.io.EOFException: Unexpected EOF read on the socket
-
org.apache.catalina.connector.ClientAbortException: java.io.EOFException: Unexpected EOF read on the
-
SpringBoot文件上传:java.io.EOFException: Unexpected EOF read on the socket
-
SpringBoot - Processing of multipart/form-data request failed. Unexpected EOF read on the socket
-
java.io.EOFException: Unexpected EOF read on the socket
-
文件上传错误:java.io.EOFException: Unexpected EOF read on the socket
-
SpringBoot 解决文件上传 java.io.EOFException: Unexpected EOF read on the socket问题