Datafile is corrupt, data-index could not be read: %s;

Help for using / installing BetterAWStats

Datafile is corrupt, data-index could not be read: %s;

Postby vk2him » 04 Feb 2010 11:24

Hi Oliver,

I'm getting the following error, not sure when it started? I can read my datafiles with awstats so not sure what could be wrong?

BetterAWstats Error
Datafile is corrupt, data-index could not be read: %s;
'%s' should be BEGIN_...
Please read the FAQ (/doc/FAQ.txt)

My url is http://ais.theshackbythebeach.com/bette ... /index.php

Cheers
Ian
vk2him
 
Posts: 10
Joined: 15 Jul 2008 20:34

Re: Datafile is corrupt, data-index could not be read: %s;

Postby Oliver » 04 Feb 2010 11:27

Hi Ian,

Can you switch on Debug in the config and post the result here?

Oliver
Oliver
BetterAWStats Creator/Admin
User avatar
Oliver
Site Admin
 
Posts: 147
Joined: 10 Mar 2008 19:09

Re: Datafile is corrupt, data-index could not be read: %s;

Postby vk2him » 04 Feb 2010 11:31

Hi Oliver,

Its been quite a while since I last configured better AWstats, can you please give me a clue as to where I enable debug?
Cheers
vk2him
 
Posts: 10
Joined: 15 Jul 2008 20:34

Re: Datafile is corrupt, data-index could not be read: %s;

Postby Oliver » 04 Feb 2010 13:34

oh so you are saying it used to work last month but suddenly stopped? hmmm... strange.

anyhow you go into your config.php and search for 'debug'. you have to set the value to 'true'. looks like this:

Code: Select all
$BAW_CONF['debug'] = true;
Oliver
BetterAWStats Creator/Admin
User avatar
Oliver
Site Admin
 
Posts: 147
Joined: 10 Mar 2008 19:09

Re: Datafile is corrupt, data-index could not be read: %s;

Postby vk2him » 04 Feb 2010 15:30

Thanks for the quick reply Oliver. Yes I have had BetterAWStats running for over a year without issue.

I have now turned on debug, the output is too large to fit in this post, you can see the output here though

http://ais.theshackbythebeach.com/betterawstats/index.php.

Following is the last lines before it abends ...

Cheers

Code: Select all
reading ais datafile, type TIME from 200911 | Memory used: 2.1243 MB | Time: 0.564 sec
reading site ais datafile, date 200911, file c:/inetpub/wwwroot/aw_stats/awstats112009.ais.txt | Memory used: 2.1243 MB | Time: 0.565 sec
data map present, reading data TIME from offset 2569 | Memory used: 2.1243 MB | Time: 0.565 sec
reading aditional line to find data... | Memory used: 2.1243 MB | Time: 0.565 sec
Data TIME found at offset 2583 instead of 2569 (14 diff), is 24 lines long, reading now: | Memory used: 2.1321 MB | Time: 0.566 sec
reading Line TIME 0 | Memory used: 2.1321 MB | Time: 0.566 sec
reading Line TIME 1 | Memory used: 2.1322 MB | Time: 0.566 sec
reading Line TIME 2 | Memory used: 2.1322 MB | Time: 0.566 sec
reading Line TIME 3 | Memory used: 2.1323 MB | Time: 0.566 sec
reading Line TIME 4 | Memory used: 2.1323 MB | Time: 0.566 sec
reading Line TIME 5 | Memory used: 2.1324 MB | Time: 0.566 sec
reading Line TIME 6 | Memory used: 2.1325 MB | Time: 0.566 sec
reading Line TIME 7 | Memory used: 2.1325 MB | Time: 0.566 sec
reading Line TIME 8 | Memory used: 2.1326 MB | Time: 0.566 sec
reading Line TIME 9 | Memory used: 2.1326 MB | Time: 0.566 sec
reading Line TIME 10 | Memory used: 2.1327 MB | Time: 0.566 sec
reading Line TIME 11 | Memory used: 2.1327 MB | Time: 0.566 sec
reading Line TIME 12 | Memory used: 2.1328 MB | Time: 0.567 sec
reading Line TIME 13 | Memory used: 2.1328 MB | Time: 0.567 sec
reading Line TIME 14 | Memory used: 2.1329 MB | Time: 0.567 sec
reading Line TIME 15 | Memory used: 2.1329 MB | Time: 0.567 sec
reading Line TIME 16 | Memory used: 2.1330 MB | Time: 0.567 sec
reading Line TIME 17 | Memory used: 2.1330 MB | Time: 0.567 sec
reading Line TIME 18 | Memory used: 2.1331 MB | Time: 0.567 sec
reading Line TIME 19 | Memory used: 2.1331 MB | Time: 0.567 sec
reading Line TIME 20 | Memory used: 2.1334 MB | Time: 0.567 sec
reading Line TIME 21 | Memory used: 2.1337 MB | Time: 0.567 sec
reading Line TIME 22 | Memory used: 2.1340 MB | Time: 0.567 sec
reading Line TIME 23 | Memory used: 2.1343 MB | Time: 0.567 sec
data read, file closed | Memory used: 2.1269 MB | Time: 0.568 sec
Calculating Month-data | Memory used: 2.1255 MB | Time: 0.568 sec
reading ais datafile, type GENERAL from 200912 | Memory used: 2.1273 MB | Time: 0.568 sec
reading site ais datafile, date 200912, file c:/inetpub/wwwroot/aw_stats/awstats122009.ais.txt | Memory used: 2.1273 MB | Time: 0.569 sec
found data map for file, has 27 lines | Memory used: 2.1364 MB | Time: 0.569 sec

Notice: Undefined variable: err_data in C:\Inetpub\wwwroot\betterawstats\core\data.inc.php on line 397
BetterAWstats Error
Datafile is corrupt, data-index could not be read: %s;
'%s' should be BEGIN_...
Please read the FAQ (/doc/FAQ.txt)
vk2him
 
Posts: 10
Joined: 15 Jul 2008 20:34

Re: Datafile is corrupt, data-index could not be read: %s;

Postby Oliver » 04 Feb 2010 15:34

you did not by any chance ever open and modify the file
c:/inetpub/wwwroot/aw_stats/awstats122009.ais.txt ?
maybe transferred it from a linux to a windows server or such?

Can you paste he first 30 lines of that file here?

thanks

Oliver
Oliver
BetterAWStats Creator/Admin
User avatar
Oliver
Site Admin
 
Posts: 147
Joined: 10 Mar 2008 19:09

Re: Datafile is corrupt, data-index could not be read: %s;

Postby vk2him » 04 Feb 2010 16:01

Hi Oliver,

Using this error message I have worked out that the c:/inetpub/wwwroot/aw_stats/awstats122009.ais.txt file is corrupted somehow, it was only 20k long when most other months are over 200k ..

I just copied november's file into decembers and it is now working correctly, with duplicate data for Nov and Dec 2009 ... here is the first few lines

Thanks

Code: Select all

AWSTATS DATA FILE 6.9 (build 1.925)
# If you remove this file, all statistics for date 200912 will be lost/reset.

# Position (offset in bytes) in this file of beginning of each section for
# direct I/O access. If you made changes somewhere in this file, you should
# also remove completely the MAP section (AWStats will rewrite it at next
# update).
BEGIN_MAP 27
POS_GENERAL                     
POS_TIME                     
POS_VISITOR                     
POS_DAY                     
POS_DOMAIN                     
POS_LOGIN                     
POS_ROBOT                     
POS_WORMS                     
POS_EMAILSENDER                     
POS_EMAILRECEIVER                     
POS_SESSION                     
POS_SIDER                     
POS_FILETYPES                     
POS_OS                     
POS_BROWSER                     
POS_SCREENSIZE                     
POS_UNKNOWNREFERER                     
POS_UNKNOWNREFERERBROWSER                     
POS_ORIGIN                     
POS_SEREFERRALS                     
POS_PAGEREFS                     
POS_SEARCHWORDS                     
POS_KEYWORDS                     
POS_MISC                     
POS_ERRORS                     
POS_CLUSTER                     
POS_SIDER_404                     
END_MAP

# LastLine    = Date of last record processed - Last record line number in last log - Last record offset in last log - Last record signature value
# FirstTime   = Date of first visit for history file
# LastTime    = Date of last visit for history file
# LastUpdate  = Date of last update - Nb of parsed records - Nb of parsed old records - Nb of parsed new records - Nb of parsed corrupted - Nb of parsed dropped
# TotalVisits = Number of visits
# TotalUnique = Number of unique visitors
# MonthHostsKnown   = Number of hosts known
# MonthHostsUnKnown = Number of hosts unknown
BEGIN_GENERAL 8
LastLine 20091205230003 24 6650 70957797993
FirstTime 20091201000023
vk2him
 
Posts: 10
Joined: 15 Jul 2008 20:34

Re: Datafile is corrupt, data-index could not be read: %s;

Postby Oliver » 04 Feb 2010 16:15

oh good! so the issue is solved now I guess?
sorry that you lost your datafile... and awstats did report data from it?

Oliver
Oliver
BetterAWStats Creator/Admin
User avatar
Oliver
Site Admin
 
Posts: 147
Joined: 10 Mar 2008 19:09

Re: Datafile is corrupt, data-index could not be read: %s;

Postby vk2him » 04 Feb 2010 16:25

Yes thanks, issue is now solved ... not sure how the datafile was corrupted, looks like it happened on 6th December at 1:30am as that's the date on the file ...

Thanks for the quick responses..
vk2him
 
Posts: 10
Joined: 15 Jul 2008 20:34


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron