当前位置: 代码迷 >> Java Web开发 >> tomcat出错: Unexpected end of file from server,该如何解决
  详细解决方案

tomcat出错: Unexpected end of file from server,该如何解决

热度:738   发布时间:2016-04-17 14:01:58.0
tomcat出错: Unexpected end of file from server
tomcat开的时间开了.   tomcat没有报什么错误.   客户端就是不能访问.

我写了程序去访问
-------------------------------
try
{
HttpURLConnection   c   =   (HttpURLConnection)   new   URL( "http://www.ypworld.cn/ ").openConnection();
InputStream   is   =   c.getInputStream();
is.read();
is.close();
}   catch   (Exception   ex)
{
ex.printStackTrace();
}

显示出的报错
-----------------------
G:\e\workspace\ypworld\build\classes> java   Test
java.net.SocketException:   Unexpected   end   of   file   from   server
at   sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:729)
at   sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:592)
at   sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:726)
at   sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:592)
at   sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1004)
at   Test.main(Test.java:34)

我用的是tomcat   v6.0.13     jre是6u1


哪位知道是什么原因??     是不是并发太大了??         现在一天要重启好几次tomcat。



------解决方案--------------------
at Test.main(Test.java:34)
代码帖出
------解决方案--------------------
网络错误
  相关解决方案