?
Solved

Apache weblog status %>s issue

Posted on 2010-09-05
11
Medium Priority
?
356 Views
Last Modified: 2012-05-10
Hi,

Our Apache web server has been configured so the web logs capture the last status by using the directive %>s however this is producing the following in the log file ???>???s instead of the last correct status number.

Does anyone know why this occurs and how it can be fixed?

Thanks.
0
Comment
Question by:bcrawley01
  • 6
  • 5
11 Comments
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 33611402
Can you show your entire LogFormat please?
0
 

Author Comment

by:bcrawley01
ID: 33614034
LogFormat "%h %v %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\""
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 33614276
Can you try %s to make sure that at least this is working? The original status will be logged rather than the last status.

Can you do a hex dump of the log file to see exactly what is ???>???s is.

Hmmm.

OOI, Can you try looking at the file containing this logformat in hex mode?

Have you used 16bit UTF format?

25 00 3E 00 73 for the %>s but as %\000>\000s in 8bit mode.

Almost certain this is the issue.

If you view the log file in hex mode, you should probably see that the ??? is really 00 - a null.
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

Author Comment

by:bcrawley01
ID: 33614394
%s does work and is logging the original status.

When opening the log file in hex, ???>???s is 3F 3F 3F 3E 3F 3F 3F 73
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 33614405
Hmm. That's odd.

Really was expecting that to be the tool that displayed the log showing NULLs as ???

Can you put the > back into the log format and do a hex on that.
0
 

Author Comment

by:bcrawley01
ID: 33614472
That before was with the > added.
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 33615779
Yes. But I'm wondering if the editing of the logformat is the issue. Can you show the hex of the file with the logformat in it, not the log file itself.

Whilst it is not likely, but if the logformat is corrupted with nulls (16bit UTF rather than 8bit), then the leading null bytes _COULD_ be shown as ??? and depending upon how the translation is done from logformat to log file, ...

Sort of clutching at straws...

Can you attach the file with the logformat to this question?

0
 

Author Comment

by:bcrawley01
ID: 33623547
Log format file is attached.
server.xml
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 33624494
As the file is XML, I wonder if %> is getting in the way somehow.

Is the remainder of the log entry exist?
0
 

Accepted Solution

by:
bcrawley01 earned 0 total points
ID: 33697842
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 33699293
So, \" => " was the issue?

Ha! A million ways to escape and URLencoding never occurred to me.


0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month16 days, 3 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question