WhenDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/msimerson/maxmind-geolite-mirror/llms.txt
Use this file to discover all available pages before exploring further.
maxmind-geolite-mirror encounters a problem it prints a message to stderr and, for fatal errors, exits with code 1. The most productive first step is to run the tool interactively in your terminal so you can see both stdout and stderr in real time. The sections below cover the most common issues and their fixes.
Missing license key error
Missing license key error
Error message:Cause: Neither the Fix — config.js:Open
MAXMIND_LICENSE_KEY environment variable nor the license_key field in lib/config.js has been set. The tool requires a valid MaxMind license key to construct the download URL; without it, processing stops immediately.Fix — environment variable:lib/config.js inside the installed package and set the value directly:Permission denied writing to /usr/local/share/GeoIP/
Permission denied writing to /usr/local/share/GeoIP/
tar-stream package is not available
tar-stream package is not available
Error message:Cause: Fix — install in the package directory:After installing, re-run
tar-stream is an optional dependency. The tool requires it to extract .mmdb files from the downloaded .tar.gz archives. If it was not installed alongside the package, the extraction step fails.Fix — install globally:maxmind-geolite-mirror to resume downloads.404 Not Found for a database
404 Not Found for a database
Log output:Cause: The remote edition ID used to build the download URL does not match any database available on the MaxMind server. This can happen if an edition name has changed or been retired.Behavior: A Cross-reference the edition IDs against your MaxMind account portal to confirm which editions your license key grants access to.
404 response is not treated as a fatal error. The tool logs the message and continues to the next database in the list; it does not exit with code 1.Fix: Open lib/config.js and verify the remote field for each entry in geoIpDbs:Downloads always happen (no 304 responses)
Downloads always happen (no 304 responses)
Symptom: Every run downloads all databases regardless of whether MaxMind has published new data.Cause: The tool derives the
If-Modified-Since request header from the local file’s filesystem modification time (mtime). If the files were placed by an external process — for example via cp, rsync, or a manual touch — the mtime may be set to the current time rather than the time of the last MaxMind release, causing the server to return 200 every time.Explanation: On a successful download, the tool writes the .mmdb via an atomic rename of a .tmp file. The resulting mtime reflects the moment the download completed, which correlates closely with the last release date. Any other operation that rewrites the file will reset this timestamp.Fix: Allow maxmind-geolite-mirror to be the sole writer of files in the database directory. If you need to copy databases elsewhere, copy them out of the directory rather than into it, and avoid running touch on the files.Tool exits prematurely after first error
Tool exits prematurely after first error
Symptom: Only the first database is attempted; the remaining two are never downloaded. The tool exits with code Fix: Resolve the error reported on stderr before re-running. Because processing is serial, fixing the first error and re-running will pick up where things left off (all three databases are always evaluated from the start, but previously up-to-date files will be skipped via
1.Cause: Any fatal error during processing of a database — such as a network failure, a write error, or a missing license key — causes the tool to call process.exit(1) immediately. Databases that have not yet been processed are skipped.Log output:304).Running in cron does nothing
Running in cron does nothing
Symptom: The cron job runs on schedule (visible in system logs) but no databases are downloaded or updated and there is no output.Cause: cron does not source the user’s shell profile, so environment variables set in Fix — use a wrapper script and capture output:Redirecting stdout and stderr to a log file makes it straightforward to confirm whether the job ran successfully.
~/.bashrc, ~/.profile, or similar files — including MAXMIND_LICENSE_KEY — are not present in the cron job’s environment. Without a license key the tool exits immediately with an error, and without output redirection that error is silently discarded.Fix — pass env vars inline:wrapper.sh
If you encounter an issue not covered here, check the project’s GitHub issue
tracker: https://github.com/msimerson/maxmind-geolite-mirror/issues.
Search existing issues before opening a new one — your problem may already
have a documented solution or open fix.