java.net.SocketException: Unexpected end of file from server
2017-08-16 11:58
603 查看
今天访问远程服务器的数据的时候返回Unexpected end of file from server异常,异常信息为:
在stackoverflow找到答案,如下:
“Unexpected end of file” implies that the remote server accepted and closed the connection without sending a response. It’s possible that the remote system is too busy to handle the request, or that there’s a network bug that randomly drops connections.
With the information available it’s impossible to say what’s going wrong. If you have access to the servers in question you can use packet sniffing tools to find what exactly is sent and received, and look at logs to of the server process to see if there are any error messages.
意思就是说“意外的文件结束”意味着远程服务器接受并关闭连接,而不发送响应。远程系统可能太忙,无法处理请求,或者有网络错误随机丢弃连接。
有了可用的信息,不可能说出了什么问题。如果您有权访问有问题的服务器,您可以使用数据包嗅探工具来查找发送和接收的内容,并查看服务器进程的日志,以查看是否有任何错误消息。
java.net.SocketException: Unexpected end of file from server at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:851) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678) at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:848) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1569) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
在stackoverflow找到答案,如下:
“Unexpected end of file” implies that the remote server accepted and closed the connection without sending a response. It’s possible that the remote system is too busy to handle the request, or that there’s a network bug that randomly drops connections.
With the information available it’s impossible to say what’s going wrong. If you have access to the servers in question you can use packet sniffing tools to find what exactly is sent and received, and look at logs to of the server process to see if there are any error messages.
意思就是说“意外的文件结束”意味着远程服务器接受并关闭连接,而不发送响应。远程系统可能太忙,无法处理请求,或者有网络错误随机丢弃连接。
有了可用的信息,不可能说出了什么问题。如果您有权访问有问题的服务器,您可以使用数据包嗅探工具来查找发送和接收的内容,并查看服务器进程的日志,以查看是否有任何错误消息。
相关文章推荐
- java.net.SocketException: Unexpected end of file from server
- java.net.SocketException: Unexpected end of file from server
- java.net.SocketException: Unexpected end of file from server
- java.net.SocketException: Unexpected end of file from server
- java.net.SocketException:Unexcepted end of file from server
- java.net.SocketException: Unexpected end of file from server 异常解决
- java.net.SocketException: Unexpected end of file from server 异常解决
- [置顶] java微信退款unexpected end of file from server
- Linux使用SFTP登陆时报错:Received unexpected end-of-file from SFTP server
- java.net.SocketException: Malformed reply from SOCKS server
- 解决Fatal:Received unexpected end-of-file from server
- MockWebServer[45678] connection from null failed: java.net.SocketException
- SocketException: Unexpected end of file from server 问题解决
- 线上事故:Unexpected end of file from server
- Maven deploy throw exception : java.net.ProtocolException: unexpected end of stream
- centos解决Received unexpected end-of-file from SFTP server
- freemarker.core.ParseException:Unexpected end of file reached
- 在Android程序中使用Modbus协议时报 java.net.SocketException: recvfrom failed: ECONNRESET解决办法
- Android网络请求报错:java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
- JedisConnectionException: java.net.SocketException: Socket closed;Unknown reply: ; It seems like server has closed the connectio