Problem with log analytics

Hallo,
I m trying to import some log files with piwiks import_logs.py script. It works just fine and is an awesome tool but for some websites I get this error message:

Fatal error: didn’t receive the expected response. Response was

Piwik › Error <meta http-equiv="Conte.. And somewhere further down it says: No entry is registered for key 'config' <p>I tried versions 1.8.1, 1.8.2 and 1.8.2.beta and also read other posts with similar problems but didtn’t find no solution. I find it very confusing that it works for one website and doesn’t for another.<br> Thanks for your help</p>

Can you replicate the issue in having only 1 log line in a file that makes it fail ?

yes. just the same behavior. idsite=6 everything is fine. idsite=7 fatal error. Could this be connected to the regex I’m using? It should not, because it works fine with idsite=6. right?

don’t know if this helps, but I was importing a bunch of files to piwik, when I decided to archive data via command line. Since then it stoped working with idsite=7…

I just tryed to reproduce this behavior. I imported data to idsite=8 and as soon as I run archive.sh to archive data tho import-script stoped working proberly. Don’t know what this means. Maybe some conflict?

there shouldnùt be conflict, if you know how to reproduce we are very interested to see the problem :slight_smile:

To reproduce:

  1. Run import_logs.py to import some data (in my case I run it on many files automatically via a perl-script)
  2. While import_logs.py is running run archive.sh to archive the data

Result:

  • import_logs.py gives the fatal error I posted above and won’t import data to the site it was importing to no more

I just took another website and don’t run both scripts anymore at the same time. This solves the problem for me. But maybe you Piwik developers will want to investigate a little for robustness’ sake :wink:

by the way: when I am running import_logs.ps the archiving script archive.sh wont be triggered by the cronjob as usual. That means data is not at the actual state until import_logs.ps has finished and (after that) archive.sh has been executed by the cronjob. I only observed this behavior for the site I was importing data to, but non the less there should be further investigation on this case, by someone :slight_smile:

When you rrun the script, can you try to use archive.php instead of archive.sh ?
Do you observe the same problem (crash)?

Regarding the other point it is valid (the old reports are only deleted at the end of importing the logs)

sorry, I never used archive.php. How do I run it from command line?

See: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo

can’t do it because I have no rights to execute ‘su www-data’ on my server