Cloud Run Deployment Error-"fail to initialize config manager: fail to unmarshal service config"

Hello Google Cloud community,

I hope you are all doing well. I am currently facing an issue while trying to perform a full deployment on App Engine with Google Cloud Run. I have followed the steps mentioned in the documentation, but the deployment is failing at below command:

gcloud run deploy service-name --image="gcr.io/dummy-project/endpoints-runtime-serverless:2.45.0-dummy-service-insp-b6h36za-uc.a.run.app-2023-07-17r1" --allow-unauthenticated --platform managed --project project-id

and I’m encountering the following error:

Revision 'service-name-00083-yaw' is not ready and cannot serve traffic. The user-provided container failed to start and listen on the port defined provided by the PORT= 8080 environment variable. Logs for this revision might contain more information.

After further investigation into the logs, I came across the following line that seems to be related to the issue:

fail to initialize config manager: fail to unmarshal service config with error: fail to unmarshal serviceConfig: proto: (line 217:3): unknown field "legacy"

I’m using the image “Google Cloud console” for the deployment, and it seems to be causing the problem.

I have tried searching for a solution and followed the troubleshooting guidance provided by Google Cloud Run, but I haven’t been able to resolve the issue.

If anyone from the community has encountered a similar problem or has any insights on how to fix this issue, I would be extremely grateful for your help.

Thank you in advance for your time and assistance!

Best regards,
Kamalakar Rao

3 Likes

Hi,

Been awhile I looked at the deploy command so things might have changed; looking at your deploy command, it looks to me like you’re deploying a url and not an image

Try the following command

gcloud run deploy <service-name> --image="gcr.io/dummy-project/endpoints-runtime-serverless:2.45.0-dummy-service-insp" --allow-unauthenticated --platform managed --project <project-id>

I removed “-b6h36za-uc.a.run.app-2023-07-17r1” cos that’s the part that makes it a cloud run url (see this stackoverflow answer for a cloud run url format)

… NoCommandLine …
https://nocommandline.com

A GUI for Google App Engine

1 Like

Thank you for your response.
When we run below command , It gives the GCR.IO Url which can be used in gcloud run deploy command.

./gcloud_build_image -s service-url -c 2023-07-17r1 -p project-id

It was working fine with previous container image but not working with latest container image.

1 Like

RCA: Upon investigation, we discovered that the issue stemmed from using the default version of the container image, specifically version 2.45.0, during the deployment process

Solution: To address this deployment issue, we recommend using a different version of the container image during the deployment process. By explicitly specifying version 2.44.0 with the “-v” flag in the “gcloud_build_image” command, as shown below:

./gcloud_build_image -s service-url -c 2023-07-19r0 -p project-id -v 2.44.0

By default, If we don’t specify -v version then it will pick latest version.
The latest version got updated to 2.45.0 after July 12th which possible causing the issue.

By This Solution, The deployment should proceed successfully

2 Likes

tnx, works for me!

Awesome. it works for me