문제 해결
이 섹션에서는 온프레미스 버전 사용 시 발생할 수 있는 문제들에 대해 설명합니다.
일반적인 문제 및 해결 방법
Section titled “일반적인 문제 및 해결 방법”1. 라이선스 관련 문제
Section titled “1. 라이선스 관련 문제”문제: 라이선스 만료 오류
Section titled “문제: 라이선스 만료 오류”ERROR: License expired. Please contact support.
해결 방법:
-
라이선스 만료 확인
Terminal window kubectl logs -l app=doverunner-api -n doverunner | grep -i license -
새 라이선스 적용
Terminal window # 새 라이선스 파일로 Secret 업데이트kubectl create secret generic doverunner-license \--from-file=license.key=./new-license.key \--namespace=doverunner \--dry-run=client -o yaml | kubectl apply -f -# Pod 재시작kubectl rollout restart deployment/doverunner-api -n doverunner
문제: 잘못된 패키지명으로 인한 인증 실패
Section titled “문제: 잘못된 패키지명으로 인한 인증 실패”ERROR: Package 'com.example.app' not registered in license
해결 방법:
-
등록된 패키지명 확인
- DoveRunner Mobile App Security 지원팀에 등록된 패키지명 목록 요청
- 앱의 실제 패키지명과 비교
-
패키지명 추가 요청
- 새 패키지명을 라이선스에 추가 요청
- 임시로 테스트 패키지명 사용 가능 여부 확인
2. 연결 및 네트워크 문제
Section titled “2. 연결 및 네트워크 문제”문제: 데이터베이스 연결 실패
Section titled “문제: 데이터베이스 연결 실패”ERROR: Unable to connect to MySQL database
해결 방법:
-
데이터베이스 상태 확인
Terminal window kubectl get pods -l app=mysql -n doverunnerkubectl logs -l app=mysql -n doverunner --tail=50 -
연결 정보 확인
Terminal window kubectl get secret mysql-credentials -o jsonpath='{.data}' -n doverunner -
네트워크 연결 테스트
Terminal window kubectl run mysql-test --image=mysql:8.0 --rm -it --restart=Never \-- mysql -h mysql.doverunner.svc.cluster.local -u root -p
문제: ElasticSearch 연결 실패
Section titled “문제: ElasticSearch 연결 실패”ERROR: Failed to connect to ElasticSearch cluster
해결 방법:
-
ElasticSearch 클러스터 상태 확인
Terminal window kubectl exec -it elasticsearch-0 -n doverunner -- curl -X GET "localhost:9200/_cluster/health?pretty" -
인덱스 상태 확인
Terminal window kubectl exec -it elasticsearch-0 -n doverunner -- curl -X GET "localhost:9200/_cat/indices?v" -
로그 확인
Terminal window kubectl logs elasticsearch-0 -n doverunner --tail=100
3. 성능 관련 문제
Section titled “3. 성능 관련 문제”문제: 실링 작업이 너무 느림
Section titled “문제: 실링 작업이 너무 느림”WARNING: Sealing job taking longer than expected
해결 방법:
-
리소스 사용량 확인
Terminal window kubectl top pods -n doverunnerkubectl describe pod -l app=doverunner-sealing -n doverunner -
리소스 제한 증가
# values.yaml 수정sealingServer:resources:requests:cpu: "4"memory: "8Gi"limits:cpu: "8"memory: "16Gi" -
스케일링
Terminal window kubectl scale deployment doverunner-sealing --replicas=5 -n doverunner
문제: 메모리 부족으로 인한 Pod 재시작
Section titled “문제: 메모리 부족으로 인한 Pod 재시작”ERROR: Pod killed due to OOM (Out of Memory)
해결 방법:
-
메모리 사용량 모니터링
Terminal window kubectl top pods -n doverunner --sort-by=memory -
JVM 메모리 설정 조정
env:- name: JAVA_OPTSvalue: "-Xms2g -Xmx6g -XX:+UseG1GC" -
노드 리소스 확인
Terminal window kubectl describe nodeskubectl get nodes -o wide
4. 로그 수집 문제
Section titled “4. 로그 수집 문제”문제: 로그가 ElasticSearch에 저장되지 않음
Section titled “문제: 로그가 ElasticSearch에 저장되지 않음”WARNING: No logs received in the last 10 minutes
해결 방법:
-
Logstash 상태 확인
Terminal window kubectl logs -l app=logstash -n doverunner --tail=50 -
입력 포트 확인
Terminal window kubectl exec -it logstash-0 -n doverunner -- netstat -tlnp -
ElasticSearch 인덱스 확인
Terminal window curl -X GET "elasticsearch:9200/_cat/indices?v"
문제: 로그 파싱 오류
Section titled “문제: 로그 파싱 오류”ERROR: Failed to parse log message
해결 방법:
-
Logstash 구성 검증
Terminal window kubectl exec -it logstash-0 -n doverunner -- \/usr/share/logstash/bin/logstash --config.test_and_exit \--path.config=/usr/share/logstash/pipeline/ -
샘플 로그 테스트
Terminal window echo '{"timestamp":"2024-01-01T00:00:00Z","level":"INFO","message":"test"}' | \curl -X POST -H "Content-Type: application/json" \-d @- http://logstash:8080/
5. 인증 및 권한 문제
Section titled “5. 인증 및 권한 문제”문제: API 호출 시 401 Unauthorized
Section titled “문제: API 호출 시 401 Unauthorized”ERROR: 401 Unauthorized - Invalid API key
해결 방법:
-
API 키 확인
Terminal window kubectl get secret api-keys -o jsonpath='{.data}' -n doverunner -
JWT 토큰 검증
Terminal window # JWT 토큰 디코딩echo "YOUR_JWT_TOKEN" | base64 -d -
인증 서비스 로그 확인
Terminal window kubectl logs -l app=doverunner-auth -n doverunner
6. 스토리지 관련 문제
Section titled “6. 스토리지 관련 문제”문제: 영구 볼륨 마운트 실패
Section titled “문제: 영구 볼륨 마운트 실패”ERROR: Failed to mount persistent volume
해결 방법:
-
PVC 상태 확인
Terminal window kubectl get pvc -n doverunnerkubectl describe pvc <pvc-name> -n doverunner -
스토리지 클래스 확인
Terminal window kubectl get storageclasskubectl describe storageclass <storage-class-name> -
노드의 마운트 상태 확인
Terminal window kubectl get events --sort-by=.metadata.creationTimestamp -n doverunner
7. 업그레이드 관련 문제
Section titled “7. 업그레이드 관련 문제”문제: Helm 업그레이드 실패
Section titled “문제: Helm 업그레이드 실패”ERROR: UPGRADE FAILED: pre-upgrade hooks failed
해결 방법:
-
Helm 상태 확인
Terminal window helm status doverunner -n doverunnerhelm history doverunner -n doverunner -
롤백 수행
Terminal window helm rollback doverunner 1 -n doverunner -
수동 리소스 정리
Terminal window kubectl delete job pre-upgrade-hook -n doverunnerhelm upgrade doverunner ./chart --namespace doverunner
진단 도구 및 명령어
Section titled “진단 도구 및 명령어”시스템 상태 종합 점검
Section titled “시스템 상태 종합 점검”#!/bin/bashecho "=== DoveRunner Mobile App Security Health Check ==="
echo "1. Pod 상태 확인:"kubectl get pods -n doverunner
echo -e "\n2. 서비스 상태 확인:"kubectl get services -n doverunner
echo -e "\n3. Ingress 상태 확인:"kubectl get ingress -n doverunner
echo -e "\n4. PVC 상태 확인:"kubectl get pvc -n doverunner
echo -e "\n5. 최근 이벤트:"kubectl get events --sort-by=.metadata.creationTimestamp -n doverunner | tail -10
echo -e "\n6. 리소스 사용량:"kubectl top pods -n doverunner
echo -e "\n7. 노드 상태:"kubectl get nodes -o wide
로그 수집 스크립트
Section titled “로그 수집 스크립트”#!/bin/bashNAMESPACE="doverunner"OUTPUT_DIR="./doverunner-logs-$(date +%Y%m%d-%H%M%S)"
mkdir -p $OUTPUT_DIR
echo "로그 수집 중... 출력 디렉토리: $OUTPUT_DIR"
# 각 구성 요소의 로그 수집for app in doverunner-adc doverunner-api doverunner-sealing logstash elasticsearch mysql; do echo "Collecting logs for $app..." kubectl logs -l app=$app -n $NAMESPACE --tail=1000 > $OUTPUT_DIR/$app.log 2>&1done
# 시스템 정보 수집kubectl describe pods -n $NAMESPACE > $OUTPUT_DIR/pod-descriptions.txtkubectl get events -n $NAMESPACE > $OUTPUT_DIR/events.txtkubectl get all -n $NAMESPACE > $OUTPUT_DIR/resources.txt
echo "로그 수집 완료: $OUTPUT_DIR"tar -czf $OUTPUT_DIR.tar.gz $OUTPUT_DIRecho "압축 파일 생성: $OUTPUT_DIR.tar.gz"
지원 요청 시 필요한 정보
Section titled “지원 요청 시 필요한 정보”문제가 지속되어 DoveRunner Mobile App Security 지원팀에 문의할 때 다음 정보를 제공하세요:
1. 환경 정보
Section titled “1. 환경 정보”# 시스템 정보 수집kubectl version --client --shorthelm version --shortkubectl get nodes -o widekubectl describe namespace doverunner
2. 구성 정보
Section titled “2. 구성 정보”# Helm 배포 정보helm get values doverunner -n doverunnerhelm get manifest doverunner -n doverunner
3. 로그 파일
Section titled “3. 로그 파일”- 위의 로그 수집 스크립트 실행 결과
- 특정 오류가 발생한 시점의 상세 로그
4. 재현 단계
Section titled “4. 재현 단계”- 문제가 발생하는 정확한 단계
- 오류 메시지의 전체 내용
- 문제 발생 빈도 및 패턴
5. 시도한 해결 방법
Section titled “5. 시도한 해결 방법”- 이미 시도해본 문제 해결 방법
- 임시 해결책이 있었는지 여부
이 정보를 모두 제공하면 지원팀이 문제를 더 빠르고 정확하게 해결할 수 있습니다.