When running a docker based install, and setting DISCOURSE_MAXMIND_LICENSE_KEY the image creation process aborts with this error:
/var/www/discourse/lib/discourse_ip_info.rb:48:in `mmdb_download': undefined method `path' for nil:NilClass (NoMethodError)
filename = File.basename(gz_file.path)
^^^^^
from /var/www/discourse/lib/tasks/maxminddb.rake:67:in `block (3 levels) in <main>'
from /var/www/discourse/lib/tasks/maxminddb.rake:65:in `each'
from /var/www/discourse/lib/tasks/maxminddb.rake:65:in `block (2 levels) in <main>'
When leaving DISCOURSE_MAXMIND_LICENSE_KEY empty, everything works fine.
Tested with versions: stable and tests-passed
The Maxmind license works â so both URLs provide access to the .mmdb files:
Just a guess (Iâm not a ruby guys; so please go easy on me) â maybe the â.mmdbâ extension causes problems in FileHelper.download(...) a couple of lines below :
Adding â.mmdbâ to the links provided above causes an Invalid edition ID error.
Since I have been having the same problem and can confirm that when clearing out the license key, my rebuild problems magically goes away.
I have even over a couple of days, tried my best to dig into the problem.
I think I have it right, but I might aswell be wrong.
During build, it seems like the mmdb files are missing, perhaps due to them not being present in the base image, or more likely, that they are being deleted and/or not even downloaded prior to them being loaded, hence the build failsâŚ
Come to think of it, mmdb_download being called points to code trying to download the file.
Iâve successfully downloaded the files manually (from the within the docker container) with wget, so the license is working as expected.
Got this notice when updating from main branch today:
Downloading MaxMindDB... MaxMind IP database updates require a license Please set DISCOURSE_MAXMIND_LICENSE_KEY to one you generated at https://www.maxmind.com MaxMind IP database updates require a license Please set DISCOURSE_MAXMIND_LICENSE_KEY to one you generated at https://www.maxmind.com
But never setup a license key for this, and donât know how to integrate those anyway.
Update still completed so this doesnât seem to be causing any problem, but may be some kind of a minor error.