简体   繁体   中英

GCP Cloud Run 503 Error: Service unavailable for asp.net website

I'm trying to deploy the asp.net website in cloud run but am stuck with this error - " The request failed because either the HTTP response was malformed or connection to the instance had an error . (Service Unavailable 503 )"

This is https & http docker files. one of many such services.

在此处输入图像描述

在此处输入图像描述

for http-5176 -- http URL of cloud run is not registered in the azureAD app - I'm getting can't redirect error when I access the cloud run URL which is expected that is fine.

but for https-7176 -- https URL of cloud run which is registered in azureAD is immediately throwing Service Unavailable 503, not sure whether it is redirected to auth or not.

Thing is, when I try these two container images locally in docker desktop it is working fine - https://localhost:PORT redirects to authentication page and website is loaded as expected with some other api call errors. But when I deploy the same in cloud run -- Service Unavailable 503 Cloud run config

  • 2 CPU limit
  • 512MB Memory limit
  • 1 Concurrency
  • 500sec request timeout

Tried some troubleshooting

  • Concurrency is at low
  • No VPC access connector is used for now.
  • No errors on memory exceeding in logs

Expecting - to authenticate and load webpage knowing that there are few api error in that to work on later.

Do you have any idea what could be causing this? And how to reslove this?

Thanks for your answers in advance.

As cloud run redirects HTTP requests to HTTPS. after a long trial and error, with my application team. In the code, they added a redirection from HTTP to HTTPS and I'm running my cloud-run service in the HTTP port. Now it is working fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM