EssentialsX

EssentialsX

2M Downloads

EssentialsGeoIP Exception at startup - build 580

smmmadden opened this issue ยท 7 comments

commented

[09:45:40] [Server thread/INFO]: [EssentialsGeoIP] Enabling EssentialsGeoIP v2.0.1-b580
[09:45:40] [Server thread/INFO]: Downloading GeoIP database... this might take a while (country: 1.7 MB, city: 30MB)
[09:45:44] [Server thread/ERROR]: Failed to read GeoIP database!
com.maxmind.db.InvalidDatabaseException: Could not find a MaxMind DB metadata marker in this file (Geo2-City.mmdb). Is this a valid MaxMind DB file?

Full Startup Log: https://pastebin.com/igQEUkP8 (Note that I used a Paid Version of Pastebin so they don't expire).
Minecraft Version: 1.12.2
Spigot Version 1.12.2 git-Spigot-9b8bba4-bdcc7c7 - 1.12.2-R0.1-SNAPSHOT
EssentialsX build 580
Plugins:
image
image

commented

Could you check the size of the downloaded GeoLite2 database files in plugins/EssentialsGeoIP?

commented
commented

sorry for delay, stepped out for a bit. Here's what I see in my server.
image

commented

The size of unpacked Geo2-City.mmdb should be 60mb. Check your config if download URLs are right. Once modified try delete the mmdb or download it manually from http://dev.maxmind.com/geoip/geoip2/geolite2/ (and don't forget to rename the file).

Check here for the correct URLs:
github.com/EssentialsX/Essentials/blob/2.x/EssentialsGeoIP/src/config.yml

I'm going to create a PR for config migration later on. And I will try to add checksum if I have time.

@smmmadden

commented

Thanks - that's not the url in the config.yml and i've never touched it to be honest. I've left the default as it was.
image
Downloading using the config.yml option directly, show the following sizes:
image
The link you provided, the file size is just over 60mb. However, adding it to the folder and restarted still tried to download the file even if I set it to false for download-if-missing probably due to the name being different. I renamed it to GeoI-City.mmdb and the server started up fine with no warnings.

commented

Yes the new GeoIP2 got different filename as default. Will make it clear in a new PR.

BTW the new download urls are:
Country: http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz
City: http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz

Make sure you change your config.yml accordingly. Yet I stongly suggest you replace the config with this one since I have add some new features (like auto update the db file).

commented

Thanks - I've replaced the config.yml with the recommended changes and also enabled show-cities. Can verify everything looks much better with the downloading and no more exceptions on startup.
Geo2-City.mmdb=61,525 KB