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

GeoLite2 database not free anymore #596

Closed
MarcHagen opened this issue Jan 2, 2020 · 6 comments
Closed

GeoLite2 database not free anymore #596

MarcHagen opened this issue Jan 2, 2020 · 6 comments
Assignees
Labels
Milestone

Comments

@MarcHagen
Copy link

MarcHagen commented Jan 2, 2020

How Shlink is set-up

  • Shlink Version: 1.21.0
  • PHP Version: 7.3.13
  • How do you serve Shlink: Self-hosted swoole
  • Database engine used: MariaDB

Summary

The URL http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz doesn't exist anymore.

More here: https://dev.maxmind.com/geoip/geoip2/geolite2/
Maybe including there package? https://maxmind.github.io/GeoIP2-php/

Current behavior

bin/cli visit:update-db results in [ERROR] An error occurred while updating GeoLite2 database

Expected behavior

How to reproduce

If i'm incorrect please let me know but upgrading doesn't work for me right now. Very annoying

@MarcHagen MarcHagen added the bug label Jan 2, 2020
@acelaya
Copy link
Member

acelaya commented Jan 2, 2020

Apparently, it continues being free, but they have changed how it has to be used.

I will have to investigate and find some workaround.

Thanks for letting me know about this and sorry for the inconveniences this might cause.

@MarcHagen
Copy link
Author

Ah fair enough, for now i changed the URL according to https://forum.matomo.org/t/maxmind-is-changing-access-to-free-geolite2-databases/35439/3

@jimmybrancaccio
Copy link

jimmybrancaccio commented Jan 2, 2020

Update: Nevermind, I should have checked my PHP error_log. memory_limit was too low. Adjusted to 128M and install is fine.

@MarcHagen Where did you change it? I'm trying to install Shlink now but even after updating the URL in:

./config/autoload/geolite2.global.php
./vendor/shlinkio/shlink-ip-geolocation/src/GeoLite2/GeoLite2Options.php

the installation fails. The URL I used is:

https://web.archive.org/web/20191227182209/https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz

Downloading GeoLite2 db... [Running "/opt/cpanel/ea-php73/root/usr/bin/php bin/cli visit:update-db"]   RUN  '/opt/cpanel/ea-php73/root/usr/bin/php' 'bin/cli' 'visit:update-db'
  ERR      0 [>---------------------------]    0 [->--------------------------]    0 [--->------------------------]    0 [----->----------------------]    0 [------->--------------------]    0 [--------->------------------]    0 [----------->----------------]    0 [------------->--------------]    0 [-------------->-------------]    0 [---------------->-----------]    0 [------------------>---------]    0 [-------------------->-------]    0 [---------------------->-----]    0 [------------------------>---]    0 [-------------------------->-]    0 [>---------------------------]    0 [->--------------------------]
  ERR   45933 [--->------------------------]
  ERR   226123 [----->----------------------]
  ERR   684805 [------->--------------------]
  ERR   1225405 [--------->------------------]
  ERR   1798764 [----------->----------------]
  ERR   2421267 [------------->--------------]
  ERR   3125680 [-------------->-------------]
  ERR   3912004 [---------------->-----------]
  ERR   4763855 [------------------>---------]
  ERR   5697617 [-------------------->-------]
  ERR   6746050 [---------------------->-----]
  ERR   7843625 [------------------------>---]
  ERR   8957584 [-------------------------->-]
  ERR   10055159 [>---------------------------]
  ERR   11038064 [->--------------------------]
  ERR   11726094 [--->------------------------]
  ERR   12840053 [----->----------------------]
  ERR   13954012 [------->--------------------]
  ERR   15067972 [--------->------------------]
  ERR   15985350 [----------->----------------]
  ERR   16149163 [------------->--------------]
  ERR   17459703 [-------------->-------------]
  ERR   18262411 [---------------->-----------]
  ERR   19097878 [------------------>---------]
  ERR   19949729 [-------------------->-------]
  ERR   20817956 [---------------------->-----]
  ERR   21686191 [------------------------>---]
  ERR   22587185 [-------------------------->-]
  ERR   23504563 [>---------------------------]
  ERR   24438326 [->--------------------------]
  ERR   25372079 [--->------------------------]
  ERR   26322225 [----->----------------------]
  ERR   27305130 [------->--------------------]
  ERR   28288027 [--------->------------------]
  ERR   29270932 [----------->----------------]
  RES  255 Command did not run successfully

@MarcHagen
Copy link
Author

Ah well i changed it to a local copy url, not the archive.org because it's officially not allowed by there terms. Sorry was not very specific about that

@acelaya acelaya added this to the 1.21.1 milestone Jan 2, 2020
@acelaya
Copy link
Member

acelaya commented Jan 2, 2020

You can use this URL in order to continue getting the latest DB file https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=G4Lm0C60yJsnkdPi&suffix=tar.gz.

I will publish a new patch release right away which will use this new URL.

@acelaya
Copy link
Member

acelaya commented Jan 2, 2020

I have just released v1.21.1, which includes the fix.

Thank you guys for reporting the issue and providing the info to find a solution 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants