diff --git a/troubleshooting/250825_gmail_token_null_daily_briefing_fix.md b/troubleshooting/250825_gmail_token_null_daily_briefing_fix.md index 6176614..00f3e17 100644 --- a/troubleshooting/250825_gmail_token_null_daily_briefing_fix.md +++ b/troubleshooting/250825_gmail_token_null_daily_briefing_fix.md @@ -220,7 +220,7 @@ sequenceDiagram RB->>State: POST /api/logs/rb8001/conversation State->>PG: INSERT INTO conversation_logs
❌ DB 연결 실패 - Note over State,PG: 잘못된 DB 설정:
localhost:5433/auth_db + Note over State,PG: 잘못된 DB 이름:
localhost:5433/auth_db
(main_db여야 함) State-->>RB: 500 Internal Server Error Note over RB: 에러 로깅만,
서비스 계속 동작 @@ -229,18 +229,24 @@ sequenceDiagram ### 7.3 근본 원인 **State Service 환경변수 오류**: ```bash -# 현재 (잘못된 설정) +# 현재 (잘못된 DB 이름) DATABASE_URL=postgresql://robeings:robeings@localhost:5433/auth_db +# 문제: auth_db가 존재하지 않음 (main_db 사용해야 함) -# 올바른 설정 -DATABASE_URL=postgresql://robeings:robeings@192.168.219.45:5432/main_db +# 올바른 설정 (SSH 터널 사용) +DATABASE_URL=postgresql://robeings:robeings@localhost:5433/main_db +# 5433은 SSH 터널 포트 (51124:5433 → 51123:5432) ``` ### 7.4 해결 방법 ```bash -# State Service 환경변수 수정 (51124 서버) +# 1. SSH 터널 확인 (51124 서버) +ps aux | grep "5433:localhost:5432" +# 없으면 생성: ssh -N -L 5433:localhost:5432 admin@192.168.219.45 & + +# 2. State Service 환경변수 수정 (51124 서버) cd /home/heejae/robeing-state-service -vim .env # DATABASE_URL 수정 +vim .env # auth_db → main_db로 수정 docker compose down && docker compose up -d --build ```