Piwik log imports issues with 2.11.1


#1

Hi,

I installed the latest version 2.11.1 on our apache server with PHP 5.5.22 and mysql version 5.6.19. I created a piwik folder in htdocs and accessed it through browser http:/piwik for the install. But it gave me the list of files in htdocs/piwik directory. I had to click index.php to start the install. The install was complete without any errors. Now when I try to import log files using the .py script it gives me weird error. please see the details below

command : python /htdocs/piwik/misc/log-analytics/import_logs.py --url=http:///piwik/index.php --token-auth=xxx --idsite=1 --enable-static --enable-http-errors --enable-bots --enable-http-redirects --output=out.log &

Error: File “//htdocs/piwik/misc/log-analytics/import_logs.py”, line 1898, in
resolver = config.get_resolver()
File “//htdocs/piwik/misc/log-analytics/import_logs.py”, line 765, in get_resolver
return StaticResolver(self.options.site_id)
File “//htdocs/piwik/misc/log-analytics/import_logs.py”, line 1106, in init
’SitesManager.getSiteFromId’, idSite=self.site_id
File “//htdocs/piwik/misc/log-analytics/import_logs.py”, line 1089, in call_api
return cls._call_wrapper(cls._call_api, None, None, method, **kwargs)
File “//htdocs/piwik/misc/log-analytics/import_logs.py”, line 1078, in _call_wrapper
raise Piwik.Error(message)
main.Error: Piwik returned an invalid response:

Could someone please look into this and let me know if I am missing anything


(Matthieu Napoli) #2

Please see this guide: How to use Log Analytics tool - Analytics Platform - Matomo

The only required parameter is

–url=http://analytics.example.com

to specify the Piwik base URL. Then, you can specify one or many log files to import.

Don’t put /index.php in the URL.


#3

Hi Matt,

I tried that as well … this is the output

File “/htdocs/piwik/misc/log-analytics/import_logs.py”, line 765, in get_resolver
return StaticResolver(self.options.site_id)
File “/htdocs/piwik/misc/log-analytics/import_logs.py”, line 1106, in init
’SitesManager.getSiteFromId’, idSite=self.site_id
File “/htdocs/piwik/misc/log-analytics/import_logs.py”, line 1089, in call_api
return cls._call_wrapper(cls._call_api, None, None, method, **kwargs)
File “/htdocs/piwik/misc/log-analytics/import_logs.py”, line 1078, in _call_wrapper
raise Piwik.Error(message)
main.Error: Not Found

And I think this might be causing the issue… when you hit http:///piwik it should redirect to http:///piwik/index.php …Right ?? In my case it just gives me the page that I attached to this post.