mirror of
https://github.com/abh/geodns.git
synced 2026-04-27 03:45:53 +03:00
[GH-ISSUE #98] little issue with geoipcity #356
Labels
No labels
bug
bug
enhancement
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/geodns#356
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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?
@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.datfor 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