docs: Gateway DB 연결 문제 해결 과정 추가

- PostgreSQL 인증 실패 원인 분석
- DATABASE_URL 환경변수 수정 방법
- 51123 서버에서의 해결 과정
- 전체 시스템 정상화 확인
This commit is contained in:
happybell80 2025-08-18 17:22:36 +09:00
parent 1e66ec541d
commit e163c28262

View File

@ -294,6 +294,48 @@ const response = await fetch(`${ROBING_API_URL}/api/history?${params}`)
- 응답 속도 대폭 개선 (임베딩 생성 없음)
- 명확한 아키텍처로 유지보수 용이
## 오후 5시 20분 - Gateway DB 연결 문제 해결
### 문제 상황
- Gateway가 PostgreSQL 인증 실패: `password authentication failed for user "robeings"`
- 워크스페이스 정보를 가져올 수 없어 기본 로빙만 사용
- DATABASE_URL 환경변수의 비밀번호가 잘못됨
### 원인 분석
```yaml
# docker-compose.yml 기본값 (틀림)
DATABASE_URL=postgresql+asyncpg://postgres:postgres@host.docker.internal:5432/auth_db
# 실제 필요한 값
DATABASE_URL=postgresql+asyncpg://robeings:robeings@host.docker.internal:5432/auth_db
```
### 해결 과정 (51123 서버)
1. **환경변수 수정**
```bash
cd /home/admin/ivada_project/robeing-gateway
echo 'DATABASE_URL=postgresql+asyncpg://robeings:robeings@host.docker.internal:5432/auth_db' > .env
```
2. **컨테이너 재시작**
```bash
docker-compose down
docker-compose up -d
```
3. **연결 확인**
```bash
docker logs robing-gateway --tail 50
# "Database connection established successfully" 확인
# "All required tables found in auth_db" 확인
```
### 해결 결과
- ✅ DB 연결 성공
- ✅ 워크스페이스 조회 정상 작동
- ✅ 사용자별 로빙 할당 가능
- ✅ 전체 시스템 정상화
## 오후 2시 07분 - 프론트엔드 localStorage 문제 해결
### 문제 발견