Health check on custom port number fails.

0

I attempted to define a new App Runner web api service running on port 5000. The creation fails the health check step, but the failure message states port 8080 which is the default port number on the setup screen. Is it truly using port 8080 for the health check or is the error message string using the default port always? The event prior states health check will occur on port 5000.

Log:

06-20-2021 09:34 PM [AppRunner] Health check on port '8080' failed. Service is rolling back. Check your configured port number. For more information, read the service's logs.
06-20-2021 09:28 PM [AppRunner] Performing health check on path '/' and port '5000'.
06-20-2021 09:28 PM [AppRunner] Provisioning instance and deploying image.
06-20-2021 09:28 PM [AppRunner] Successfully pulled image from ECR.
06-20-2021 09:25 PM [AppRunner] Service status is set to OPERATION_IN_PROGRESS.
06-20-2021 09:25 PM [AppRunner] Service creation started.

Edited by: SamSan on Jun 24, 2021 7:57 AM

SamSan
已提问 3 年前2855 查看次数
3 回答
0

I have tried port 80 as well as the default port 8080 with the same results where the health check fails. I also tried a different URL from the default "/" with a custom URL "/healthcheck" using the AWS CLI "aws apprunner create-service" command. Also, ensured the health check was being done with HTTP with the AWS CLI. More detailed error messages are definitely needed. This is a Flask app using a Docker container and the port and /healthcheck URL are accessible when running the container locally. The same container works when deployed to Fargate. Is anyone from Amazon App Runner team monitoring this Forum?

SamSan
已回答 3 年前
0

I resolved the problem by ensuring that my Dockerfile had an ENTRYPOINT value which launches the software desired - in my case, Flask.

My container was configured by both a docker-compose.yml file and a Dockerfile. I had defined the ENTRYPOINT, actually spelled in lower case within the docker-compose.yml file - entrypoint, within the docker-compose.yml file vs. the Dockerfile. AppRunner ignores, truly is not aware of, the docker-compose.yml file, since it is simply driven by the container stored in the ECR. AppRunner should perhaps also consider the docker-compose.yml file. In my organization and others I'm familiar with the docker-compose.yml file or a set of docker-compose files are extremely important in the configuration of the Docker environment. The Docker file alone is NOT enough most of the time. In this case, the ENTRYPOINT can be specified in the Dockerfile and if any entrypoint is also configured in the docker-compose.yml file it overrides the Dockerfile ENTRYPOINT (https://docs.docker.com/compose/compose-file/compose-file-v3/#entrypoint)

SamSan
已回答 3 年前
0

Getting same error.

I am trying to deploy a github repository (.net 6 application), getting the following result

"[AppRunner] Performing health check on port '8080'.", "[AppRunner] Health check failed on port '8080'. Check your configured port number. For more information, read the application logs."

已回答 7 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则