[GH-ISSUE #98] little issue with geoipcity #67

Open
opened 2026-02-28 14:16:11 +03:00 by kerem · 1 comment
Owner

Originally created by @cxfcxf on GitHub (Sep 20, 2016).
Original GitHub issue: https://github.com/abh/geodns/issues/98

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?

Originally created by @cxfcxf on GitHub (Sep 20, 2016). Original GitHub issue: https://github.com/abh/geodns/issues/98 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?
Author
Owner

@suedadam commented on GitHub (Feb 19, 2017):

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

<!-- gh-comment-id:280930354 --> @suedadam commented on GitHub (Feb 19, 2017): 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 in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/geodns#67
No description provided.