diff --git a/troubleshooting/250914_admin_opensearch_installation.md b/troubleshooting/250914_admin_opensearch_installation.md index 6d7fd2d..418e647 100644 --- a/troubleshooting/250914_admin_opensearch_installation.md +++ b/troubleshooting/250914_admin_opensearch_installation.md @@ -146,15 +146,8 @@ Parsing failed. Reason: Missing argument for option: p ``` **원인**: bash -c 내부에서 변수 이스케이프 문제 -```bash -# 문제 코드 -bash -c "... hash.sh -p \"${OP_PASS}\" ..." -# 호스트가 ${OP_PASS} 해석 시도 → 빈 값 - -# 해결 -bash -c "... hash.sh -p \"\${OP_PASS}\" ..." -# 백슬래시로 이스케이프 → 컨테이너 내부에서 해석 -``` +- `${OP_PASS}`를 호스트가 먼저 해석하려 해서 빈 값이 됨 +- `\${OP_PASS}`로 이스케이프 필요 #### 2. 인증서 파일 누락으로 컨테이너 재시작 **원인**: docker-compose.yaml에 볼륨 마운트 없음 @@ -175,9 +168,32 @@ volumes: - 서버에서 직접 `docker compose up` 시 사용 불가 - Actions가 생성한 파일을 컨테이너에 마운트 필요 -### 해결 방안 -1. **개발환경**: Security 플러그인 비활성화 (`DISABLE_SECURITY_PLUGIN=true`) -2. **프로덕션**: 볼륨 마운트 추가 + 이스케이프 수정 + +## 현재 상태 (2025-09-14 최종 확인) + +### 헬스체크 실패 상황 +- **컨테이너 상태**: 계속 재시작 중 (Restarting) +- **포트 9200**: 리스닝 중이지만 응답 없음 +- **원인**: `/usr/share/opensearch/config/certs/root.pem` 인증서 파일 없음 +- **Actions 배포**: 성공으로 표시되지만 실제 컨테이너는 실패 + +### 문제 확인 +- Actions는 `docker compose up -d` 실행 후 종료 (백그라운드 실행) +- 컨테이너 상태를 확인하지 않아 "성공"으로 표시 +- 실제로는 인증서 누락으로 컨테이너 재시작 반복 + +### 근본적 해결책 + +**docker-compose.yaml에 볼륨 마운트 추가 필수** +```yaml +volumes: + - /var/lib/opensearch:/usr/share/opensearch/data + - ./certs:/usr/share/opensearch/config/certs:ro + - ./internal_users.yml:/usr/share/opensearch/config/opensearch-security/internal_users.yml:ro +``` + +Git Actions가 생성한 인증서와 비밀번호 파일을 컨테이너가 읽을 수 있도록 마운트해야 함. +현재 데이터 볼륨만 마운트되어 있어서 인증서를 찾지 못해 실패. ## 다음 단계 1. 인덱스 라이프사이클 정책 설정 (30일 보관)