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

little issue with geoipcity #98

Open
cxfcxf opened this issue Sep 20, 2016 · 1 comment
Open

little issue with geoipcity #98

cxfcxf opened this issue Sep 20, 2016 · 1 comment

Comments

@cxfcxf
Copy link

cxfcxf commented Sep 20, 2016

the default open type for geoip city is geoip.GEOIP_CITY_EDITION_REV1,
with old GeoIPCity.dat, it will say
Could not open city GeoIP database: Didn't open GeoIP database (2),
digging through it is just assume using GEOIP_CITY_EDITION_REV1
MaxMind still supports old one, which we regularly update.

easy fix is just alter code at geoip.go and change it to be geoip.GEOIP_CITY_EDITION_REV0 or 6

maybe we should give options on configration file for this?

@suedadam
Copy link

Just ran into this myself. Here's what I found on how to fix it, these commands will download the databases from http://dev.maxmind.com/geoip/legacy/geolite/ and rename them appropriately:

wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz -O /usr/share/GeoIP/GeoLiteCity.dat.gz && gunzip --force /usr/share/GeoIP/GeoLiteCity.dat.gz;mv /usr/share/GeoIP/GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat

for ASNs:

wget http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz -O /usr/share/GeoIP/GeoIPASNum.dat.gz && gunzip --force /usr/share/GeoIP/GeoLiteCity.dat.gz

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

No branches or pull requests

2 participants