docs: State Service DB 설정 오류 정정
- 5433 포트는 SSH 터널용 포트임을 명시 - 문제는 포트가 아니라 DB 이름 (auth_db → main_db) - SSH 터널 확인 명령어 추가 - 51124:5433 → 51123:5432 터널 설명 추가
This commit is contained in:
parent
96abf33ada
commit
1bb1c9bbf5
@ -220,7 +220,7 @@ sequenceDiagram
|
|||||||
|
|
||||||
RB->>State: POST /api/logs/rb8001/conversation
|
RB->>State: POST /api/logs/rb8001/conversation
|
||||||
State->>PG: INSERT INTO conversation_logs<br/>❌ DB 연결 실패
|
State->>PG: INSERT INTO conversation_logs<br/>❌ DB 연결 실패
|
||||||
Note over State,PG: 잘못된 DB 설정:<br/>localhost:5433/auth_db
|
Note over State,PG: 잘못된 DB 이름:<br/>localhost:5433/auth_db<br/>(main_db여야 함)
|
||||||
State-->>RB: 500 Internal Server Error
|
State-->>RB: 500 Internal Server Error
|
||||||
|
|
||||||
Note over RB: 에러 로깅만,<br/>서비스 계속 동작
|
Note over RB: 에러 로깅만,<br/>서비스 계속 동작
|
||||||
@ -229,18 +229,24 @@ sequenceDiagram
|
|||||||
### 7.3 근본 원인
|
### 7.3 근본 원인
|
||||||
**State Service 환경변수 오류**:
|
**State Service 환경변수 오류**:
|
||||||
```bash
|
```bash
|
||||||
# 현재 (잘못된 설정)
|
# 현재 (잘못된 DB 이름)
|
||||||
DATABASE_URL=postgresql://robeings:robeings@localhost:5433/auth_db
|
DATABASE_URL=postgresql://robeings:robeings@localhost:5433/auth_db
|
||||||
|
# 문제: auth_db가 존재하지 않음 (main_db 사용해야 함)
|
||||||
|
|
||||||
# 올바른 설정
|
# 올바른 설정 (SSH 터널 사용)
|
||||||
DATABASE_URL=postgresql://robeings:robeings@192.168.219.45:5432/main_db
|
DATABASE_URL=postgresql://robeings:robeings@localhost:5433/main_db
|
||||||
|
# 5433은 SSH 터널 포트 (51124:5433 → 51123:5432)
|
||||||
```
|
```
|
||||||
|
|
||||||
### 7.4 해결 방법
|
### 7.4 해결 방법
|
||||||
```bash
|
```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
|
cd /home/heejae/robeing-state-service
|
||||||
vim .env # DATABASE_URL 수정
|
vim .env # auth_db → main_db로 수정
|
||||||
docker compose down && docker compose up -d --build
|
docker compose down && docker compose up -d --build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user