On a Mac OS X 10.8 machine I have a Tomcat 7.0.40 Server and a client, both running locally. Via 3-way-handshake a TCP connection is established, followed immediately by FIN, ACK and RST from server. Client receives "End of file from server", or "Connection reset".
TCP sequence:
client SYN
server SYN, ACK
client ACK
server [TCP Window Update] ACK
server FIN, ACK
client ACK
server [TCP Dup ACK] ACK
client GET /myurl/...
server RST
Details
- client and server both run locally
- first GET request fails. Following requests succeed.
- no firewall in on
- maxfiles already increased, in vain
What causes that the server closes the socket? Appreciate tips and ideas.
EDIT: Tomcat's log has the following stack traces:
FINE: Error parsing HTTP request header java.net.SocketException: Invalid argument at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:150) at java.net.SocketInputStream.read(SocketInputStream.java:121) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:516) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:501) at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:98) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:928) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724)
and
Aug 14, 2013 5:15:17 PM org.apache.coyote.http11.AbstractHttp11Processor process FINE: Error parsing HTTP request header java.io.EOFException: Unexpected EOF read on the socket at org.apache.coyote.http11.Http11Processor.setRequestLineReadTimeout(Http11Processor.java:174) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:926) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724)