possible bug in jetty 6.x request logging

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

possible bug in jetty 6.x request logging

Igor E. Poteryaev
Hi, all

Before creating jira issue I just want to ask list for help.

Problem:
Sometimes in request log instead of remote IP address I see null.

>From my ${jetty.home}/logs/request.log:
.......
127.0.0.1 -  -  [01/jun/2008:08:08:37 +0000] "GET /javadoc/ HTTP/1.0"
200 1491 "-" "ApacheBench/2.0.40-dev"
127.0.0.1 -  -  [01/jun/2008:08:08:37 +0000] "GET /javadoc/ HTTP/1.0"
200 1491 "-" "ApacheBench/2.0.40-dev"
127.0.0.1 -  -  [01/jun/2008:08:08:37 +0000] "GET /javadoc/ HTTP/1.0"
200 1491 "-" "ApacheBench/2.0.40-dev"
127.0.0.1 -  -  [01/jun/2008:08:08:37 +0000] "GET /javadoc/ HTTP/1.0"
200 1491 "-" "ApacheBench/2.0.40-dev"
null -  -  [01/jun/2008:08:08:37 +0000] "GET /javadoc/ HTTP/1.0" 200
1491 "-" "ApacheBench/2.0.40-dev"
^^^^^
oops!
127.0.0.1 -  -  [01/jun/2008:08:08:37 +0000] "GET /javadoc/ HTTP/1.0"
200 1491 "-" "ApacheBench/2.0.40-dev"
127.0.0.1 -  -  [01/jun/2008:08:08:37 +0000] "GET /javadoc/ HTTP/1.0"
200 1491 "-" "ApacheBench/2.0.40-dev"
.......

I tried to isolate this issue and finally can reproduce it with
such simple context configuraion file:

===== static-webapp-context.xml [begin] ======
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE Configure
    PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
    "http://jetty.mortbay.org/configure_6_0.dtd">

<Configure class="org.mortbay.jetty.webapp.WebAppContext">

  <Set name="contextPath">/javadoc</Set>
  <Set name="resourceBase"><SystemProperty name="jetty.home"
default="."/>/javadoc/</Set>

</Configure>
===== static-webapp-context.xml [end] ======


Steps to reproduce:
1. remove all files from ${jetty.home}/contexts/ and
${jetty.home}/webapps/
2. put static-webapp-context.xml file to ${jetty.home}/contexts/
3. start jetty
4. run ApacheBench     ab -n 1000 -c 10 http://localhost:8080/javadoc/

look at log in ${jetty.home}/logs/
You should see several lines with null instead of 127.0.0.1, like this:

null -  -  [01/jun/2008:08:08:37 +0000] "GET /javadoc/ HTTP/1.0" 200
1491 "-" "ApacheBench/2.0.40-dev"


As additional info, I could not reproduce this using javadoc.xml context
config file from jetty distribution.

I see this issue with jetty 6.1.11, 6.1.10, 6.1.9 under Gentoo Linux and
Sun 1.5.0.15 JVM.


--
Igor E. Poteryaev <[hidden email]>
Severnaya Kazna


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email