Wenn ein Tomcat-server sagt "Client Abgebrochen", und der Kunde sagt "Premature EOF", wer im Recht ist?

Ich habe einen Tomcat-server, streaming-Daten auf einem Java-client über http. Es ist das kopieren von bytes aus einer Datei zu HTTPServletResponse den Ausgabestrom in einen servlet-Container.

Einem client verwendet HttpURLConnection zu verbinden und die Daten Auslesen.

Manchmal alles in Ordnung ist, andere mal, sowohl der client und der server eine exception zu werfen.

Der Kunde sagt, es ist ein "Premature EOF".

Der server behauptet "ClientAbortException".

Ist nicht nur eines der oben genannten möglich ist?

CLIENT:

java.io.IOException: Premature EOF
       at sun.net.www.http.ChunkedInputStream.fastRead(ChunkedInputStream.java:234)
       at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:662)
       at java.io.FilterInputStream.read(FilterInputStream.java:116)
       at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2669)
       at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2664)java.io.IOException: Premature EOF
       at sun.net.www.http.ChunkedInputStream.fastRead(ChunkedInputStream.java:234)
       at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:662)
       at java.io.FilterInputStream.read(FilterInputStream.java:116)
       at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2669)
       at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2664)  

SERVER:

ClientAbortException:  java.io.IOException
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
    at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
    at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381)
    at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)
    at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
    ...
Caused by: java.io.IOException
        at org.apache.coyote.ajp.AjpAprProcessor.flush(AjpAprProcessor.java:1223)
        at org.apache.coyote.ajp.AjpAprProcessor$SocketOutputBuffer.doWrite(AjpAprProcessor.java:1310)
        at org.apache.coyote.Response.doWrite(Response.java:560)
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
        ... 23 more
  • Wenn Sie konsequent das Problem reproduzieren, verwenden Sie ein Netzwerk-monitoring-tool wie Wireshark, und Sie sehen genau, was passiert ist
InformationsquelleAutor z5h | 2011-01-07
Schreibe einen Kommentar