I have been running import_logs.py on my website for about 6 months now and starting on 3/26 the script failed with the following error:
$ sudo python import_logs.py --url=https://piwik.mydomain.com /var/log/mylogfile.log --idsite=1 --enable-http-errors --enable-http-redirects > /dev/null
Fatal error: cannot get the main URL of this site: invalid site ID: 1
I’m sort of at a lost as to why it would failed all of a sudden. I’ve verified that the siteid is correct (I only own one website) and to make sure it is not a piwik version problem I just upgraded to version 2.1.0. Both piwik and my website run on https and my access logs generate about 5mb of data daily.
Have anyone had this problem before and can someone suggest how I can fix this?
I realized I didn’t have the latest version of Piwik on my server to run import_logs.py, so I upgraded the install there as well. Now I’m getting a DB connection timed out error:
I have values set in my config.ini.php for host, username, password, dbname, tables_prefix, and charset. I tried adding in “adapter = PDO_MYSQL”, “adapter=MYSQLI” and “adapter=PDO_PGSQL” to no avail.
I’ve verified that connection to my database is working properly and the permissions have not changed since I installed Piwik months ago.