# MaxMind 401 오류 -- 라이선스 키가 있는데 다운로드가 안 됩니다

**URL:** https://meta.discourse.org/t/maxmind-401-error-have-license-key-cant-download/388284
**Category:** Self-hosting
**Tags:** maxmind
**Created:** [11월 12, 2025, 5: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:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![ToddZ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toddz/32/328350_2.png) [@ToddZ](https://meta.discourse.org/u/ToddZ)
#### Post date: [11월 12, 2025, 5:07오후 UTC](https://meta.discourse.org/t/maxmind-401-error-have-license-key-cant-download/388284/1 "2025-11-12T17:07:13Z")

</div>

[Configure MAXMIND for reverse IP lookups](https://meta.discourse.org/t/configure-maxmind-for-reverse-ip-lookups/173941)의 지시에 따라 설정을 완료한 것으로 생각되지만, MaxMind DB 다운로드 시 401 오류가 발생합니다.

표준 설치 환경이며, 자체 호스팅(self-hosted) 및 최신 버전으로 유지하고 있습니다.  
MaxMind에서 계정을 생성하고 새로운 라이선스 키를 추가했습니다.

app.yml의 ENV 섹션을 다음과 같이 수정했습니다:

```yml
  ## 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]

```

…그 후 `./launcher rebuild app`을 실행했습니다.

재빌드 과정에서 다음과 같은 “401 Unauthorized” 오류가 기록되었습니다:

```plaintext
MaxMind database GeoLite2-City download failed. : OpenURI::HTTPError : 401 Error
MaxMind database GeoLite2-ASN download failed. : OpenURI::HTTPError : 401 Error

```

(…물론 `/var/www/discourse/vendor/data`에 DB 파일이 저장되지 않았습니다)

[이 제안](https://meta.discourse.org/t/ip-location-address-related/258323/5?u=toddz)에 따라 [MaxMind Developer Portal](https://dev.maxmind.com/geoip/updating-databases/?lang=en#directly-downloading-databases)에서 찾은 명령어를 동일한 자격 증명을 사용하여 데이터베이스를 직접 다운로드했습니다:

```bash
curl -O -J -L -u [my account ID]:[my license key] \
'https://download.maxmind.com/geoip/databases/GeoLite2-City/download?suffix=tar.gz'

```

…이것은 정상적으로 작동했습니다.

Discourse에서 연결할 때 401 오류가 발생하는 원인이 무엇일까요?

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [11월 20, 2025, 8:27오후 UTC](https://meta.discourse.org/t/maxmind-401-error-have-license-key-cant-download/388284/2 "2025-11-20T20:27:03Z")

</div>

이 주제는 아무도 관심을 보이지 않는 것 같아요! 혹시 해결하셨나요?

---

<div class="post-metadata">

### Author: ![ToddZ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toddz/32/328350_2.png) [@ToddZ](https://meta.discourse.org/u/ToddZ)
#### Post date: [11월 20, 2025, 9:27오후 UTC](https://meta.discourse.org/t/maxmind-401-error-have-license-key-cant-download/388284/3 "2025-11-20T21:27:33Z")

</div>

확인해 주셔서 감사합니다! 아니요, 아직 해결하지 못했습니다. 이후 업데이트와 재빌드 후에도 동일한 결과가 나왔습니다. 뭘 봐야 할지 모르겠네요… 🤷

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [12월 3, 2025, 3:15오전 UTC](https://meta.discourse.org/t/maxmind-401-error-have-license-key-cant-download/388284/4 "2025-12-03T03:15:01Z")

</div>

안녕하세요, 죄송합니다. 이 주제가 방치되고 있네요. 저도 이 부분에 대해 경험이 많지 않습니다. 리뷰 대기열에서 IP 조회 관련 문제를 겪고 계신 건가요? 아니면 걱정하지 않아도 되는 경고일 수도 있겠네요? 🤔

---

<div class="post-metadata">

### Author: ![ToddZ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toddz/32/328350_2.png) [@ToddZ](https://meta.discourse.org/u/ToddZ)
#### Post date: [12월 4, 2025, 12:16오전 UTC](https://meta.discourse.org/t/maxmind-401-error-have-license-key-cant-download/388284/5 "2025-12-04T00:16:18Z")

</div>

리뷰 대기열이 많지는 않지만, MaxMind DB가 없다면 이슈를 조사할 때 사용자 위치를 조회하는 것이 불가능할 것입니다. 그리고…

> [@pfaffman](#):
>
> 또한, [2.2.0.beta4](https://meta.discourse.org/t/discourse-2-2-0-beta4-release-notes/101272) 버전부터 Discourse는 이 정보를 사용하여 새로운 위치에서 로그인이 감지되면 관리자에게 알림을 보내는 데에도 사용하고 있습니다.

MaxMind DB 다운로드를 위한 연결에 문제가 있었는지, 아니면 저만 그런 건지 궁금합니다. 필요할 때까지는 알아채기 어려운 문제인 것 같습니다.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [12월 4, 2025, 6:05오전 UTC](https://meta.discourse.org/t/maxmind-401-error-have-license-key-cant-download/388284/6 "2025-12-04T06:05:14Z")

</div>

참고로 제 마이닝은 아직 잘 되는 것 같습니다. 🤷

불행히도 그 차이가 뭔지는 모르겠어요. 🤔

---

<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: [12월 6, 2025, 9: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:` 섹션에 설정이 잘못 들어 있지 않기를 바랍니다(붙여넣으신 주석 내용을 보면 올바른 위치에 있는 것으로 보이지만요). 만약 그렇다면 수정하기가 쉽습니다.

---

<div class="post-metadata">

### Author: ![ToddZ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toddz/32/328350_2.png) [@ToddZ](https://meta.discourse.org/u/ToddZ)
#### Post date: [12월 8, 2025, 3:07오전 UTC](https://meta.discourse.org/t/maxmind-401-error-have-license-key-cant-download/388284/8 "2025-12-08T03:07:43Z")

</div>

Jay, 감사합니다 – 위에 제시하신 문제 해결 단계를 모두 확인해 보니, 해당 부분을 확인하던 중 기존 설정을 정리하고 처음부터 다시 시작했습니다. 이번에는 Discourse가 MaxMind DB를 성공적으로 다운로드했고, 이제 IP 주소를 지리적으로 해석할 수 있습니다.

제 MaxMind 계정에 일시적인 오류가 있었거나, 원래 라이선스 키를 복사/붙여넣기할 때 실수가 있었을 것 같습니다.

다른 문제는 Jay님의 노력 덕분에 배제할 수 있었으므로, 이 내용을 해결책으로 표시하겠습니다. ✅

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [1월 7, 2026, 3:08오전 UTC](https://meta.discourse.org/t/maxmind-401-error-have-license-key-cant-download/388284/9 "2026-01-07T03:08:16Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
