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

Enable basic sanity check for new database files #30

Open
DimitriHautot opened this issue Jun 23, 2017 · 3 comments
Open

Enable basic sanity check for new database files #30

DimitriHautot opened this issue Jun 23, 2017 · 3 comments

Comments

@DimitriHautot
Copy link

DimitriHautot commented Jun 23, 2017

Hello,

A couple of days ago, I encountered an exception on every get(InetAddress) method call on a GeoIP2 City database file, dated from June 11, 2017:
capture d ecran 2017-06-18 a 00 00 28

For now, I don't see any (public) method that could allow some sanity check on a database file.

The MD5 hash computed on the downloaded file was matching the one available on your web site.

Appart from testing a new database file with some values, how could we ensure that we can safely switch to a valid database?
For production systems, this is very important.

Thanks,

Dimitri

@oschwald
Copy link
Member

If you want to verify a database, I would suggest using mmdbverify. If you just want a basic sanity check and you have already checked the MD5 of the download, I would suggest just opening the database and reading an IP address from it.

For Java users, the most frequent source of "invalid" database is not disabling binary filtering when deploying with Maven.

@DimitriHautot
Copy link
Author

Thanks for the suggestions @oschwald .

  1. mmdbverify is nice, but difficult to integrate in our automatic, all Java-based setup.
  2. Using a "probation" mode where both old & new database files are used is easier in our case.
  3. The Maven deployment is not relevant to us, but glad to hear about it.

We will probably go for suggestion n°2.

By any chance, do you foresee porting mmdbverify to Java ?

@oschwald
Copy link
Member

I am not sure if we will port mmdbverify to Java. We primarily use it internally and have not seen much customer interest in such a tool.

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

No branches or pull requests

2 participants