On Fri, Apr 13, 2012 at 03:54, Andrew Jeffery <andrew....@ultra-avalon.com> wrote: > On Thu, 2012-04-12 at 21:36 -0700, Shawn Pearce wrote: >> On Thu, Apr 12, 2012 at 19:13, Andrew Jeffery >> <andrew....@ultra-avalon.com> wrote: >> > I've been struggling a bit recently with Gerrit's bundled Jetty >> > instance. A number of things have been happening, including (from >> > logs/error_log): >> > >> > --- >> > (note the timestamps) >> > [2012-04-13 11:11:45,403] WARN org.eclipse.jetty.util.log : Dispatched Failed! >> > [2012-04-13 11:11:45,403] WARN org.eclipse.jetty.util.log : Dispatched Failed! >> >> This is a known problem with Jetty. I'm not certain if they have fixed >> this in newer versions. >> >> I think what happens is a client disconnects ungracefully while Jetty >> has de-selected its file descriptor for reading. This generates an >> error condition on the socket, but the error cannot be delivered until >> Jetty re-selects the file descriptor for reading. Its selecting for >> writing, so Jetty is woken, but there is no event to process... so >> Jetty gets annoyed, logs this warning, and tries again with the same >> result. >> > > Hmm... Okay - so I'm thinking of running Gerrit inside a tomcat instance > as both of the issues appear Jetty specific at this point. Any pointers > or thoughts on this? It's nice how easy it is to use the built-in Jetty > code, I'll miss that if I have to move to tomcat permanently! > > Any ideas on the IllegalMonitorStateException? Do you suggest I take > that up with the Jetty project?
This is sad, searching for `jetty "Dispatched Failed!"` on Google basically just points to a ton of threads about Gerrit. I was hoping to find a release notes document suggesting they fixed it in a more recent version. :-(
Tomcat might not have this bug. GoogleServletEngine doesn't have this bug (it has others that make it "fun" but not this one). We could look at changing the embedded web server out for a different container. GSE has the downside that it can only serve from "/" if I recall, which makes it harder to use in a reverse proxy situation where you want to serve from "/r/" or something.
I chose to embed Jetty into Gerrit eons ago because I hated configuring Tomcat. So I'm really not the right person to ask about how to setup Gerrit under Tomcat.