Skip to content

Health check failed on protocol- Aws App Runner service configuration

0

Hello All,

I am trying to configure app runner service, to run an asp .net core 7 app from docker container from Aws ECR repository.

I need some help to understand the nature of following error. In the error description it says “Health check failed on protocol TCP [Port: '8080'], Check your configured port number”

app runner service configuration error

Now in the health check configuration section, I see following screen, there is no provision for setting up port number.

Asp specified in aws documentation: https://docs.aws.amazon.com/apprunner/latest/dg/manage-configure-healthcheck.html

I tried running the same docker image in my local machine with different port numbers, it works as expected.

Any guidance will be highly appreciated Thanks

asked 2 years ago2.9K views

3 Answers
1
Accepted Answer

Thanks All!

I have made my first ECR image run using App Runner

Here are the issue I had,

  1. The image I created initially was with .Net core 7 (Probably that was the problem )
  2. The port number has to match with the port we specified in our docker file (like in my docker file it was - EXPOSE 80), so at the time of service creation I changed to 80, not 8080
  3. I added another line in docker to expose another port (EXPOSE 443) – not sure if this was necessary for this case.

Finally, I am happy to see my first docker app is running on AWS.

Happy Sunday!

answered 2 years ago

EXPERT

reviewed 2 years ago

0

Hello.

The documentation states:
In other words, the port number you set for AppRunner is used for health checks.
https://docs.aws.amazon.com/apprunner/latest/dg/manage-configure-healthcheck.html

If you set the protocol to TCP, App Runner pings the default domain assigned to your service at the port that your application is listening to.

If you are configuring from the management console, the settings in the image below are also used for health checks.
a

EXPERT

answered 2 years ago

0

Thanks Rinku, for your response!

8080 was there by default. I tried changing port from there, but it did not help, throwing same error message repeatedly. I even tried with different port number, got same result.

When all above scenario works perfectly at my local environment.

To do little more with App Runner, this time I configured with Github repository with a small web app (.net core 6)

[ I noticed Aws still don’t support Net Core 7.0 when configuring source code from external repos like GitHub]

This time it’s stopping the service at the time of health check. At log line “Performing health check on protocol TCP [Port: '8080']” And after that service stops- it says to rebuild again.

Not finding any solution on AWS documentation about this error resolution.

Any guide will be helpful

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.