Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoIPAutoUpdater: The downloaded file is not a valid GeoIP database. #10702

Closed
Erulezz opened this issue Oct 6, 2016 · 1 comment
Closed
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.

Comments

@Erulezz
Copy link

Erulezz commented Oct 6, 2016

I am using the MaxMind Lite GeoIP database and have the automatic renewal cronjob running. When the task to renew and download the new database is finished i see the following issue in the logs;

INFO [2016-10-05 00:30:43] GeoIPAutoUpdater: successfully downloaded 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
INFO [2016-10-05 00:30:43] GeoIPAutoUpdater: Encountered PHP error when testing newly downloaded GeoIP database: 2: include(): Failed opening '/home/piwik/domains/*/public_html/analytics/tmp/cache/tracker/piwikcache_Translations-en-9d91d4835a6f247e9b6d9fc7eac1a1b01f7fc264.php' for inclusion (include_path='/home/piwik/domains/*/public_html/analytics/vendor/pear/pear_exception:/home/piwik/domains/*/public_html/analytics/vendor/pear/console_getopt:/home/piwik/domains/*/public_html/analytics/vendor/pear/pear-core-minimal/src:/home/piwik/domains/*/public_html/analytics/vendor/pear/archive_tar:.:/usr/local/php70/lib/php') on line 112 of /home/piwik/domains/*/public_html/analytics/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php.

ERROR [2016-10-05 00:30:43] /home/piwik/domains/*/public_html/analytics/plugins/UserCountry/GeoIPAutoUpdater.php(161): GeoIPAutoUpdater: failed to unzip '/home/piwik/domains/*/public_html/analytics/misc/GeoIPCity.dat.dat.gz' after downloading 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz': The downloaded file is not a valid GeoIP database. Please re-check the URL or download the file manually.

When the new cronjob is finished (30 min later) i see this in the logs;

INFO [2016-10-05 01:00:08] Scheduler: executing task Piwik\Plugins\UserCountry\GeoIPAutoUpdater.update...
INFO [2016-10-05 01:00:08] GeoIPAutoUpdater: successfully downloaded 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
INFO [2016-10-05 01:00:08] GeoIPAutoUpdater: successfully updated GeoIP database 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
INFO [2016-10-05 01:00:08] Scheduler: finished. Time elapsed: 0.444s

So this time it is successful. When i check the logs again 30 min later I see that the GeoLiteCity.dat.gz is downloaded again (3rd time):

INFO [2016-10-05 01:30:03] Scheduler: executing task Piwik\Plugins\UserCountry\GeoIPAutoUpdater.update...
INFO [2016-10-05 01:30:03] GeoIPAutoUpdater: successfully downloaded 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
INFO [2016-10-05 01:30:03] GeoIPAutoUpdater: successfully updated GeoIP database 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
INFO [2016-10-05 01:30:03] Scheduler: finished. Time elapsed: 0.447s

So the first time it is failing, second time it is successful and the third time it is downloading the file again. After all this the GeoIP database is functioning properly. This happened last month also.

Looking at the filename to unzip the first time: GeoIPCity.dat.dat.gz - there is an extra .dat in the filename.

Software:

  • Latest Piwik version
  • PHP 7.0.11
  • MariaDB 10.1.18
  • Nginx 1.11.4
@Erulezz
Copy link
Author

Erulezz commented Oct 6, 2016

Also described here; #9544

@mattab mattab closed this as completed Nov 12, 2016
@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label Nov 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

2 participants