티스토리 뷰
빅데이터/redis
[redis] Error accepting a client connection: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca 오류
hs_seo 2022. 7. 21. 23:00redis에 TLS 설정을 적용하는데 서버에서 다음과 같은 오류가 계속 발생하였습니다.
Error accepting a client connection: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca
원인
원인은 redis 서버에 적용된 인증서가 올바르지 않아서 CA 인증서에 오류가 있어서 였습니다.
저는 crt 타입의 인증서를 이용하여 CA 인증서가 빠져 있었습니다. 그래서 redis 서버가 실행되고, TLS가 적용은 되었는데 CA 인증을 받지 못하여 오류가 발생하였습니다.
pem 타입의 인증서를 신규로 발급받고, CA 인증서까지 적용하여 문제를 해결할 수 있었습니다.
해결방법
CA 인증서를 확인합니다. 다음 명령어로 확인했을 때 CA:True 옵션을 확인할 수 있어야 합니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 인증서 정보에서 확인할 수 있어야 함 | |
$ openssl x509 -in CertCA.pem -text | |
Certificate: | |
Data: | |
Version: 3 (0x2) | |
... | |
X509v3 Basic Constraints: critical | |
CA:TRUE, pathlen:0 | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# redis server 실행 | |
# cert-file 은 서버 인증서 | |
# ca-cert-file 은 CA 인증서 | |
/home/deploy/logan/redis-6.2.6-tls/src/redis-server \ | |
/home/deploy/logan/redis-6.2.6-tls/redis.conf \ | |
--tls-port 6379 --port 0 \ | |
--tls-cert-file /home/deploy/logan/redis-6.2.6-tls/crt/pem/cert.pem \ | |
--tls-key-file /home/deploy/logan/redis-6.2.6-tls/crt/pem/key.pem \ | |
--tls-key-file-pass password \ | |
--tls-ca-cert-file /home/deploy/logan/redis-6.2.6-tls/crt/pem/CertCA.pem \ | |
--tls-ca-cert-dir /home/deploy/logan/redis-6.2.6-tls/crt/pem/ | |
# 클라이언트 접근 | |
/home/deploy/logan/redis-6.2.6-tls/src/redis-cli -h $(hostname -i) -p 6379 \ | |
--tls \ | |
--cert /home/deploy/logan/redis-6.2.6-tls/crt/pem/cert.pem \ | |
--key /home/deploy/logan/redis-6.2.6-tls/crt/pem/key.pem |
반응형
'빅데이터 > redis' 카테고리의 다른 글
[redis] redis 에 TLS 적용후 airflow 브로커 연결 (0) | 2022.07.18 |
---|
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- emr
- Hadoop
- 오류
- bash
- error
- 알고리즘
- mysql
- SPARK
- hbase
- nodejs
- SQL
- 정올
- Python
- HDFS
- java
- AWS
- 하이브
- HIVE
- Linux
- 백준
- ubuntu
- oozie
- airflow
- yarn
- build
- S3
- 다이나믹
- Tez
- 하둡
- 파이썬
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함