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

OCP应用服务连接异常排查请求:Route与Pod正常但访问报错

问题描述

Route配置完成,Pod已启动运行,但访问https://www.test.gov.tw/my-apps时出现错误页面。

已排查的可能问题

  • Service未正确映射至对应Pod:可能是Service的选择器或目标端口配置错误,导致请求无法正确转发至Pod内运行的应用。
  • Pod已运行但应用未正常启动或未绑定至预期端口:需确认应用监听正确端口并完成启动流程。
  • Route配置问题:尽管Route已存在,但可能指向错误的Service名称或路径;此外Route路径可能与应用服务实际上下文路径不匹配,导致路由错误。

相关配置文件

apiVersion: v1
kind: Service
metadata:
  labels:
    app: my-apps
  name: my-apps
  namespace: test-systems
  resourceVersion: "48338578"
  uid: 36692e79-0f08-4416-8242-cdb0087900da
spec:
  clusterIP: 172.26.110.30
  clusterIPs:
  - 172.26.110.30
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  ports:
  - name: http
    port: 8080
    protocol: TCP
    targetPort: http
  - name: actuator
    port: 5678
    protocol: TCP
    targetPort: actuator
  selector:
    app: my-apps
  sessionAffinity: None
  type: ClusterIP
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  labels:
    app: my-apps
  name: my-apps-qbrjf
  namespace: test-systems
  resourceVersion: "48406718"
  uid: 47e6b206-a15a-4b51-9853-a11d4d1243d4
spec:
  host: www.test.gov.tw
  path: /my-apps
  port:
    targetPort: http
  to:
    kind: Service
    name: my-apps
    weight: 100
  wildcardPolicy: None

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.12 17:27:40