Geolocation settings

we got a warning in our logs that a resource was unavailable and are not sure how to fix it. It was referencing the geolite2 database provided for free by MaxMind. Also, is there way way to manually run the GeoIP updater?

Hi,

Without the exact error (from the log) it is hard to guess.

You can run all scheduled tasks manually by running php console scheduled-tasks:run "Piwik\Plugins\GeoIp2\GeoIP2AutoUpdater.update" as the webserver user (so assuming a debian-like setup with sudo -u www-data ...).

Thanks for the response. We got the same warning the logs again after running the updater. Here is the message:
WARNING GeoIp2[2019-08-30 00:32:30 UTC] [cd2c0] E:\inetpub\wwwroot\sample.sample.edu\plugins\GeoIp2\GeoIP2AutoUpdater.php(270): Warning - unlink(E:\inetpub\wwwroot\sample.sample.edu/tmp/latest/GeoLite2-City.mmdb.new): Resource temporarily unavailable - Matomo 3.11.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)

(I edited the website URL just for security lol)

Hi,

Are you using some kind of uncommon file system?

Matomo is telling PHP to delete a file (unlink(E:\inetpub\wwwroot\sample.sample.edu/tmp/latest/GeoLite2-City.mmdb.new) and the filesystem/PHP responds that it can’t do it because Resource temporarily unavailable.

Can you try deleting the file yourself or find out why the file doesn’t want to be deleted?

Is the file by chance open in some program (I think unlike Linux, Windows doesn’t allow deleting opened files).

No, just basic Windows file system. I can delete the file manually, but why is it trying to delete that file, any idea?

Following the code:

Matomo does the following:

  • download the database
  • extract it in tmp/
  • call the new file tmp/latest/GeoLite2-City.mmdb.new
  • try to move the new file to the place of the old database
  • if it doesn’t work copy the file to the place of the old database and then delete the .new file.

Ok, I tried this. Will have to wait until tomorrow to see if it worked. Thanks

As I said yesterday, I tried the above procedure and now I am getting the same exact error in the logs as before. Is there anything else I can try?