RE: Errors in Log file

2004-12-02 Thread Allistair Crossley
a cursory glance on Google with tomcat java.net.SocketException: Connection 
reset by peer

This exception occurs when a client made a request, and before receiving the 
full response, either of the following happened: 

client's browser has been closed. 
client's connection has been disconnected. 
client presses the stop button. 

This exception is normally harmless. It does not seem possible to trap this 
exception with J2SE. 

However you say you get error 500, so perhaps are you connecting to a resource 
using sockets yourself from your web app??

// ---

from http://java.sun.com/features/2002/08/j2se-network.html

Connection Reset by Peer :

One of the issues that developers frequently run into is the Connection reset 
by peer exception: 

Exception in thread main java.net.SocketException:
Connection reset by peer: JVM_recv in socket input stream read.

This basically means that a network error occurred while the client was 
receiving data from the server. But what is really happening is that the server 
actually accepts the connection, processes the request, and sends a reply to 
the client. However, when the server closes the socket, the client believes 
that the connection has been terminated abnormally because the socket 
implementation sends a TCP reset segment telling the client to throw away the 
data and report an error. 

Sometimes, this problem is caused by not properly closing the input/output 
streams and the socket connection. Make sure you close the input/output streams 
and socket connection properly. If everything is closed properly, however, and 
the problem persists, you can work around it by adding Thread.sleep(1000) 
before closing the streams and the socket. This technique, however, is not 
reliable and may not work on all systems. 


 -Original Message-
 From: Pradeep Chauhan [mailto:[EMAIL PROTECTED]
 Sent: 02 December 2004 10:15
 To: Tomcat Users List
 Subject: Errors in Log file
 
 
 Hi All,
 
 We have  Tomcat 4.1.12 in production. Sometime users get 
 INTER SERVER ERROR
 500.
 In log files we have only two errors without any clues.
 
 Can any body explian the possible reasons of these errors.
 
 1. java.net.SocketException: Connection reset by peer: socket 
 write error
   at java.net.SocketOutputStream.socketWrite0(Native Method)
   at 
 java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
   at 
 java.net.SocketOutputStream.write(SocketOutputStream.java:136)
 
 
 
 2. java.lang.IllegalStateException
   at
 org.apache.coyote.tomcat4.CoyoteResponseFacade.sendRedirect(Co
 yoteResponseFa
 cade.java:340)
   at 
 org.apache.jsp.DreamScreen_jsp._jspService(DreamScreen_jsp.java:564)
   at 
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
 Wrapper.java:2
 04)
   at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:289)
   at 
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
 er(Application
 FilterChain.java:247)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
 cationFilterCh
 ain.java:193)
   at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
 rapperValve.ja
 va:260)..
 
 
 Thanks and Regards,
 Pradeep Chauhan
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [SPAM_EMAIL] - RE: Errors in Log file - Found word(s) list error in the Text body.

2004-12-02 Thread Pradeep Chauhan
Hi ,

No, we are not connecting to a resource using sockets.

Is it possible that server is closing sockets after some interval of time by
default. and because we are not getting response in that interval of time
thats why it is generating such errors?

Thanks,
Pradeep

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED]
Sent: 02.12.2004 03:52 PM
To: Tomcat Users List
Subject: [SPAM_EMAIL] - RE: Errors in Log file - Found word(s) list
error in the Text body.


a cursory glance on Google with tomcat java.net.SocketException: Connection
reset by peer

This exception occurs when a client made a request, and before receiving the
full response, either of the following happened:

client's browser has been closed.
client's connection has been disconnected.
client presses the stop button.

This exception is normally harmless. It does not seem possible to trap this
exception with J2SE.

However you say you get error 500, so perhaps are you connecting to a
resource using sockets yourself from your web app??

// ---

from http://java.sun.com/features/2002/08/j2se-network.html

Connection Reset by Peer :

One of the issues that developers frequently run into is the Connection
reset by peer exception:

Exception in thread main java.net.SocketException:
Connection reset by peer: JVM_recv in socket input stream read.

This basically means that a network error occurred while the client was
receiving data from the server. But what is really happening is that the
server actually accepts the connection, processes the request, and sends a
reply to the client. However, when the server closes the socket, the client
believes that the connection has been terminated abnormally because the
socket implementation sends a TCP reset segment telling the client to throw
away the data and report an error.

Sometimes, this problem is caused by not properly closing the input/output
streams and the socket connection. Make sure you close the input/output
streams and socket connection properly. If everything is closed properly,
however, and the problem persists, you can work around it by adding
Thread.sleep(1000) before closing the streams and the socket. This
technique, however, is not reliable and may not work on all systems.


 -Original Message-
 From: Pradeep Chauhan [mailto:[EMAIL PROTECTED]
 Sent: 02 December 2004 10:15
 To: Tomcat Users List
 Subject: Errors in Log file


 Hi All,

 We have  Tomcat 4.1.12 in production. Sometime users get
 INTER SERVER ERROR
 500.
 In log files we have only two errors without any clues.

 Can any body explian the possible reasons of these errors.

 1. java.net.SocketException: Connection reset by peer: socket
 write error
   at java.net.SocketOutputStream.socketWrite0(Native Method)
   at
 java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
   at
 java.net.SocketOutputStream.write(SocketOutputStream.java:136)
 


 2. java.lang.IllegalStateException
   at
 org.apache.coyote.tomcat4.CoyoteResponseFacade.sendRedirect(Co
 yoteResponseFa
 cade.java:340)
   at
 org.apache.jsp.DreamScreen_jsp._jspService(DreamScreen_jsp.java:564)
   at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
 Wrapper.java:2
 04)
   at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:289)
   at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
 er(Application
 FilterChain.java:247)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
 cationFilterCh
 ain.java:193)
   at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
 rapperValve.ja
 va:260)..


 Thanks and Regards,
 Pradeep Chauhan



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Errors in Log file

2004-12-02 Thread David Stevenson
I believe the java.lang.IllegalStateException occurs when the response
is committed. sendRedirect requires changing the HTTP headers (Location:
perhaps). You cannot write HTML to the web page and then issue a
redirect unless the HTML is buffered via a JSP directive:
%@ page buffer=32kb %, and the response can be cleared before it is
flushed (HTTP Headers go before the HTTP body).

Either don't attempt to write HTML to the web page, or make sure your
buffer size is big enough so that the HTML can be buffered and cleared
before you issue the re-direct. The HTML will be ignored when the
sendRedirect is used.

http://java.sun.com/products/jsp/tags/11/syntaxref11.fm7.html
http://www.esus.com/javaindex/j2ee/javajsp/jspbufferautoflush.html

David Stevenson

On Thu, 2004-12-02 at 05:15, Pradeep Chauhan wrote:

 2. java.lang.IllegalStateException
   at
 org.apache.coyote.tomcat4.CoyoteResponseFacade.sendRedirect(CoyoteResponseFa
 cade.java:340)
   at org.apache.jsp.DreamScreen_jsp._jspService(DreamScreen_jsp.java:564)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
 04)
   at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
 FilterChain.java:247)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
 ain.java:193)
   at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
 va:260)..
 
 
 Thanks and Regards,
 Pradeep Chauhan
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]