You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

CloudRun实例部署异常:控制台、gcloud报错及Terraform超时求助

解决Cloud Run部署与CLI/控制台异常问题

问题现象汇总

  • 使用gcloud/Terraform部署Cloud Run实例时,日志报错:
    Initializing project for the current region. Resource readiness deadline exceeded or Deletion in progress. Resource readiness deadline exceeded.
    
    Terraform会持续重试直至超时。
  • 从Artifact Registry直接部署服务成功,但Cloud Run控制台仅显示错误图标,无其他内容。
  • 执行gcloud查询服务命令时崩溃:
    ERROR: gcloud crashed (TypeError): '<' not supported between instances of 'NoneType' and 'str'
    
  • 仅能通过服务直接URL访问,欧洲区域全量出现该问题;us-central1区域可创建服务,但无法在控制台查看服务列表。

可行解决步骤

  • 更新gcloud SDK版本
    该TypeError属于SDK版本兼容bug,优先更新到最新版本:

    gcloud components update
    
  • 清理区域内异常残留资源
    区域内存在处于删除中的残留资源会导致部署超时,先排查异常资源:

    gcloud run services list --region=YOUR_REGION --verbosity=debug
    

    若发现DELETING状态的服务,强制删除:

    gcloud run services delete SERVICE_NAME --region=YOUR_REGION --force
    

    若gcloud命令无法执行,直接调用Cloud Run API删除:

    curl -X DELETE "https://run.googleapis.com/v1/projects/[PROJECT_ID]/locations/[YOUR_REGION]/services/[SERVICE_NAME]" \
      -H "Authorization: Bearer $(gcloud auth print-access-token)"
    
  • 检查Cloud Run API状态
    确认项目的Cloud Run API是否正常启用:

    gcloud services list --enabled | grep run.googleapis.com
    

    未启用则执行启用命令:

    gcloud services enable run.googleapis.com
    
  • 切换到旧版控制台
    控制台错误图标大概率是新版UI的显示bug,点击页面右上角的「切换到旧版」按钮,尝试查看服务列表。

内容的提问来源于stack exchange,提问作者Faithful Anere

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.16 13:07:07