繁体   English   中英

执行容器运行状况检查时发生 Google Cloud Run 内部错误

[英]Google Cloud Run Internal error occurred while performing container health check

有时(没有特定关联)Cloud Run 无法部署新修订,因为执行容器运行状况检查时出现问题:

X Deploying... Deploying Revision. Waiting on revision <my_app>-s7px8.                                                                                                                                                             
  - Creating Revision... Internal error occurred while performing container health check.                                                                                                                                                   
  . Routing traffic... 
  1. 我使用这个命令来推出: gcloud alpha run services replace...

  2. 来自我的cloudrun.yml细节:

apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: <my_app>
spec:
  traffic:
  - percent: 100
    latestRevision: true
  template:
    metadata:
      annotations:
        autoscaling.knative.dev/minScale: '1'
        autoscaling.knative.dev/maxScale: '40'
        run.googleapis.com/vpc-access-connector: <my_app>-vpc-16gbps
        run.googleapis.com/sandbox: gvisor
    spec:
      timeoutSeconds: 50
      serviceAccountName: ...
      containerConcurrency: 100
      containers:
      - image: ...
        ports:
        - containerPort: 8080
          name: h2c
        resources:
          limits:
            cpu: '4'
            memory: 6Gi
  1. Cloud Run 中的应用程序日志看起来不错,没什么奇怪的
  2. Cloud Run 中唯一的“坏”日志是:
{
  "protoPayload": {
    "@type": "type.googleapis.com/google.cloud.audit.AuditLog",
    "status": {
      "code": 13,
      "message": "Ready condition status changed to False for Service <my_app> with message: Internal error occurred while performing container health check. Resource readiness deadline exceeded."
    },
    "serviceName": "run.googleapis.com",
    "response": {
      "apiVersion": "serving.knative.dev/v1",
      "kind": "Service",
      "status": {
        "observedGeneration": 1,
        "conditions": [
          {
            "type": "Ready",
            "status": "False",
            "message": "Internal error occurred while performing container health check. Resource readiness deadline exceeded.",
            "lastTransitionTime": "2022-10-05T14:11:19.884568Z"
          },
          {
            "type": "ConfigurationsReady",
            "status": "Unknown",
            "message": "Internal error occurred while performing container health check.",
            "lastTransitionTime": "2022-10-05T14:00:50.398740Z"
          },
          {
            "type": "RoutesReady",
            "status": "False",
            "reason": "RevisionFailed",
            "message": "Revision '<my_app>-s7px8' is not ready and cannot serve traffic. Internal error occurred while performing container health check.",
            "lastTransitionTime": "2022-10-05T14:11:19.884568Z"
          }
        ],
        "latestCreatedRevisionName": "<my_app>-s7px8",
      },
      "@type": "type.googleapis.com/google.cloud.run.v1.Service"
    }
  }
}
  1. 该命令在 ~15-20 秒内失败。 我不知道 GCP 执行了哪些探测(看起来像TCP,超时 4 分钟),但现在看来还为时过早。

  2. 我没有任何自定义启动探测器、健康检查、就绪/活动探测器等。

有人面临同样的问题吗? 关于在哪里看的任何想法?

好的,这对我有用。 我删除了这一行:

        autoscaling.knative.dev/minScale: '1'

根据文档,默认情况下为0

暂无
暂无

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

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