GeoIP2 - Error Traversing Database
Using:
- GoAccess 1.9.4
- GeoLite2-City.mmdb and GeoLite2-ASN.mmdb from MaxMind.com
- Nginx logs (standard)
- Run command
sudo goaccess --ignore-crawlers --unknowns-as-crawlers nginx.log -o /myapp/goaccess.html --log-format=COMBINED - Configured in goaccess.conf:
geoip-database GeoLite2-City.mmdb, geoip-database/GeoLite2-ASN.mmdb
Receiving the following (and the Geolocating in the .html report is empty):
Error Traversing Database for ipnum = 176526339 - Perhaps the database is corrupt?
The error is repeated hundreds of times (with different numbers). I have tried different versions of GeoLite2. The report generated is otherwise fine.
Have you tried any of the mmdb from https://db-ip.com/db/lite.php?
Exact same outcome unfortunately.
On a related side-note, I was confused by the GoAccess documentation (https://goaccess.io/man), as it says:
If using GeoIP2, you will need to download the City/Country database from MaxMind and use the option --geoip-database to specify the database. Currently cities are only shown in the hosts panel (per host).
This made it sound like the MaxMind maps were mandatory.
Just to clarify:
-
In your config you’ve listed them as two separate entries, right?
geoip-database /path/GeoLite2-City.mmdb geoip-database /path/GeoLite2-ASN.mmdb -
Can you confirm you built GoAccess with
--enable-geoip=mmdb? -
Finally, could you comment out those lines in your config and instead pass the GeoIP option on the command line? For example:
$ sudo goaccess nginx.log --ignore-crawlers --unknowns-as-crawlers --log-format=COMBINED --geoip-database=/path/GeoLite2-City.mmdb -o /myapp/goaccess.html
Appreciate your assistance allinurl. Your step #2 was the answer - I had inadvertently built with --enable-geoip=legacy instead...
Maybe the error message could be updated to something like:
Error Traversing Database for ipnum = 176526339 - Perhaps the database is corrupt or goaccess was not built with the right --enable-geoip<legacy|mmdb> configuration?