GeoIP2 updater failing to unzip

My maxmind location database has never been updated, Matomo always fails with this error log:

GeoIP2AutoUpdater: failed to unzip ‘…/matomo/tmp/latest/GeoIP2-City.mmdb.tar.gz.download’ after downloading ‘https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&account_id=…&license_key=…&suffix=tar.gz’: Couldn’t list content for …/matomo/tmp/latest/GeoIP2-City.mmdb.tar.gz.download’: Invalid block size : 20 [Query: ?token_auth=removed, CLI mode: 0]

Matomo is installed on a shared hosting webspace. The Maxmind database download link set up in Matomo works when downloading manually, it’s using the account ID and license key correctly. There seems to be a 20B small download file in the temp/latest folder, so Matomo seems to try to download but fails. The temp folder has 755 permissions.

Any ideas on what is going wrong? I assume it has to be a permission thing…


Hi,

Can you check the URL on your end where Matomo is downloading it from?
20 Bytes sounds a lot as if Matomo was not getting a ZIP file, but some error message instead (maybe open the .download file in a text editor)

Hi Lukas, thanks for the reply :slight_smile:

yes, I’m able to use the download link set up in the Matomo Geolocation settings on my Mac. It downloads a perfectly fine 35,3 MB tar.gz file that contains a perfectly fine 73,1 MB mmdb file.


So either Maxmind blocks the server Matomo is running on, or it’s a Matomo or directory permission issue. Having the tar.gz archive format is ok, right? Because you were metioning a zip file.

Hi,

Having a .tar.gz is fine, I wasn’t sure of the format.

Maybe check the 20 Byte response you got before. It might contain the error message the server responds to Matomo

Issue found and fixed: There was an unwanted space before the account ID in the download url. My browser seems to be more error-tolerant and auto-fixed it, therefore the URL worked in the browser but not in Matomo. Removing the space I got my first successful GeoIp update:

Stupid mistake that I should have checked before asking here. Thanks for your support, Lukas!

1 Like

Maxmind uses the new rules for updating and installing the database