Suddenly 404 Not Found

197 views
Skip to first unread message

Edwin Cruz

unread,
Dec 4, 2009, 1:57:20 PM12/4/09
to repo-discuss
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Hi All! I wanted to know if anyone else is experimenting 404 Not found after gerrit has been running for a while...

When "Loading Gerrit Code Review" message appears, gerrit requests for this file:
but, the server returns 404, and it never loads.

If I restart gerrit it comes back to work normally, I can not find anything relevant in the logs (jetty nor apache).

Jetty: 6.1.20
Gerrit: 2.0.21
Apache 2.2.11

Thanks and Regards!

--
Ing.  Edwin Cruz

Shawn Pearce

unread,
Dec 4, 2009, 2:02:34 PM12/4/09
to repo-d...@googlegroups.com
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Yup, we see the same thing on at least one of our Gerrit servers.

Jetty seems to lose its mind after a while and forget that a lot
of the static assets are in the WAR file. A restart of Jetty is
required to kick it in the head and make it work again.

I haven't yet upgraded my production Jetty to see if 7.x fixes
the issue.

I know its Jetty that is at fault here, that static file is not
served by a Gerrit servlet. Its handled automatically for us by
the container. Also, the Jetty request logs show a 404 for that
particular file when this bug occurs, so I know Apache is forwarding
the request down to Jetty.

Edwin Cruz

unread,
Dec 4, 2009, 2:09:37 PM12/4/09
to repo-d...@googlegroups.com
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Ok, Thanks Shawn!

I will try with jetty 7

Best Regards!

--
Ing.  Edwin Cruz


Simon Wilkinson

unread,
Dec 4, 2009, 2:09:44 PM12/4/09
to Shawn Pearce, repo-d...@googlegroups.com
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
OpenAFS sees this problem about once a week. I keep meaning to just set up a cronjob to restart jetty.

Simon.

Shawn Pearce

unread,
Dec 4, 2009, 2:17:59 PM12/4/09
to Simon Wilkinson, repo-d...@googlegroups.com
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Simon Wilkinson <si...@sxw.org.uk> wrote:
> > http://reviews.xxxxx.com/gerrit/gerrit.nocache.js?content=549d2628b5883543d30be0dceef9153c95b8d63f
> > but, the server returns 404, and it never loads.
>
> OpenAFS sees this problem about once a week. I keep meaning to just set up a cronjob to restart jetty.

Hmm.

I wonder if the problem isn't related to /tmp management.

Jetty unpacks the WAR file into a directory in /tmp. If some
cron script comes along once a week and deletes /tmp files that
have modification dates older than a week, that would kill Jetty.
And it wouldn't be Jetty's fault.

Hudson CI's embedded servlet container unpacks its WAR into ~/.hudson
because some systems have a /tmp cleaner that kills their WAR file
contents. I wonder if that's what we're really falling into here.

You could try adding -Djava.io.tmpdir=$HOME/.gerrit_tmp to your
Jetty Java arguments to force the Jetty process to place the unpacked
WAR elsewhere in the filesystem, out of reach of the /tmp killer.

Nasser Grainawi

unread,
Dec 4, 2009, 2:19:58 PM12/4/09
to repo-d...@googlegroups.com, Simon Wilkinson
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
For what it's worth, I've never seen this problem on our servers (but we also
reboot jetty weekly).

Nasser
Reply all
Reply to author
Forward
0 new messages