You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Apigee Local配置映射遇messaging.adaptors.http.flow.ServiceUnavailable错误求助

Apigee本地代理配置连接拒绝问题排查建议

我是Apigee新手,尝试配置本地Apigee将http://localhost:10002/welcome映射至Docker部署的站点http://localhost:9090/welcome,但出现错误:

{"fault":{"faultstring":"The Service is temporarily unavailable","detail":{"errorcode":"messaging.adaptors.http.flow.ServiceUnavailable","reason":"TARGET_CONNECT_CONNECTION_REFUSED"}}}

查阅官方文档后仍不明确解决方法,附上配置信息寻求建议:

ProxyEndpoint配置(路径:Local Development>apiproxies> apiproxy> proxies> default.xml)

<ProxyEndpoint name="default">
  <HTTPProxyConnection>
    <BasePath>welcome</BasePath>
  </HTTPProxyConnection>
  <RouteRule name="backend">
    <TargetEndpoint>backend</TargetEndpoint>
  </RouteRule>
</ProxyEndpoint>

TargetEndpoint配置(路径:Local Development>apiproxies> welcome-backend-map>targets>backend.xml)

<TargetEndpoint name="backend">
  <HTTPTargetConnection>
    <URL>http://localhost:9090/welcome</URL>
  </HTTPTargetConnection>
</TargetEndpoint>

排查建议

  • 检查Docker端口映射:确认Docker容器已将9090端口映射到宿主机,执行docker ps查看容器PORTS列,需存在0.0.0.0:9090->9090/tcp这类配置。
  • 替换localhost为宿主机地址:若Apigee运行在Docker容器内,localhost指向容器自身而非宿主机。可将TargetEndpoint的URL改为宿主机局域网IP(如http://192.168.x.x:9090/welcome),或用Docker专属地址:Windows/macOS用host.docker.internal,Linux用172.17.0.1。
  • 测试连通性:在Apigee运行环境中(本地直接运行则在宿主机,Docker运行则进入容器),执行curl http://localhost:9090/welcome,确认目标站点可正常访问,排除防火墙或端口占用问题。
  • 修正路径重复问题:ProxyEndpoint的BasePath为welcome,TargetEndpoint的URL也包含welcome,最终转发路径会变成http://localhost:9090/welcome/welcome。可将TargetEndpoint的URL改为http://localhost:9090,或把ProxyEndpoint的BasePath设为空,请求时使用完整路径。

内容的提问来源于stack exchange,提问作者tsohtan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.13 13:07:15