From e6fc2a60daad1a5ce03bb361db2991224cb697d9 Mon Sep 17 00:00:00 2001 From: happybell80 Date: Thu, 28 Aug 2025 16:41:33 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20rb8001=20=EB=A0=88=EB=B2=A8=20?= =?UTF-8?q?=ED=91=9C=EC=8B=9C=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0=20?= =?UTF-8?q?=EC=99=84=EB=A3=8C=20-=20=EB=A0=88=EB=B2=A8=2020=20=EC=A0=95?= =?UTF-8?q?=EC=83=81=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...appybell80_rb8001_레벨1_표시_문제.md | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/troubleshooting/250823_happybell80_rb8001_레벨1_표시_문제.md b/troubleshooting/250823_happybell80_rb8001_레벨1_표시_문제.md index d8adb4d..e5c5c44 100644 --- a/troubleshooting/250823_happybell80_rb8001_레벨1_표시_문제.md +++ b/troubleshooting/250823_happybell80_rb8001_레벨1_표시_문제.md @@ -151,15 +151,32 @@ GET /api/user/robeing → 404 Not Found // 변경 후: /api/robeing/info ``` -### 4.3 최종 플로우 +### 4.3 라우트 우선순위 문제 (2025-08-28 추가) +**문제 발견**: `/api/robeing/info`가 작동 안함 ``` -Frontend (JWT) → Gateway /api/robeing/info → robeing_id 획득 - ↓ - /api/stats/{robeing_id} → robeing-monitor → DB - ↓ - 레벨 20 반환 ✅ +GET http://192.168.219.52:8001/api/robeing/info → 404 Not Found ``` +**원인**: FastAPI 라우트 정의 순서 +- `/api/{path:path}` (line 408) - catch-all 패턴이 먼저 매칭 +- `/api/robeing/info` (line 431) - 도달하지 못함 +- 결과: robeing/info가 rb8001로 프록시되어 404 + +**해결 필요**: +- `/api/robeing/info`를 `/api/{path:path}`보다 앞에 정의 +- 또는 catch-all 패턴에서 robeing/info 제외 + +### 4.4 최종 플로우 ✅ 해결 완료 +``` +Frontend (JWT) → Gateway /api/stats/rb8001 → robeing-monitor → DB + ↓ + 레벨 20 정상 반환 및 표시 +``` + +**해결 완료 (2025-08-28 16:40)**: +- Frontend가 레벨 20 정상 표시 +- DB 값이 UI에 올바르게 반영됨 + --- ## 5. 교훈