Import error

I can’t seem to run the import script. Or rather the script doesn’t seem to connect tomysql (that’s my guess…)

i get this error:

Traceback (most recent call last):
File “/opt/xampp/htdocs/piwik/misc/log-analytics/import_logs.py”, line 1898, in
resolver = config.get_resolver()
File “/opt/xampp/htdocs/piwik/misc/log-analytics/import_logs.py”, line 765, in get_resolver
return StaticResolver(self.options.site_id)
File “/opt/xampp/htdocs/piwik/misc/log-analytics/import_logs.py”, line 1106, in init
’SitesManager.getSiteFromId’, idSite=self.site_id
File “/opt/xampp/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 “/opt/xampp/htdocs/piwik/misc/log-analytics/import_logs.py”, line 1078, in _call_wrapper
raise Piwik.Error(message)
main.Error: [Errno 145] Connection timed out

Hi there,

Actually it looks like the script cannot contact your Piwik API server. Can you check that you can contact the PiwiK API from this box?

So I realized that maybe I was pointing the website portion of my shell command at the wrong location so I have changed the url to point at the domain on which we have loaded piwik. But I get this:

root@tracker:/opt/xampp# python /opt/xampp/htdocs/piwik/misc/log-analytics/import_logs.py --url=http://nettracker.usurf.usu.edu --idsite=1 --recorders=4 --enable-http-errors --enable-http-redirects --enable-static --enable-bots --log-format-name=ncsa_extended /mnt/weblogarchive/intra/temp2.log
Traceback (most recent call last):
File “/opt/xampp/htdocs/piwik/misc/log-analytics/import_logs.py”, line 1898, in
resolver = config.get_resolver()
File “/opt/xampp/htdocs/piwik/misc/log-analytics/import_logs.py”, line 765, in get_resolver
return StaticResolver(self.options.site_id)
File “/opt/xampp/htdocs/piwik/misc/log-analytics/import_logs.py”, line 1106, in init
’SitesManager.getSiteFromId’, idSite=self.site_id
File “/opt/xampp/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 “/opt/xampp/htdocs/piwik/misc/log-analytics/import_logs.py”, line 1078, in _call_wrapper
raise Piwik.Error(message)
main.Error: [Errno 8] node name or service name not known
root@tracker:/opt/xampp#

Check that the server you’re running the script on can actually access your PIwik server via HTTP? eg. try a wget or so

Thanks, I had specified https and had forgotten to configure https support!