[문제 발생]
라즈베리파이에서 nginx를 설치한 뒤, subdomain.iptime.org에 대한 SSL 인증서를 certbot을 통해 발급받으려고 하니 다음과 같은 오류가 발생했다.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for subdomain.iptime.org
An unexpected error occurred:
AttributeError: can't set attribute
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
[원인 분석]
우선, 해당 오류 메시지의 logfile을 확인하라고 해서 다음 명령어를 이용해 원인을 파악하고자 했다.
tail -200f /var/log/letsencrypt/letsencrypt.log
하지만, 해당 명령어를 이용하면 다음과 같은 오류가 발생한다.
tail: '/var/log/letsencrypt/letsencrypt.log'을(를) 읽기 용도로 열 수 없습니다: 허가 거부
때문에, 조금 전 사용했던 명령어 맨 앞에 sudo를 붙여 root 권한을 얻은 후, 해당 log 파일을 열고자 시도했다.
그랬더니 다음과 같은 오류 메시지를 로그 파일에서 발견할 수 있었다.
acme.messages.Error: urn:ietf:params:acme:error:rateLimited :: There were too many requests of a given type :: Error creating new order :: too many failed authorizations recently: see https://letsencrypt.org/docs/failed-validation-limit/
그래서 failed-validation-limit 이라는 키워드를 기반으로 Google 검색을 진행했고, 다음 사이트에 접속해서 원인을 파악할 수 있었다.
https://letsencrypt.org/docs/failed-validation-limit/
Failed Validation Limit - Let's Encrypt
Se på Dansk Voir en Français לעבור לעברית Ver em Português (do brasil) Переглянути українською 使用简体中文阅读本网页。 Description All issuance requests are subject to a Failed Validation limit of 5 failures
letsencrypt.org
호스트 이름 당, 시간 당 5회의 실패 검증 한도에 따라, 초과 시 ACME 클라이언트에서 위와 같은 오류 메시지를 받는다는 것이다.
[해결 과정]
명령어는 제대로 입력했고, nginx에서 80포트를 열어 두어야 python3-certbot-nginx 기반으로 SSL 인증서를 발급 받는 것을 확인하여 80포트가 정상적으로 열려있는지도 확인했다.
모두 정상이었음에도 불구하고 실패한 이유는 다음과 같았다.
*.iptime.org 도메인
기본적으로, 공유기에서 제공하는 iptime.org 도메인이 최상위이고, 나는 해당 도메인의 하위 도메인인 subdomain.iptime.org를 사용하는 데, 아이피타임 도메인 기반으로 이미 발급받은 SSL 인증서가 너무 많아서 신규 발급을 거부당하는 것이다.
바로, CAA record 오류.
해당 무료 도메인이 아닌, 다른 도메인을 이용해서 SSL 인증서를 발급받아야 한다.
그래서, duckdns.org를 통해 다른 무료 도메인에 대한 SSL 인증서를 발급 받았고,
fullchain.pem과 privkey.pem에 대한 인증서를 정상적으로 발급받았다.
'Programming > Linux + Cloud' 카테고리의 다른 글
[Docker] exec 명령어의 /bin/bash 오류 발생 시 해결 방법 (0) | 2024.07.26 |
---|