velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Colson" <tcol...@cisco.com>
Subject [VELTOOLS] Connection Resets
Date Wed, 07 Aug 2002 05:50:28 GMT
So I'm not sure this truly has much to do with VelTools and/or the
VelocityServlet, it may just be due to Tomcat 3.2.1 and HTTP 1.0. 

With *.vm files and the VelocityServlet, I'm seeing quite a few Server
errors, IOExceptions, and IllegalStateExceptions/Response has already
been committed. I can reproduce these by rapidly reloading pages before
they have a chance to completely render. 

(Additionally...but perhaps not directly related, I've been getting
quite a few "Broken pipe" IOExceptions on Solaris 2.8 boxes.)

Is this something that can be caught in the VelocityServlet, or is it
inevitable?

Ctx( /mypath/app ): 500 R( /mypath/app + /vm/SearchResults.vm + null)
Connection reset by peer: socket write error
Ctx( /mypath/app ): IOException in: R( /mypath/app +
/vm/SearchResults.vm + null) Connection reset by peer: socket write
error


Ctx( /mypath/app ): Servlet API error: sendError with commited buffer 
Ctx( /mypath/app ): IllegalStateException in: R( /mypath/app +
/vm/SearchForm.vm + null) Response has already been committed 
Ctx( /mypath/app ): IOException in: R( /mypath/app + /vm/SearchForm.vm +
null) Connection reset by peer: socket write error 


java.net.SocketException: Connection reset by peer: socket write error
 at java.net.SocketOutputStream.socketWrite(Native Method)
 at java.net.SocketOutputStream.write(SocketOutputStream.java:96)
 at
org.apache.tomcat.service.http.HttpResponseAdapter.endHeaders(HttpRespon
seAdapter.java:124)
 at
org.apache.tomcat.core.BufferedServletOutputStream.sendHeaders(BufferedS
ervletOutputStream.java:126)
 at
org.apache.tomcat.core.BufferedServletOutputStream.reallyFlush(BufferedS
ervletOutputStream.java:236)
 at org.apache.tomcat.core.ResponseImpl.finish(ResponseImpl.java:206)
 at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcher
Impl.java:215)
 at
org.apache.struts.action.ActionServlet.processActionForward(ActionServle
t.java:1758)
 at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
 at com.cisco.hrit.core.servlet.ServletBase.doGet(Unknown Source)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at com.cisco.hrit.core.servlet.ServletBase.service(Unknown Source)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
a:797)
 at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
ttpConnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49
8)
 at java.lang.Thread.run(Thread.java:484)


Depending on where the render is, I've managed on some reloads to get
errors like this reported:

path="/mypath/app" : Velocity  [error] VelocimacroProxy.render() :
exception VM = #menu_shim() : java.net.SocketException: Connection reset
by peer: socket write error
	at java.net.SocketOutputStream.socketWrite(Native Method)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:96)
	at
org.apache.tomcat.service.http.HttpResponseAdapter.endHeaders(HttpRespon
seAdapter.java:124)
	at
org.apache.tomcat.core.BufferedServletOutputStream.sendHeaders(BufferedS
ervletOutputStream.java:126)
	at
org.apache.tomcat.core.BufferedServletOutputStream.reallyFlush(BufferedS
ervletOutputStream.java:236)
	at
org.apache.tomcat.core.BufferedServletOutputStream.write(BufferedServlet
OutputStream.java:185)
	at java.io.OutputStreamWriter.write(OutputStreamWriter.java:184)
	at
org.apache.velocity.io.VelocityWriter.flushBuffer(VelocityWriter.java:17
7)
	at
org.apache.velocity.io.VelocityWriter.write(VelocityWriter.java:307)
	at
org.apache.velocity.io.VelocityWriter.write(VelocityWriter.java:319)
	at
org.apache.velocity.runtime.parser.node.ASTText.render(ASTText.java:99)
	at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
a:271)
	at
org.apache.velocity.runtime.directive.VelocimacroProxy.render(Velocimacr
oProxy.java:215)
	at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective
.java:153)
	at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
a:271)
	at
org.apache.velocity.runtime.directive.VelocimacroProxy.render(Velocimacr
oProxy.java:215)
	at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective
.java:153)
	at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
a:271)
	at
org.apache.velocity.runtime.directive.Parse.render(Parse.java:232)
	at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective
.java:153)
	at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav
a:271)
	at org.apache.velocity.Template.merge(Template.java:296)
	at
org.apache.velocity.servlet.VelocityServlet.mergeTemplate(VelocityServle
t.java:448)
	at
com.cisco.foo.LayoutVelocityViewServlet.mergeTemplate(LayoutVelocityView
Servlet.java:66)


What the heck causes this beasty? I've found some net pages that say
buffering, some say DB problems.

java.io.IOException: Broken pipe	at
java.net.SocketOutputStream.socketWrite(Native Method)	at
java.net.SocketOutputStream.write(SocketOutputStream.java:96)	at
org.apache.tomcat.service.http.HttpResponseAdapter.doWrite(HttpResponseA
dapter.java:162)	at
org.apache.tomcat.core.BufferedServletOutputStream.doWrite(BufferedServl
etOutputStream.java:121)	at
org.apache.tomcat.core.BufferedServletOutputStream.reallyFlush(BufferedS
ervletOutputStream.java:246)	at
org.apache.tomcat.core.BufferedServletOutputStream.flush(BufferedServlet
OutputStream.java:230)	at
org.apache.tomcat.core.ResponseImpl.finish(ResponseImpl.java:214)
at
org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatch
erImpl.java:243)	at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcher
Impl.java:162)	at
org.apache.struts.action.ActionServlet.processActionForward 

Environment -
JDK 1.3.1_02 on Win2K,XP,Solaris2.6/2.8
Struts 1.0
Tomcat 3.2.1
Velocity 1.3
velocity-tools-library-0.3.jar
velocity-tools-struts-0.9.jar
velocity-tools-view-0.8.jar


Cheers,
Tim


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message