Readiness probe failed: Client.Timeout exceeded while awaiting headers)
Pods restart frequently causing periodic timeout errors
After you complete your installation, you might encounter an issue that causes some pods to become not ready every few minutes. In addition, this issue can cause login difficulty.
Symptoms
One or more pods experience multiple restarts that result in the pod or pods being frequently in a not ready state. In addition, attempts to log in result in periodic 502 Bad Gateway or 504 Gateway Timeout errors.
You can view the events for a pod that is frequently restarting by running the following commands:
Your output can include the following error message:
Readiness probe failed: Get http://<host>:<port>/readinessProbe: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
The logs might show errors similar to the following sample log messages:
[2020-01-23T19:59:23.036] [ERROR] [mcm-ui] [status] GET /readinessProbe 500
[2020-01-23T19:59:29.064] [ERROR] [mcm-ui] [status] GET /readinessProbe 500
[2020-01-23T19:59:38.087] [ERROR] [mcm-ui] [status] GET /readinessProbe 500
[2020-01-23T20:01:53.096] [ERROR] [mcm-ui] [status] GET /readinessProbe 500
[2020-01-23T20:01:59.111] [ERROR] [mcm-ui] [status] GET /readinessProbe 500
[2020-01-23T20:02:08.137] [ERROR] [mcm-ui] [status] GET /readinessProbe 500
[2020-01-23T20:11:39.951] [ERROR] [mcm-ui] [status] GET /readinessProbe 500
[2020-01-23T20:11:50.184] [ERROR] [mcm-ui] [status] GET /readinessProbe 500
[2020-01-23T20:11:59.207] [ERROR] [mcm-ui] [status] GET /readinessProbe 500
[2020-01-23T20:12:08.232] [ERROR] [mcm-ui] [status] GET /readinessProbe 500
[2020-01-23T20:13:53.051] [ERROR] [mcm-ui] [status] GET /readinessProbe 500
Causes
This issue can occur due to frequent failing readiness probes for a pod. When the pod becomes 'not ready', you might not be able to log in or use the console.
Resolving the problem
To reduce the frequency of timeout errors from this issue, you can configure a workaround or apply a DNS config patch to help resolve this issue.
Apply DNS config patch
To help address the periodic timeout errors, you can apply a OpenShift DNS config patch for IBM Cloud Pak foundational services clusters. This patch addresses an issue that occurs when accessing services from pods that results in requests that have a response delay of up to 5 seconds. Normal response times for requests typically require only a millisecond delay.
This patch is available as an interim fix for IBM Cloud Pak foundational services. For more information about this patch, and to obtain this patch, go to IBM® Fix Central. IBM® Fix Central contains fixes and updates for IBM® products. To access this website, see IBM Fix Central .
To directly access the interim fix for this patch, see CS=3.2.4-fix-37137 .
To apply the patch, follow the README instructions that are included with the interim fix.
Workaround
To resolve the issue, complete manual adjustments to all liveness and readiness probes in the pod daemonset, for example the following steps adjusts the auth-idp
daemonset as an example.
-
Install kubectl. See Installing the Kubernetes CLI (kubectl).
-
Edit the
auth-idp
daemonset. -
Locate the settings for each liveness and readiness probe for all containers in the daemonset. For example, the following section shows the
readinessProbe
settings for theplatform-auth-service
container:name: platform-auth-service ports: - containerPort: 8443 hostPort: 8443 name: http protocol: TCP readinessProbe: failureThreshold: 3 httpGet: path: / port: 8443 scheme: HTTPS periodSeconds: 10 successThreshold: 1 timeoutSeconds: 1 resources: limits: cpu: "1" memory: 1Gi requests: cpu: 100m memory: 256Mi
-
Set values for each probe setting for all containers in the daemonset to increase the
initialDelaySeconds
,periodSeconds
, andtimeoutSeconds
settings. If missing, add theinitialDelaySeconds
setting. The following example shows the placement of these settings for a readiness probe:readinessProbe: failureThreshold: 3 httpGet: path: / port: 8443 scheme: HTTPS initialDelaySeconds: 420 periodSeconds: 30 successThreshold: 1 timeoutSeconds: 10
-
Save the file and wait until all the
auth-idp
pods restart. The pods might take a few minutes to restart.
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· 全网最简单!3分钟用满血DeepSeek R1开发一款AI智能客服,零代码轻松接入微信、公众号、小程
· .NET 10 首个预览版发布,跨平台开发与性能全面提升
· 《HelloGitHub》第 107 期
· 全程使用 AI 从 0 到 1 写了个小工具
· 从文本到图像:SSE 如何助力 AI 内容实时呈现?(Typescript篇)