2 years ago
The docker app seems to be building, and publishing fine according to the deploy logs, but the Healthcheck is failing with
Attempt ## failed with service unavailable.
ⓘ Deployment information is only viewable by project members and Railway employees.
10 Replies
2 years ago
I verified that the health ping runs on docker desktop, and not seemingly able to do this here. Not sure what settings this requires, likely need feedback directly from Railway.
2 years ago
The health check Railway runs upon starting your app is not a ping, it is a GET request.
2 years ago
Yes, pardon the phrasing that was meant more as shorthand rather than saying "The get request happening on my app is failing." But according to the logs per the last deployment:
====================
Starting Healthcheck
====================
Path: /health
Retry window: 5m0s
Attempt #1 failed with service unavailable. Continuing to retry for 4m59s
Attempt #2 failed with service unavailable. Continuing to retry for 4m58s
Attempt #3 failed with service unavailable. Continuing to retry for 4m56s
Attempt #4 failed with service unavailable. Continuing to retry for 4m52s
Attempt #5 failed with service unavailable. Continuing to retry for 4m44s
Attempt #6 failed with service unavailable. Continuing to retry for 4m28s
Attempt #7 failed with service unavailable. Continuing to retry for 3m57s
Attempt #8 failed with service unavailable. Continuing to retry for 3m27s
Attempt #9 failed with service unavailable. Continuing to retry for 2m57s
Attempt #10 failed with service unavailable. Continuing to retry for 2m27s
Attempt #11 failed with service unavailable. Continuing to retry for 1m57s
Attempt #12 failed with service unavailable. Continuing to retry for 1m27s
Attempt #13 failed with service unavailable. Continuing to retry for 57s
Attempt #14 failed with service unavailable. Continuing to retry for 27s
1/1 replicas never became healthy!
Healthcheck failed!
However in the asp.net program.cs both are setup, and the GET request, as I said this runs when I use it on docker desktop. When the request runs locally on railway it fails.builder.Services.AddHealthChecks();app.UseHealthChecks("/health");
2 years ago
Is your app listening on the host 0.0.0.0 and the PORT environment variable?
2 years ago
The PORT variable is set to 5000, and inside the appsettings is this: "Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://0.0.0.0:5000"
},
"Https": {
"Url": "https://0.0.0.0:5001"
}
}
},
"AllowedHosts": "*"
2 years ago
The app is currently hardcoded to do this for testing on railway:app.Run("http://0.0.0.0:5000;https://0.0.0.0:5001");
2 years ago
The port environment variable is currently set in both the config, and on railway, as 5000.
2 years ago
I suppose since I've never used railway before, and all the other services I use seem to work; it would be beneficial for me if, I was told what configuration options need to be setup on the app and/or inside railway rather than just telling me the app needs to be listening to a PORT env var, when it already is.