Hi
I'm trying to run a pipeline agent in cloud run and it works fine for a few minutes until I get this error caused by the startup probe (which btw I cannot remove/skip deploying with gcloud)
The user-provided container failed to start and listen on the port defined provided by the PORT=8080
My container is listening at that port and I'm deploying the service on the same port.
Tried deploying on port 80 and got the same odd behaviour.
Any way to skip this check or magic to prevent this failure that's not real (the agent works until is killed by this).
My guess is the agent is ignoring the probe, but not because it doesn't work, but because is working on a pending job...
Hi @lalvar1 ,
Welcome to Google Cloud Community!
First, you need to confirm again if you can run your container image locally. According to this documentation, check if the container is listening for incoming HTTP requests on the port that is defined by Cloud Run. Also confirm if the ‘PORT’ environment variable value inside the Cloud Run container reflects the port to which requests are sent.
You can do this if you need to configure the container ports.
If all port configuration are consistent within the container and Cloud Run, it’s recommended to contact the Google Cloud Support.
Thanks!
Hi @Michael_Conde , thanks for your reply!
I can run it locally and even on a k8s cluster...
As mentioned, it even works here, but it's then killed in the middle of it's processing (it's an pipeline agent) by the probe and throws this error: STARTUP TCP probe failed 1 time consecutively for container "base-1" on port 8080. The instance was not started.
port configs are consistent, my problem is the probe, which I cannot even get rid of, not even unchecking it in the console...
Looks like I'm having the same issue now. Deploying a GRPC server, runs fine locally. I don't suppose there was a resolution to this?
Hey @shanif-locusive . Thanks for raising this up.
I still haven't found a workaround and I've raised an issue/bug for this.
I'll post it here if I get any solution.
@lalvar1 Facing the same issue when trying to deploy a grpc server, runs fine locally as well as on a VM. Did you find any workaround yet ?
Is there a difference between the port in the Dockerfile and the port configured in cloudrun (default is 8080)?
No, that's the 1st thing I checked... this works fine locally and on other cloud providers. This is definitely bugged on GCP.
Well, looks like still issue exist, I am facing the same issue.
I'm having the same issue when deploying a Next.js app with a standalone build.
I had the exact same issue with Next.js. As soon as I stopped using the standalone build it started working for me.
Thanks for the reply.
I've just managed to make it run with the standalone build by setting the env variable HOSTNAME = "0.0.0.0".
Hey Gabrieldl,
Thanks for sharing , although can you please clarify ; did you set this environment variable in next js or somewhere in gcp’s docker yaml file ?
Having the same issue and I’m stuck .
I set it on Dockerfile, like this:
For anyone who stumbles on this page like I did, using `0.0.0.0` worked for me for a Dart based Cloud Run service. I was previously using "localhost" and that did not work.