Cloud Run returns HTTP 404 for authenticated Cloud Tasks requests, but Docker container returns HTTP 200 locally

Hello Google Cloud Community,

I’m troubleshooting an HTTP 404 issue with a private Cloud Run service invoked by Cloud Tasks using OIDC authentication.

Environment

  • Google Cloud region: asia-south1

  • Runtime: Node.js 24

  • Cloud Run service: lumivo-solo-assembly-worker

  • Container port: 8080

  • Authentication: Required (IAM)

  • Ingress: All

  • Identity-Aware Proxy: Disabled

  • Revision: lumivo-solo-assembly-worker-00001-phr (healthy, receiving 100% traffic)

  • Cloud Tasks queue: lumivo-solo-assembly, same region

  • Cloud Tasks OIDC service account has roles/run.invoker on the specific Cloud Run service

Expected behavior

A Cloud Tasks HTTP GET request to /healthz, authenticated with an OIDC token, should return HTTP 200.

Actual behavior

Cloud Tasks returns:

NOT_FOUND(5): HTTP status code 404

This happens using both the project-number-based and canonical Cloud Run run.app URLs, with the corresponding URL used as the OIDC audience.

What has been verified

  1. The exact deployed container image was pulled from Artifact Registry and tested locally.

  2. Its /healthz endpoint returns HTTP 200 with JSON:
    {"status":"ok","component":"solo-live-assembly-foundation"}

  3. The production bootstrap successfully binds to 0.0.0.0:8080, and its /healthz endpoint also returns HTTP 200 locally.

  4. Cloud Run reports the revision as healthy and ready, with 100% traffic.

  5. Ingress is set to All, and the default HTTPS endpoint is enabled.

  6. IAM authentication is required, and the dedicated Cloud Tasks invoker has roles/run.invoker.

  7. Cloud Tasks attempted delivery and received HTTP 404 on both tested URLs.

  8. No matching /healthz request logs were found in Cloud Run, and the request metrics showed no data for the relevant test window.

Question

What could cause Cloud Tasks to receive HTTP 404 for a valid Cloud Run service URL when the deployed application responds with HTTP 200 locally, the revision is healthy, and no corresponding requests appear in Cloud Run logs or metrics?

Is there a recommended way to determine whether the 404 originates from Cloud Run’s frontend routing, authentication handling, or another layer before the container?

I’d appreciate guidance on targeted diagnostics that do not require making the service publicly accessible.

Thank you.

This is the path, not your config. Cloud Run reserves URL paths ending in “z”, and /healthz is one of them, so the platform intercepts the request before it ever reaches your container. That explains both the 404 and the missing request logs, and why it works fine in Docker locally. Point the task at a different route like /health and the 404 should go away.