Open cwilson1776 opened 5 months ago
Please report upstream.
Alpine controls the db updates
Reported: aports#15813
PR committed upstream !61320
I'm not sure what the process is from here: how long until a package with this fix is available on the alpine mirrors, how the swag-maxmind mod picks up that new package... and if any documentation updates are needed in this README.md...
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
I hit this too, as a workaround, I manually downloaded the GeoLite2-City
database to the shared config directory (/config/geoip2db
) and made sure it was extracted as GeoLite2-City.mmdb
That at least got my swag-maxmind
setup working
I hit this too, as a workaround, I manually downloaded the
GeoLite2-City
database to the shared config directory (/config/geoip2db
) and made sure it was extracted asGeoLite2-City.mmdb
Hey I did the same, however, I noticed that the GeoLite2-City.mmdb
does not auto reload after the duration mentioned in auto_reload
parameter of maxmind.conf
. Can you please confirm if this is the case for you as well?
Thanks
Hey just found out from Maxmind's documentation that they have put up a section for automated updating of their databases: https://dev.maxmind.com/geoip/updating-databases
Linking maxmind's GitHub repository for automatic database updates if anyone stumbles upon the same issue: https://github.com/maxmind/geoipupdate
We can map the volume to wherever swag maps /config/geoip2db/
folder on host machine. Hope this helps!!
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
With the current swag container 2.10.0 and maxmind-mod, the problem (tar: short read) still exists. The only thing that helps is the workaround, the manual download.
libmaxminddb
goaccess already installed, skipping
swag-auto-reload deps already installed, skipping
libmaxminddb already installed, skipping
libmaxminddb already installed, skipping
Applied the SWAG dashboard mod
Applying the maxmind mod...
Downloading GeoIP2 City database.
tar: short read
Applied the maxmind mod
[custom-init] No custom files found, skipping...
MOD Auto-reload: Watching the following files/folders for changes (excluding .sample and .md files):
/config/nginx
[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
Server ready
nginx: [emerg] MMDB_open("/config/geoip2db/GeoLite2-City.mmdb") failed - Error opening the specified MaxMind DB file in /config/nginx/maxmind.conf:1
Alpine's libmaxmind package was only fixed in 3.20. The issue will persist until SWAG is rebased on alpine 3.20, which will be soon
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
I can confirm that this issue is resolved in the latest version of SWAG as they rebased to Alpine 3.2, this resolved my issue with the exact same symptoms as above
I can also confirm that the error has been fixed with version 2.11.0-ls312 (Alpine 3.20).
Can confirm the same.
@cwilson1776 can you confirm this works for you too and close this issue?
Is there an existing issue for this?
833
but it was closed without resolution
Name of mod
swag-maxmind
Name of base container
swag
Current Behavior
swag | Downloading GeoIP2 City database. swag | tar: short read
Expected Behavior
swag | Downloading GeoIP2 City database. (success)
Steps To Reproduce
Configured maxmind as directed in compose.yml: DOCKER_MODS: linuxserver/mods:swag-maxmind MAXMINDDB_LICENSE_KEY: xxxxxx docker compose up -d swag docker compose logs -f swag shows that the download failed. It appears that MaxMind has recently (2024.02.07) changed their download policy, at least for new users(?):
From there, an additional link says that you now need to use a curl command similar to this:
curl -O -J -L -u YOUR_ACCOUNT_ID:YOUR_LICENSE_KEY 'https://download.maxmind.com/geoip/databases/GeoIP2-City-CSV/download?suffix=zip'
rather than what swag-maxmind uses:
curl --silent https://download.maxmind.com/app/geoip_download?edition_id=${EDITION_ID}&license_key=YOUR_LICENSE_KEY&suffix=tar.gz" -o "$TMPDIR/${filename}.tar.gz"
I'm not sure how to update the repo here to effect the following changes, but by making these within the container I was able to successfully download:
# MAXMINDDB_URL="https://download.maxmind.com/geoip/databases"
MAXMINDDB_USER_ID="..."
[ -z "$MAXMINDDB_URL" ] && MAXMINDDB_URL="https://download.maxmind.com/geoip/databases"
[ -z "$MAXMINDDB_USER_ID" ] && { echo "No MaxMind user id found; exiting. Please enter your user id into /etc/libmaxminddb.cron.conf"; exit 1; }
...
curl --silent -L -J -u "${MAXMINDDB_USER_ID}:${MAXMINDDB_LICENSE_KEY}" "${MAXMINDDB_URL}/${EDITION_ID}/download?suffix=tar.gz" -o "$TMPDIR/${filename}.tar.gz"
Environment
CPU architecture
x86-64
Docker creation
Container logs