当前位置: 首页 > 知识库问答 >
问题:

丢失了我的 openshift 控制台(“应用程序不可用”)

朱啸
2023-03-14

我的OpenShift 4.5. x安装中的控制台用户界面神秘地停止工作。现在访问控制台URL会导致消息:

应用程序不可用

应用程序当前未在此终结点处为请求提供服务。它可能尚未启动或仍在启动。

如果路由存在但找不到相应的服务或pod,通常会看到这一点,但在这种情况下,路由存在:

$ oc -n openshift-console get route
NAME        HOST/PORT                                             PATH   SERVICES    PORT    TERMINATION          WILDCARD
console     console-openshift-console.apps.example.com            console     https   reencrypt/Redirect   None
downloads   downloads-openshift-console.apps.example.com          downloads   http    edge/Redirect        None

该服务存在:

$ oc -n openshift-console get service
NAME        TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)   AGE
console     ClusterIP   172.30.36.70     <none>        443/TCP   57d
downloads   ClusterIP   172.30.190.186   <none>        80/TCP    57d

豆荚存在并且健康:

$ oc -n openshift-console get pods
NAME                       READY   STATUS    RESTARTS   AGE
console-76c8d7d755-gtfm8   0/1     Running   1          4m12s
console-76c8d7d755-mvf6n   0/1     Running   1          4m12s
downloads-9656c996-mmqhk   1/1     Running   0          53d
downloads-9656c996-z2khj   1/1     Running   0          53d

查看控制台pods的日志,联系oauth服务似乎有问题:

2021-01-04T22:05:48Z auth: error contacting auth provider (retrying in 10s): Get https://kubernetes.default.svc/.well-known/oauth-authorization-server: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2021-01-04T22:05:58Z auth: error contacting auth provider (retrying in 10s): request to OAuth issuer endpoint https://oauth-openshift.apps.example.com/oauth/token failed: Head https://oauth-openshift.apps.example.com: EOF
2021-01-04T22:06:13Z auth: error contacting auth provider (retrying in 10s): request to OAuth issuer endpoint https://oauth-openshift.apps.example.com/oauth/token failed: Head https://oauth-openshift.apps.example.com: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2021-01-04T22:06:23Z auth: error contacting auth provider (retrying in 10s): request to OAuth issuer endpoint https://oauth-openshift.apps.example.com/oauth/token failed: Head https://oauth-openshift.apps.example.com: EOF
2021-01-04T22:06:38Z auth: error contacting auth provider (retrying in 10s): request to OAuth issuer endpoint https://oauth-openshift.apps.example.com/oauth/token failed: Head https://oauth-openshift.apps.example.com: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2021-01-04T22:06:53Z auth: error contacting auth provider (retrying in 10s): request to OAuth issuer endpoint https://oauth-openshift.apps.example.com/oauth/token failed: Head https://oauth-openshift.apps.example.com: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

但是 openshift-authentication 命名空间中的 pod 似乎运行正常,并且不会在日志中报告任何错误。我应该在哪里寻找问题的根源?

预期的路由和服务存在于< code > open shift-authentic ation 命名空间中:

$ oc -n openshift-authentication get route
NAME              HOST/PORT                                 PATH   SERVICES          PORT   TERMINATION            WILDCARD
oauth-openshift   oauth-openshift.apps.example.com          oauth-openshift   6443   passthrough/Redirect   None

$ oc -n openshift-authentication get service
NAME              TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)   AGE
oauth-openshift   ClusterIP   172.30.233.202   <none>        443/TCP   57d

$ oc -n openshift-authentication get route oauth-openshift -o json | jq .status
{
  "ingress": [
    {
      "conditions": [
        {
          "lastTransitionTime": "2020-11-08T19:48:08Z",
          "status": "True",
          "type": "Admitted"
        }
      ],
      "host": "oauth-openshift.apps.example.com",
      "routerCanonicalHostname": "apps.example.com",
      "routerName": "default",
      "wildcardPolicy": "None"
    }
  ]
}

共有2个答案

琴镜
2023-03-14

我在 OpenShift 3.11 上遇到了同样的问题

我刚刚用证书删除了机密,Openshift 将创建新的机密,现在控制台可以工作了。

oc delete secret console-serving-cert -n openshift-console
伍嘉
2023-03-14

这原来是默认入口路由器的问题。没有明显的错误,但我能够通过重新启动路由器来解决问题:

oc -n openshift-ingress get pod -o json |
  jq -r '.items[].metadata.name' |
  xargs oc -n openshift-ingress delete pod
 类似资料:
  • 我想在AWS云上运行的Openshift集群中部署我的web应用程序。我正在使用命令使其在外部可用: web应用程序未在8443上运行;它使用https在2553端口上运行。我们不想在8443上运行它。我可以使用<code>oc port forward</code>连接到webapp,但我想通过route命令公开它。我的方法有问题吗? 我在minishift上使用并且能够使用的相同服务,在本地使

  • 我按照以下步骤为我的非IIS安装和配置New Relic。NET应用程序:https://docs.newrelic.com/docs/agents/net-agent/instrumentation/instrumenting-non-iis-apps 在应用程序的配置文件中启用代理。在配置文件中,使用名为NewRelic的键添加一个新的appSset。代理启用,值为true。 我已经完成了所有

  • 我的应用程序使用terracotta/ehcache作为hibernate二级缓存以及“自定义”应用程序缓存,当本地运行terracotta服务器并通过开发人员控制台连接到它时,我可以看到我的应用程序以及各种缓存和统计数据。当我将相同的设置部署到不同的服务器时,它看起来正常,但是当我将开发人员控制台连接到远程服务器时,我可以在拓扑节点下的服务器阵列中看到一个服务器,但是我没有“我的应用程序”节点,

  • 当我在中添加以下代码时,我的设备上的应用程序丢失(消失)。 如果我没有添加此代码,则该应用程序已安装并按其应显示,但我收到警告: 应用程序是不可索引的谷歌搜索;考虑添加至少一个活动与动作视图意图过滤器。 我已经从官方留档和这个问题做了研究,但我的问题仍然不同。 编辑:这是我所有的清单:

  • 应用申请和应用查看面板 我的应用 开发者可在该面板查看目前已在知晓云绑定的小程序 申请应用 填写要绑定在知晓云后台的小程序信息, 包括 AppName、AppID 以及 AppSecret 在小程序管理后台配置信任域名 | 配置项 | 域名 | | —————— | ———————————- | | request 合法域名 | https://sso.ifanr.com | | socket 合

  • 我有一个无头CentOS 7盒子,我有访问权限。我已经成功安装了OpenShift v4.2-代码就绪容器版本。我能够使用工具、创建项目、从服务访问公开路由等。 我想探索来自Istio的可视化——服务网格。我如何远程访问web控制台,以便可以浏览服务网格? Katacoda似乎没有OpenShift 4.2集群。