I am trying to set up Awstats but when I run the awstats.pl command, it is giving me the error:
AwStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log.
Your log file C:/WebSphere/AppServer/profiles/AppSrv01/logs/activity.log must have a bad format or LogFormat parameter setup does not match this format . Your AWStats LogFormat parameter is: 1 This means each line in your web server log file need to have “combined log format” like this: 111.22.33.44 – - [10/Jan/2001:02:14:14 +0200] “GET / HTTP/1.1″ 200 1234 “http://www.fromserver.com/from.htm” “Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)” And this is an example of records AWStats found in your log file (the record number 50 in your log): [invalid characters removed by forum admin]
Setup ('./awstats.AppSrv01.conf' file, web server or permissions) may be wrong. Check config file, permissions and AWStats documentation (in 'docs' directory).
I am unable to figure out how to solve this problem even after googling around for a solution in that direction. Please point me in the right direction and I will be grateful.
The LogFormat definition in your AWStats config file must match the log format in your web server log file. It seems that AWStats found invalid characters in the file that you designated as log file.
This can be caused by a compressed log file. What is the name of your log file and can you read its content with a standard text editor ?
Thanks for the reply. Yeah… it seems like my log file is not in the right format…. I can read it using Notepad, but it is not in a very attractive format. The name of my log file is activity.log and it is under the folder: 'C:\\WebSphere\\AppServer\\profiles\\AppSrv01\\logs'. The contents of this file get filled by Websphere when I run some tests.
I deleted the file contents ( of activity.log) and now when I run the awstats.pl command( after re-running the tests), it gives me the output:
Update for config “./awstats.AppSrv01.conf” With data in log file “C:/WebSphere/AppServer/profiles/AppSrv01/logs/activity.log” … Phase 1 : First bypass old records, searching new record… Searching new records from beginning of log file… Jumped lines in file: 0 Parsed lines in file: 2 Found 0 dropped records, Found 2 corrupted records, Found 0 old records, Found 0 new qualified records.
Which is some improvement, but which reinforces the fact that my log file is not in the correct format since it found 2 corrupted records. Any way around this, so that it can read the records as new records instead of corrupted… ( would I have to change the format of the log file to match the log format definition, and if so is there a way to do that)?
Awesome… that was exactly that I needed to do. Now I am able to get it to read the log files ( the access log file for the HTTP server) and generate the statistics by running from the command window. But I am unable to get the statistics page to display from the web browser. Here are the things that I did:
1. I set: AllowToUpdateStatsFromBrowser=1 in my awstats.mysite.conf file
2. I set: SaveDatabaseFilesWithPermissionsForEveryone=1
I tried changing the permission of the C:\\awstats-6.5\\wwwroot directory too but not sure it works.
Is there something that I am missing?
And this is the url that I am trying to hit from my browser:
It can be used to check that your web server is properly configured to run Perl script. On many servers, scripts must tbe located in a cgi-bin directory.