简体   繁体   English

OAuth 2.0 的问题:503 服务暂时不可用

[英]Issues with OAuth 2.0: 503 Service Temporarily Unavailable

I have a API running on a pod (with kubernetes) it uses OAuth 2.0 with Auzre.我有一个在 pod(使用 kubernetes)上运行的 API,它使用带有 Auzre 的 OAuth 2.0。 When I send get/post request to it from Postman I get the following issue.当我从 Postman 向它发送 get/post 请求时,出现以下问题。

503: Service Temporarily Unavailable 503服务暂时不可用

And the Postman console says the following: Postman 控制台显示以下内容:

Warning: Certificate has expired 503: Service Temporarily Unavailable警告:证书已过期503:服务暂时不可用

Now on the pod there was no issue when I created the img and when I check the log with the following command:现在在 pod 上,当我创建 img 并使用以下命令检查日志时没有问题:

kubectl logs (pod name) -n my-test-pod --kubeconfig=kubeconfig.yaml > logs.txt kubectl 日志(pod 名称)-n my-test-pod --kubeconfig=kubeconfig.yaml > logs.txt

I don't see any issues nor do I see anything that resembles a stack-trace indicating a issue with the get/post requests.我没有看到任何问题,也没有看到任何类似于堆栈跟踪的内容,表明 get/post 请求存在问题。

My questions are:我的问题是:

  1. What could cause this?什么可能导致这种情况?
  2. Am I looking at the right logs (looking for the IMG stack-trace).我是否在查看正确的日志(寻找 IMG 堆栈跟踪)。

Kind regards.亲切的问候。

To access this API you must be entering via the ingress or a load balancer service.要访问此 API,您必须通过入口或负载均衡器服务进入。 The ingress may be terminating the SSL.入口可能正在终止 SSL。

If the certificate used by the ingress controller has expired, you will see this error.如果入口控制器使用的证书已过期,您将看到此错误。

Please check the certificate's validity using the command below and install a valid certificate to rectify the issue:请使用以下命令检查证书的有效性并安装有效证书以解决问题:

echo | openssl s_client -showcerts -servername <server-fqdn> -connect <server-fqdn>:<ssl_port> 2>/dev/null | openssl x509 -inform pem -noout -text | grep "Before:" -A1

Alternatively, you may want to refer to SO post to disable certificate verification in Postman.或者,您可能需要参考SO 帖子以禁用 Postman 中的证书验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM