# MaxMind 401 错误 -- 有许可证密钥，无法下载

**URL:** <https://meta.discourse.org/t/maxmind-401-error-have-license-key-cant-download/388284>\
**Category:** Self-hosting\
**Tags:** maxmind\
**Created:** [2025年十一月12日 17:07 UTC](https://meta.discourse.org/t/maxmind-401-error-have-license-key-cant-download/388284 "2025-11-12T17:07:13Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2025年十二月6日 21:42 UTC](https://meta.discourse.org/t/maxmind-401-error-have-license-key-cant-download/388284/7 "2025-12-06T21:42:47Z")

</div>

它在我刚刚重建的网站上似乎可以正常工作。

我唯一的猜测是你的设置放错了位置（根据你提供的信息，这似乎不太可能）。

这是否像下面这样显示了你的 Maxmind 凭证？

```plaintext
root@figgy:/var/discourse# ./launcher enter app
root@figgy-spm:/# set|grep MAXM
DISCOURSE_MAXMIND_ACCOUNT_ID=12345
DISCOURSE_MAXMIND_LICENSE_KEY=mycoolkey
root@figgy-spm:/# grep maxm /var/www/discourse/config/discourse.conf
maxmind_license_key = 'mcoolkey'
maxmind_account_id = '12345'

```

所以你应该

```plaintext
./launcher enter app

```

```plaintext
set|grep MAXM

```

```plaintext
grep maxm /var/www/discourse/config/discourse.conf

```

你也可以检查 Rails 是否拥有它们（仍在容器内）：

```plaintext
rails c

```

然后

```plaintext
GlobalSetting.maxmind_account_id
GlobalSetting.maxmind_license_key

```

希望你的信息没有放在 `app.yml` 的 `env:` 部分（尽管你粘贴的评论表明它们在正确的位置），那样很容易修复。

---

_[View the full topic](https://meta.discourse.org/t/maxmind-401-error-have-license-key-cant-download/388284)._
