@SlavikCA opened this Issue on February 5th 2020

I have Matomo 3.13.1
On Ubuntu 16.04
import_logs.py runs daily.
Today, the script ended with failed status with following error in the log:

INFO Scheduler: executing task Piwik\Plugins\GeoIp2\GeoIP2AutoUpdater.update...
INFO Downloading https://download.db-ip.com/free/dbip-city-lite-2020-02.mmdb.gz to /var/www/html/tmp/latest/DBIP-City.mmdb.gz.
INFO GeoIP2AutoUpdater: successfully downloaded 'https://download.db-ip.com/free/dbip-city-lite-2020-02.mmdb.gz'
WARNING /var/www/html/plugins/GeoIp2/GeoIP2AutoUpdater.php(302): Warning - copy(/var/www/html/tmp/latest/DBIP-City.mmdb.new): failed to open stream: No such file or directory - Matomo 3.13.1
WARNING /var/www/html/plugins/GeoIp2/GeoIP2AutoUpdater.php(303): Warning - unlink(/var/www/html/tmp/latest/DBIP-City.mmdb.new): No such file or directory - Matomo 3.13.1
WARNING /var/www/html/plugins/GeoIp2/GeoIP2AutoUpdater.php(308): Warning - unlink(/var/www/html/tmp/latest/DBIP-City.mmdb.gz): No such file or directory - Matomo 3.13.1
INFO GeoIP2AutoUpdater: successfully updated GeoIP 2 database 'https://download.db-ip.com/free/dbip-city-lite-2020-02.mmdb.gz'
...
Error: error or warning logs detected, exit 1
ERROR: Job failed: exit status 1
@sgiehl commented on February 6th 2020 Member

Does the same error occur when running the GeoIP update manually using:
./console scheduled-tasks:run "Piwik\Plugins\GeoIp2\GeoIP2AutoUpdater.update"

@tsteur commented on February 6th 2020 Member

@SlavikCA be also good to double check there is write permission for the target directory. I think the DB is written into $matomoDir/misc

@SlavikCA commented on February 6th 2020

I have that script running every night, as root:

sudo /var/www/html/console core:archive --force-all-websites --force-all-periods=315576000 --force-date-last-n=1000 --url=$PIWIK

So, it's not the permission issue.

I didn't make any changes on the system, but today same script worked without any errors:

INFO Scheduler: executing task Piwik\Plugins\GeoIp2\GeoIP2AutoUpdater.update...
INFO Downloading https://download.db-ip.com/free/dbip-city-lite-2020-02.mmdb.gz to /var/www/html/tmp/latest/DBIP-City.mmdb.gz.
INFO GeoIP2AutoUpdater: successfully downloaded 'https://download.db-ip.com/free/dbip-city-lite-2020-02.mmdb.gz'
INFO GeoIP2AutoUpdater: successfully updated GeoIP 2 database 'https://download.db-ip.com/free/dbip-city-lite-2020-02.mmdb.gz'
INFO Scheduler: finished. Time elapsed: 3.197s
...
Job succeeded
@SlavikCA commented on February 6th 2020

Also, just for the record, here are my folders and permissions:

root<a class='mention' href='https://github.com/piwik'>@piwik</a>:/home/slavik# ls -l /var/www/html/
...
drwxr-xr-x  9 www-data www-data   4096 Feb  6 08:16 misc
root<a class='mention' href='https://github.com/piwik'>@piwik</a>:/home/slavik# ls -al /var/www/html/misc
drwxr-xr-x  9 www-data www-data     4096 Feb  6 08:16 .
drwxr-xr-x 13 www-data www-data     4096 Dec 28 16:21 ..
drwxr-xr-x  2 www-data www-data     4096 Mar 29  2017 composer
drwxr-xr-x  2 www-data www-data     4096 Mar 29  2017 cron
-rw-r--r--  1 root     root     82492328 Feb  6 08:16 DBIP-City.mmdb
-rw-r--r--  1 www-data www-data 20539238 Mar 27  2018 GeoIPCity.dat
-rw-r--r--  1 root     root     61280973 Dec  4 08:09 GeoLite2-City.mmdb
...
@tsteur commented on February 6th 2020 Member

Thanks for letting us know @SlavikCA

This Issue was closed on February 6th 2020
Powered by GitHub Issue Mirror