# Setting DISCOURSE\_MAXMIND\_LICENSE\_KEY breaks docker image/container build

**URL:** https://meta.discourse.org/t/setting-discourse-maxmind-license-key-breaks-docker-image-container-build/277564
**Category:** Self-hosting
**Tags:** maxmind
**Created:** [September 2, 2023, 1:37pm UTC](https://meta.discourse.org/t/setting-discourse-maxmind-license-key-breaks-docker-image-container-build/277564 "2023-09-02T13:37:59Z")
**Posts on this page:** 3
**Page:** 2

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [May 16, 2024, 12:41am UTC](https://meta.discourse.org/t/setting-discourse-maxmind-license-key-breaks-docker-image-container-build/277564/24 "2024-05-16T00:41:32Z")

</div>

> [@mentalstring](#):
>
> ```plaintext
> /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)
> 
> ```

> [@mentalstring](#):
>
> but including the DISCOURSE\_MAXMIND\_ACCOUNT\_ID made no difference for me as the rebuild still doesn’t finish (with latest stable)

I can’t reproduce this now and I wonder if this is because MaxMind was down?

 ![Screenshot 2024-05-16 at 6.11.02 AM](https://global.discourse-cdn.com/meta/original/4X/4/5/6/4563a321ccadd5f2d95ce10ad9c783262cd05884.png)

We will need to add better safe guards for when MaxMind fails to download.

> [@jomaxro](#):
>
> Edit: It appears that while the _rebuild_ was successful, MaxMind is not functional.

This has been fixed in

[https://github.com/discourse/discourse/pull/27043](https://github.com/discourse/discourse/pull/27043)

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [May 16, 2024, 1:15am UTC](https://meta.discourse.org/t/setting-discourse-maxmind-license-key-breaks-docker-image-container-build/277564/26 "2024-05-16T01:15:14Z")

</div>

Working for me after a rebuild - thanks!

---

<div class="post-metadata">

### Author: ![mentalstring](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mentalstring/32/168934_2.png) [@mentalstring](https://meta.discourse.org/u/mentalstring)
#### Post date: [May 16, 2024, 7:06pm UTC](https://meta.discourse.org/t/setting-discourse-maxmind-license-key-breaks-docker-image-container-build/277564/27 "2024-05-16T19:06:01Z")

</div>

> [@tgxworld](#):
>
> I can’t reproduce this now and I wonder if this is because MaxMind was down?

Not the case for me, as I’ve been having this problem for some weeks now.

Regardless, thank you @Firefishy and @tgxworld for [backporting the fix](https://github.com/discourse/discourse/pull/27040) into stable – I just did a rebuild and it’s working again with MaxMind. 👍

[Previous page](https://meta.discourse.org/t/setting-discourse-maxmind-license-key-breaks-docker-image-container-build/277564.md?page=1)
