rtor
September 7, 2012, 4:42pm
1
Hi,
I’m having troubles with running import script.
~/usr-64/python-2.6/bin/python2.6 /var/www/html/piwik/misc/log-analytics/import_logs.py --url=localhost /tmp/site1_daily.log --idsite=2 --recorders=6 --enable-http-redirects --enable-static --output=/tmp/site1
/tmp/site1 contains
Fatal error: Authorization Required
Apache log file for script execution:
127.0.0.1 - - [07/Sep/2012:12:41:42 -0400] “POST / HTTP/1.1” 401 401
127.0.0.1 - - [07/Sep/2012:12:41:44 -0400] “POST / HTTP/1.1” 401 401
127.0.0.1 - - [07/Sep/2012:12:41:46 -0400] “POST / HTTP/1.1” 401 401
piwik itself works fine on this server. import_logs.py is executed on the same machine. I also tried --user and --password, but it doesn’t make a difference either.
rtor
September 7, 2012, 7:59pm
2
My bad, authentication was required by AuthType Basic. Now api seems to be working.
~/usr-64/python-2.7.3/bin/python2.7 /var/www/html/piwik/misc/log-analytics/import_logs.py --url=localhost /tmp/site1_daily.log --idsite=2 --enable-http-redirects --enable-static
0 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
Parsing log /tmp/site1_daily.log…
3948 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
7991 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
12042 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
16203 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
Fatal error:
You can restart the import of “/tmp/site1_daily.log” from the point it failed by specifying --skip=0 on the command line.
What does “Fatal Error” mean?
matthieu
(Matthieu Aubry)
September 8, 2012, 1:34am
3
Do you see any error in your error logs ?
Indeed the error reporting should be better when HTTP_AUTH is required, if you can submit a patch we will be grateful