简体   繁体   English

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

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

Sometimes (no specific correlation) Cloud Run fails to deploy a new revision because of issues with performing a 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. I use this command to rollout: gcloud alpha run services replace...我使用这个命令来推出: gcloud alpha run services replace...

  2. Some google-specifc details from my cloudrun.yml :来自我的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. Application logs in Cloud Run look good, nothing strange Cloud Run 中的应用程序日志看起来不错,没什么奇怪的
  2. The only "bad" logs in Cloud Run are: 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. The command fails within ~15-20 sec.该命令在 ~15-20 秒内失败。 I don't know what probes are executed by GCP (looks like TCP with 4 min timeout ), but it looks too early to be exhausted.我不知道 GCP 执行了哪些探测(看起来像TCP,超时 4 分钟),但现在看来还为时过早。

  2. I don't have any custom startup probes, health checks, readiness/liveness probes, etc.我没有任何自定义启动探测器、健康检查、就绪/活动探测器等。

Does anybody face the same issue?有人面临同样的问题吗? Any ideas on where to look at?关于在哪里看的任何想法?

Ok, that is what worked for me.好的,这对我有用。 I removed this line:我删除了这一行:

        autoscaling.knative.dev/minScale: '1'

According to docs it's 0 by default.根据文档,默认情况下为0

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

相关问题 Google Cloud Run 上 API 服务器的健康检查 - Health checks for an API server on Google Cloud Run 如何在谷歌云中为 websocket 创建健康检查? - How to create a health check for websocket in Google cloud? Google Cloud Run 404 服务之间的内部流量错误 - Google Cloud Run 404 Error on internal traffic between services 执行 Stackdriver AsyncReporter 运行状况检查时出现 GCP 错误 - GCP Error when performing Stackdriver AsyncReporter health check Google 应用引擎部署失败:[9] 发生内部错误 [...] 您必须安装或更新 .NET 才能运行此应用程序 - Google app engine deployment failing: [9] An internal error occurred [...] You must install or update .NET to run this application Google Cloud 未在负载均衡器运行状况检查中应用 BackendConfig - Google Cloud not Applying the BackendConfig on the Load Balancer Health Check Google Cloud Container Registry - 检查图像大小 - Google Cloud Container Registry - Check image size 如何检查正在运行的 Google Cloud Run 容器实例的数量? - How can I check how many instances of a Google Cloud Run container are running? Google Cloud Run - 容器无法启动解决方法 - Google Cloud Run - Container failed to start workarounds 谷歌云运行准备检查 - 如何? - readiness check for google cloud run - how?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM