Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloud Run fails to deploy. The service has encountered an internal error.

Hi community, I have a problem with Cloud Run and I haven't find references about it. 

I have a GCP project, I'm working there with Editor role. I wanted to deploy a sample container as service in Cloud Run. By default it uses us-docker.pkg.dev/cloudrun/container/hello image and for Authentication I select "Require Autentication".

Using either the console or gcp, it ends up failing with the message: "Revision 'hello-00001-s28' is not ready and cannot serve traffic. The service has encountered an internal error. Please try again later" Getting more details in the yaml of the revision I get:

 

 

status:
  observedGeneration: 1
  conditions:
  - type: Ready
    status: 'False'
    message: The service has encountered an internal error. Please try again later
    lastTransitionTime: '2023-11-14T02:43:37.149179Z'
  - type: ResourcesAvailable
    status: Unknown
    message: CreateWorkloadRouter needs to occur in route [name=hello, project=prj-gtk-d-base-zvhv,
      region=us-central1, kind=ROUTE] before revision [name=hello-00001-s28, project=prj-gtk-d-base-zvhv,
      region=us-central1, kind=REVISION] can proceed.
    lastTransitionTime: '2023-11-14T02:43:32.222824Z'
    severity: Error
  logUrl: https://console.cloud.google.com/logs/viewer?project=prj-gtk-d-base-zvhv&resource=cloud_run_revision/service_name/hello/revision_name/hello-00001-s28&advancedFilter=resource.type%3D%22cloud_run_revision%22%0Aresource.labels.service_name%3D%22hello%22%0Aresource.labels.revision_name%3D%22hello-00001-s28%22
  imageDigest: us-docker.pkg.dev/cloudrun/container/hello@sha256:9d711cdd29822eb939180555a1f79405364357b6fc097f2c91acf2551b7eb340
  containerStatuses:
  - name: hello-1
    imageDigest: us-docker.pkg.dev/cloudrun/container/hello@sha256:9d711cdd29822eb939180555a1f79405364357b6fc097f2c91acf2551b7eb340

 

 

I already turned on/of the run.googleapis.com API, waited several minutes after activation to try the creation but there's no different result. Does anyone has any guidance on what can I do to debug / solve this? There are no more details, not in logs, console notifications, or any other place.

I'll appreciate your help!

0 2 4,939
2 REPLIES 2

Hi @samuelkb31,

Welcome to Googel Cloud Community!

When Cloud Run fails to deploy with the error message "The service has encountered an internal error. Please try again later," it indicates an underlying issue preventing deployment. This could be due to temporary outages, configuration errors, or container image issues.

To troubleshoot this problem, consider the following steps:

  • Wait for the internal error to resolve, as it might be temporary.
  • Check for recent Cloud Run service updates to rule out potential bugs.
  • Verify your container image's compatibility with Cloud Run and test it locally.
  • Double-check your Cloud Run service's authentication configuration.
  • Review Cloud Run logs for additional error messages that might aid troubleshooting.
  • Contact Google Cloud support if the issue persists despite these efforts.

Additional troubleshooting tips include using the gcloud command-line tool for deployment, trying different Cloud Run regions, and deploying alternative container images to narrow down the cause.

You may check these link that might help you.

Hi @christianpaula , thanks for your answer!

To bring more details, my project was deployed using the Security Foundations blueprint,  using terraform. So the project is created with the Compute Engine default service account disabled. That was the reason it was failing to deploy Cloud run, once I set an active service account with the cloud run invoker role, I could deploy cloud run services and revisions with no issues. 

Top Solution Authors