Closed dmakhalfeh closed 7 months ago
the crontab script should be changed according the documentation of maxmind ...
What made you come to that conclusion?
I just tested it locally and the script works just fine. Make sure you entered the license correctly and that your container does not have networking issues
try to run the script /etc/periodic/weekly/libmaxminddb check what you get?
I told you I just did, and it worked with no issues. Being able to ping google says nothing about whether it can resolve or reach the maxmind server, or whether it's inputting a valid license key into the url
Hello
I have the same problem:
Applying the maxmind mod... Downloading GeoIP2 City database. tar: short read Applied the maxmind mod [custom-init] No custom files found, skipping... [ls.io-init] done. nginx: [emerg] MMDB_open("/config/geoip2db/GeoLite2-City.mmdb") failed - Error opening the specified MaxMind DB file in /config/nginx/maxmind.conf:1
Check the output of docker exec swag cat /etc/libmaxminddb.cron.conf
and make sure the values look correct. Here's what mine looks like:
# Database files to download
# MAXMINDDB_FILES="GeoLite2-City.mmdb"
# Database download directory
# MAXMINDDB_URL="https://download.maxmind.com/app/geoip_download"
# Local target directory
# MAXMINDDB_LIBDIR="/var/lib/libmaxminddb"
# MaxMind license key, can be retrieved through https://www.maxmind.com/en/geolite2/signup
MAXMINDDB_LICENSE_KEY="4UseREDACTEDzAFTL"
Something's not adding up here. The whole db download script is managed by the alpine package, source here: https://gitlab.alpinelinux.org/alpine/aports/-/blob/3.19-stable/main/libmaxminddb/libmaxminddb.cron?ref_type=heads
It's supposed to download the GeoLite2-City
database. But your curl output is referencing the GeoLite2-Country
so I'm not sure what you're posting or where those entries are coming from.
Please post a full compose yaml for your SWAG (or docker run) along with a full container log so we can see what's going on.
And make sure you're not including the characters <
and >
in your license key value.
If the characters <
and >
are in that file, that means you incorrectly set the env var and that's your issue. The var needs to be set to just the api key, nothing else
You're comparing apples and oranges. Do the things I asked above.
everything is good with container_name: geoipupdate
We're having failure to communicate and this issue has gone off the rails.
Closing.
If you're still having issues with the maxmind mod, you can open a new issue but make sure to include a full compose yaml or docker run for SWAG, along with a full container log.
@aptalca i got the same issue. I think might be related to redirects
curl "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key={MY_KEY}&suffix=tar.gz" -o "./GeoLite2-City.mmdb.tar.gz" gives me empty tar ---> tar: short read
curl -L "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key={MY_KEY}&suffix=tar.gz" -o "./GeoLite2-City.mmdb.tar.gz" works
libmaxminddb-1.7.1-r0 -- i had issue in libmaxminddb-1.9.1-r0 -- in this version -L flag is in the script
i fixed with
sed -i 's/curl --silent/curl --silent -L/g' /etc/periodic/weekly/libmaxminddb && \
libmaxminddb (1.7.1-r2)
Downloading GeoIP2 City database.
tar: short read