Solved

Apache weblog status %>s issue

Posted on 2010-09-05
11
347 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:RQuadling
Comment Utility
Can you show your entire LogFormat please?
0
 

Author Comment

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

Expert Comment

by:RQuadling
Comment Utility
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
 

Author Comment

by:bcrawley01
Comment Utility
%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:RQuadling
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:bcrawley01
Comment Utility
That before was with the > added.
0
 
LVL 40

Expert Comment

by:RQuadling
Comment Utility
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
Comment Utility
Log format file is attached.
server.xml
0
 
LVL 40

Expert Comment

by:RQuadling
Comment Utility
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
Comment Utility
0
 
LVL 40

Expert Comment

by:RQuadling
Comment Utility
So, \" => " was the issue?

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


0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now