Well I’m stuck. I think I’m set up correctly, but I’m getting a 401 error for the MaxMind DB downloads.
I’m on a standard install, self-hosted & current.
I created an account at MaxMind, and added a new license key.
I edited the ENV section of app.yml to:
## The maxmind geolocation IP address key for IP address lookup
## see https://meta.discourse.org/t/-/137387/23 for details
DISCOURSE_MAXMIND_ACCOUNT_ID: [my account ID]
DISCOURSE_MAXMIND_LICENSE_KEY: [my license key]
…then ran ./launcher rebuild app
On rebuild, these “401 Unauthorized” errors were logged:
MaxMind database GeoLite2-City download failed. : OpenURI::HTTPError : 401 Error
MaxMind database GeoLite2-ASN download failed. : OpenURI::HTTPError : 401 Error
(… and of course no DB files got to my /var/www/discourse/vendor/data)
Per this suggestion I used a command found at the MaxMind Developer Portal – with the very same credentials – to directly download a database:
curl -O -J -L -u [my account ID]:[my license key] \
'https://download.maxmind.com/geoip/databases/GeoLite2-City/download?suffix=tar.gz'
…which worked fine.
What might I be missing to cause a 401 when connecting from Discourse?