개발노트
목록
[Certbot] Another instance of Certbot is already running : 오류 해결하기
SSLCertbotError
Server 2024.04.08 134 회 읽음
Server 24.04.08 134


이제는 SSL 인증서가 필수라서 서버를 새로 설치할 때 무조건 세팅하게 된다.

새로운 서버에 설치하다 보니 이전에 보지 못한 에러 메시지가 표시되어 해결 방법을 공유하고자 한다.


설치를 완료하고 명령을 입력하면 이미 다른 인스턴스가 이미 실행 중이다라고 나와서 진행이 안된다. Another instance of Certbot is already running. 

제거를 하고 다시 설치를 해도 동일한 메시지가 표시되는 걸 보니 설정 파일이 남아 있는 것 같다.

# certbot renew
Another instance of Certbot is already running.


인증서 발급에서 Lock이 걸린 원인을 찾아서 해당 명령어를 이용해서 삭제 해 준다. 

.certbot.lock 포함하는 모든 파일을 삭제하는 명령어라고 볼 수 있다.

find / -type f -name ".certbot.lock" -exec rm {} ;


삭제를 해도 오류가 발생하는 걸 보니 다른 요인이 있는 것 같아서 로그 파일을 확인 해 보았다.

# certbot certonly --apache -d wabang.biz

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Could not choose appropriate plugin: The requested apache plugin does not appear to be installed
ㅡThe requested apache plugin does not appear to be installed


로그를 확인해보니 Lock 문제로 인해 삭제 후 재 설치를 하여 해당 플러그인이 빠진 게 원인이었다.

yum -y install python2-certbot-apache mod_ssl




다시 certbot certonly --apache -d 명령어를 이용해서 도메인에 맞는 인증서 발급을 진행 해보았다.

#certbot certonly --apache -d wabang.biz
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices)
 (Enter 'c' to cancel): 
Invalid email address: .
If you really want to skip this, you can run the client with
--register-unsafely-without-email but you will then be unable to receive notice
about impending expiration or revocation of your certificates or problems with
your Certbot installation that will lead to failure to renew.
Enter email address (used for urgent renewal and security notices)
 (Enter 'c' to cancel): etocat@naver.com
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: N
Account registered.
Requesting a certificate for wabang.biz
Performing the following challenges:
http-01 challenge for wabang.biz
Waiting for verification...
Cleaning up challenges
IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/wabang.biz/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/wabang.biz/privkey.pem
   Your certificate will expire on 2024-06-03. To obtain a new or
   tweaked version of this certificate in the future, simply run
   certbot again. To non-interactively renew *all* of your
   certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:
   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le


위에 메시지가 표시된다면 인증서가 정상적으로 발급 되었다고 볼 수 있다.

워드프레스를 사용하는 사용자의 경우 이제는 SSL이 필수 조건이라서 서버를 직접 운영하는 경우 SSL을 설치 할 때 동일한 문제가 생기는 경우 락 파일을 삭제하면 된다.



목록