oschwald / maxminddb-golang

MaxMind DB Reader for Go
ISC License
570 stars 99 forks source link

Issues with Invalid MMDB Error on Production Database #133

Closed teratipallysaitej closed 1 month ago

teratipallysaitej commented 4 months ago

I'm currently encountering an issue with the MaxMind DB reader. When I use it with a test MMDB, everything works as expected. However, when I switch to a production MMDB during runtime, I'm faced with an "invalid MMDB" error. Here's what I've already tried to troubleshoot the problem:

Updated the maxminddb Reader Library: Ensured I'm using the latest version of the reader library. Checked File Paths: Double-checked the file paths to ensure the production MMDB is correctly located and accessible.

Despite these checks, the issue persists. I'm looking for any insights or suggestions on what might be going wrong. Could there be compatibility issues with the production MMDB version, or am I missing something in my environment setup? Any advice or similar experiences shared would be greatly appreciated.

oschwald commented 4 months ago

It sounds like your MMDB is corrupt. What is the source of this file?

teratipallysaitej commented 4 months ago

we are pulling from official maxminddb of download.maxminddb.com and providing the licensekey

oschwald commented 4 months ago

The official MaxMind databases are verified using this reader. It seems unlikely that it would not be able to read them. It sounds like your database was corrupted at some point or is otherwise invalid (e.g., maybe the file needs to be decompressed?). I would compare the sha256 against the ones MaxMind published.

teratipallysaitej commented 4 months ago

i will compare the sha256 then, thanks for the information