unexpected status 503 Service Unavailable: CC Switch local proxy failed while ha...
错误信息
unexpected status 503 Service Unavailable: CC Switch local proxy failed while handling Codex endpoint /responses. Provider: yjs gpt; model: gpt-5.6-terra; upstream_status: HTTP 503; cause: Service temporarily unavailable, url: http://127.0.0.1:15721/v1/responses
AI 解决方案
1. 🌐 错误翻译
原文:unexpected status 503 Service Unavailable: CC Switch local proxy failed while handling Codex endpoint /responses. Provider: yjs gpt; model: gpt-5.6-terra; upstream_status: HTTP 503; cause: Service temporarily unavailable, url: http://127.0.0.1:15721/v1/responses
译文:意外状态码503服务不可用:在处理Codex端点/responses时,CC Switch本地代理失败。提供商:yjs gpt;模型:gpt-5.6-terra;上游状态:HTTP 503;原因:服务临时不可用,URL:http://127.0.0.1:15721/v1/responses
2. 🎯 原因分析
3. 💡 解决方案
需先检查本地代理服务状态,再针对性恢复,步骤如下:
- 检查服务存活状态:确认本地代理服务进程是否在运行,执行进程查询命令(根据系统选择):
# 适用于Linux/macOS系统
ps aux | grep 15721
# 适用于Windows系统
tasklist | findstr 15721
# 假设服务名为cc-switch-proxy,根据实际情况调整
systemctl restart cc-switch-proxy # systemd系统
# 或直接执行服务的重启脚本,如
/opt/cc-switch/bin/proxy-restart.sh
curl -v http://127.0.0.1:15721/v1/responses -H "Content-Type: application/json" -d "{}"
若返回2xx状态码,说明服务恢复,可重新发起原请求。
4. 🛡️ 预防措施
Restart=always),同时添加健康检查脚本,定时检测服务端口响应,异常时自动触发重启,避免服务宕机后未及时恢复。