AspNetCore.Diagnostics.HealthChecks
AspNetCore.Diagnostics.HealthChecks copied to clipboard
How can i connect to HealthChecks UI docker image with https ?
i have made a docker compose with container and added the container name to the Health Checks UI like this : "https://CONTINAER NAME" but i getting error "The SSL connection could not be established, see inner exception." if i put it like this: "CONTINAER NAME" i am getting the error: "IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address. (Parameter 'hostName')"
the docker container can be access via browser via https://localhost:5000 - UI for the checks https://localhost:5012 ports - checks client
what am i doing wrong ??
+1, same proleme here
I manage to solve it using Dns.GetHostName(). Your app must run on port 80 or 443 for https. Else specify the port Dns.GetHostName():3227
setup.AddHealthCheckEndpoint(group, $"http://{Dns.GetHostName()}/healthchecks-{group}");
and when you launch your docker, you need to specify a hostname. It can be anything.
docker run -h hostname webapi
On Azure WebApp for linux containers, they automaticly set a hostname.
The library is great except that lol. I hope they make a fix
Hi @comm-amir-david @MaxThom
I try to review this ASAP!