diff --git a/00_Philosophy/01_PRINCIPLES/Runtime_Principles.md b/00_Philosophy/01_PRINCIPLES/Runtime_Principles.md index 230ac8f..c422c5a 100644 --- a/00_Philosophy/01_PRINCIPLES/Runtime_Principles.md +++ b/00_Philosophy/01_PRINCIPLES/Runtime_Principles.md @@ -15,6 +15,7 @@ ## 4. Drift Is a Runtime Failure - Git 관리본과 실제 실행본이 다르면 문서 불일치가 아니라 런타임 실패다. - 특히 nginx, env, upstream, mount, deploy 경로는 "둘 다 맞을 수 없다"는 전제로 다룬다. +- 일부 경로만 새 기준으로 바뀌고 다른 경로가 구주소를 유지하는 상태도 실패로 본다. 부분 정상은 런타임 성공이 아니다. ## 5. Runtime Truth Comes From the Loaded Path - 설정의 진실은 저장된 파일이 아니라 실제 로드된 경로에서 판단한다. diff --git a/journey/README.md b/journey/README.md index c649656..93e86c5 100644 --- a/journey/README.md +++ b/journey/README.md @@ -38,6 +38,7 @@ - [250727 51124 서버 이전 작업 및 nginx 프록시 설정](./troubleshooting/250727_happybell80_51124서버이전작업.md) - [51123 구 IP 하드코딩과 런타임 SSOT 불일치 이슈](./troubleshooting/260309_51123_구IP하드코딩_런타임SSOT불일치_이슈.md) - [24서버 우분투 터미널 불가, 네트워크 대역 오류, python3-apt 복구 기록](./troubleshooting/260309_24서버_우분투터미널불가_네트워크대역오류_python3apt복구.md) +- [23 gateway MONITOR_URL 구주소 잔존으로 24 monitor 프록시 실패 복구](./troubleshooting/260310_23gateway_monitor_url_구주소잔존_24monitor프록시실패_복구.md) - [Gitea git credential helper 표준화](./troubleshooting/260309_gitea_git_credential_helper_표준화.md) - [23서버 워크스페이스 인프라 구조정리 이슈](./troubleshooting/260307_23서버_워크스페이스_인프라_구조정리_이슈.md) - [외부 NAS -> 내부 NAS 컴퍼니엑스 파일 동기화 아이디어](./ideas/260307_external_nas_companyx_sync_아이디어.md) @@ -56,5 +57,6 @@ - [23제어면 gateway workspace-config 단일화](./worklog/260309_23제어면_gateway_workspace_config_단일화.md) - [51123 구IP active runtime 제거 1차](./worklog/260309_51123_구IP_active_runtime_제거_1차.md) - [24서버 robeing runtime workspace-config 단일화](./worklog/260310_24서버_robeing_runtime_workspace_config_단일화.md) +- [23 gateway MONITOR_URL 24 monitor 교정 및 실도메인 전수검증](./worklog/260310_23gateway_monitor_url_24monitor_교정_및_실도메인_전수검증.md) - [24전환 배포대상과 ingress 24IP 교정 1차](./worklog/260309_24전환_배포대상과_ingress_24IP_교정_1차.md) - [24서버 NAS 마운트 복원 및 ONNX 백업 실행](./worklog/260309_24서버_nas마운트복원_onnx백업실행.md) diff --git a/journey/troubleshooting/260310_23gateway_monitor_url_구주소잔존_24monitor프록시실패_복구.md b/journey/troubleshooting/260310_23gateway_monitor_url_구주소잔존_24monitor프록시실패_복구.md new file mode 100644 index 0000000..a33e4ca --- /dev/null +++ b/journey/troubleshooting/260310_23gateway_monitor_url_구주소잔존_24monitor프록시실패_복구.md @@ -0,0 +1,51 @@ +--- +tags: [infra, 51123, 51124, gateway, monitor, runtime, troubleshooting] +--- + +# 260310 23 gateway MONITOR_URL 구주소 잔존으로 24 monitor 프록시 실패 복구 + +## 상위 원칙 +- [Infra Project Identity](../../00_Philosophy/00_IDENTITY/Infra_Project_Identity.md) +- [Core Infrastructure Principles](../../00_Philosophy/01_PRINCIPLES/Core_Infrastructure_Principles.md) +- [Runtime Principles](../../00_Philosophy/01_PRINCIPLES/Runtime_Principles.md) + +## 관련 문서 +- [51123 구 IP 하드코딩과 런타임 SSOT 불일치 이슈](./260309_51123_구IP하드코딩_런타임SSOT불일치_이슈.md) +- [24서버 실서비스 운영전환 리서치](../research/260309_24서버_실서비스운영전환_리서치.md) +- [23제어면 gateway workspace-config 단일화](../worklog/260309_23제어면_gateway_workspace_config_단일화.md) +- [23 gateway MONITOR_URL 24 monitor 교정 및 실도메인 전수검증](../worklog/260310_23gateway_monitor_url_24monitor_교정_및_실도메인_전수검증.md) + +## 문제 +- `https://ro-being.com/rb8001/health`는 정상이었지만, 게이트웨이의 monitor 경로는 반복 실패했습니다. +- 2026-03-10 22:28~22:47 KST `robeing-gateway` 로그에 `Proxying stats request to: http://192.168.0.100:9024/api/stats/rb8001`와 `All connection attempts failed`가 반복됐습니다. +- 같은 시각 24 서버 `robeing_monitor`는 `127.0.0.1:9024/healthz -> 200`, `0.0.0.0:9024 LISTEN` 상태였습니다. + +## 원인 +- `23 gateway`의 active runtime SSOT인 `workspace-config/runtime.env`에 `MONITOR_URL=http://192.168.0.100:9024`가 남아 있었습니다. +- 반면 `ROBEING_DEFAULT_HOST=192.168.0.106`은 이미 24 기준으로 교정돼 있어, 채팅 기본 경로와 monitor 경로의 upstream 기준이 서로 달랐습니다. +- 결과적으로 외부 헬스 일부는 정상처럼 보였지만, stats/preferences는 내려진 23 monitor 주소로 프록시됐습니다. + +## 조치 +- `workspace-config/runtime.env`의 `MONITOR_URL`을 `http://192.168.0.106:9024`로 교정했습니다. +- `23 robeing-gateway`를 `docker compose down && docker compose up -d --build`로 재기동해 새 runtime 값을 다시 로드했습니다. + +## 검증 +- 재기동 후 `robeing-gateway` 컨테이너 env: + - `ROBEING_DEFAULT_HOST=192.168.0.106` + - `ROBEING_DEFAULT_PORT=8001` + - `MONITOR_URL=http://192.168.0.106:9024` +- 게이트웨이 컨테이너 내부 확인: + - `http://192.168.0.106:9024/healthz -> {"status":"healthy"}` + - `http://192.168.0.100:9024/healthz -> connection failed` +- 실도메인 호출: + - `GET https://ro-being.com/api/stats/rb8001 -> 200` + - `GET https://ro-being.com/api/preferences/{user_uuid} -> 200` + - `PUT https://ro-being.com/api/preferences/{user_uuid} -> 200` +- 같은 시각 로그 대조: + - `23 robeing-gateway`: `Proxying stats request to: http://192.168.0.106:9024/api/stats/rb8001` + - `23 robeing-gateway`: `GET/PUT http://192.168.0.106:9024/api/preferences/{user_uuid} "HTTP/1.1 200 OK"` + - `24 robeing_monitor`: `/stats/rb8001`, `/api/preferences/{user_uuid}` 모두 `200 OK` + +## 결론 +- 문제는 `24 monitor 장애`가 아니라 `23 gateway runtime.env의 구주소 잔존`이었습니다. +- 이번 이슈는 `기본 robeing 대상`과 `monitor 대상`이 서로 다른 upstream 기준을 갖게 되면 부분 정상처럼 보여도 운영상 실패가 된다는 사례입니다. diff --git a/journey/worklog/260310_23gateway_monitor_url_24monitor_교정_및_실도메인_전수검증.md b/journey/worklog/260310_23gateway_monitor_url_24monitor_교정_및_실도메인_전수검증.md new file mode 100644 index 0000000..b2f9fe3 --- /dev/null +++ b/journey/worklog/260310_23gateway_monitor_url_24monitor_교정_및_실도메인_전수검증.md @@ -0,0 +1,24 @@ +--- +tags: [infra, 51123, 51124, gateway, monitor, runtime, worklog] +--- + +# 260310 23 gateway MONITOR_URL 24 monitor 교정 및 실도메인 전수검증 + +## 관련 문서 +- [23 gateway MONITOR_URL 구주소 잔존으로 24 monitor 프록시 실패 복구](../troubleshooting/260310_23gateway_monitor_url_구주소잔존_24monitor프록시실패_복구.md) +- [Runtime Principles](../../00_Philosophy/01_PRINCIPLES/Runtime_Principles.md) + +## 작업 +- `workspace-config/runtime.env`의 `MONITOR_URL`을 `http://192.168.0.106:9024`로 교정했습니다. +- `robeing-gateway`를 재빌드·재기동해 active runtime에 반영했습니다. +- 게이트웨이가 monitor로 보내는 경로 `GET /api/stats/{robeing_id}`, `GET /api/preferences/{user_uuid}`, `PUT /api/preferences/{user_uuid}`를 실제 도메인에서 전수 호출했습니다. + +## 검증 +- `robeing-gateway` 컨테이너 env에 `MONITOR_URL=http://192.168.0.106:9024`가 반영됐습니다. +- `https://ro-being.com/api/stats/rb8001 -> 200` +- `https://ro-being.com/api/preferences/{user_uuid} GET -> 200` +- `https://ro-being.com/api/preferences/{user_uuid} PUT -> 200` +- 같은 시각 23 gateway와 24 `robeing_monitor` 로그 모두 `192.168.0.106:9024` 대상 `200 OK`로 교차 검증했습니다. + +## 한 줄 결론 +- 23 gateway의 monitor 경로는 이제 24 monitor를 기준으로 일치하며, 외부 도메인 기준 stats/preferences 전 경로가 정상 동작합니다.