Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Non-fatal java.net.SocketException in Servlet...cause?

0 views
Skip to first unread message

Craig Patchett

unread,
Jul 16, 1999, 3:00:00 AM7/16/99
to
This non-fatal exception from within a servlet has been reported in various
newsgroups for the last year, but nobody has offered a solution yet:

java.net.SocketException: Connection reset by peer: JVM_recv in socket input
stream read
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:90)
at sun.servlet.http.HttpInputStream.fill(HttpInputStream.java:346)
at sun.servlet.http.HttpInputStream.readLine(HttpInputStream.java:239)
at sun.servlet.http.HttpRequestLine.readLine(HttpRequestLine.java:175)
at sun.servlet.http.HttpRequestLine.parse(HttpRequestLine.java:148)
at sun.servlet.http.HttpRequest.next(HttpRequest.java:323)
at
sun.servlet.http.HttpServerHandler.handleConnection(HttpServerHandler.java:105)
at sun.servlet.http.HttpServerHandler.run(HttpServerHandler.java:90)
at java.lang.Thread.run(Thread.java:479)

It occurs (for me at least) from within ServletRunner OR JavaWebServer after the
(successful) connection to a servlet has been closed on the client side. It does
not, however, happen immediately after the connection is closed but rather after
a period of time.

My first guess based on the stack trace was that it was happening because of
HTTP 1.1 connections being persistent by default...the server goes to read
something from the client that isn't there. I tried adding Connection: close
headers to both the client request and the servlet response, but to no avail.

Is there a way to completely close a connection from within a servlet (I'm
closing the output stream I'm writing to)? Or is this caused by something
completely different? As I mentioned before, it's a non-fatal exception but it's
cluttering up a log file and I would like to remove it if possible.

TIA.

Craig

************************

Craig Patchett
Senior Product Developer
Peregrine Systems, Inc.

0 new messages