a year ago
I've been deploying some changes in my application and all of sudden the deployment failed due to a 404 response on the healthcheck endpoint. Reviewing the logs of the service at Axiom (observability tool) I encountered an strange slash at the beggining of the URL used to do the healthcheck and of course the requests ends up in 301 response because that URL doesn't exists and the router is trying to do a redirect to resolve that URI.
The logs
{
"correlationid": "ca22f76d-f79c-4eea-ab9b-c16ff0346fa5", "httpreferrer": "http://192.168.0.53:6559/https://[evt-hub-api-preprod.coruna.community/health](evt-hub-api-preprod.coruna.community/health)",
"httpuseragent": "Go-http-client/1.1",
"level": "INFO",
"message": "GET /https:/evt-hub-api-preprod.coruna.community/health 404 2024-04-16T21:11:57Z 10.10.10.12:51318 0 http://192.168.0.53:6559/https://[evt-hub-api-preprod.coruna.community/health](evt-hub-api-preprod.coruna.community/health)", "msg": "GET /https:/evt-hub-api-preprod.coruna.community/health 404 2024-04-16T21:11:57Z 10.10.10.12:51318 0 http://192.168.0.53:6559/https://[evt-hub-api-preprod.coruna.community/health](evt-hub-api-preprod.coruna.community/health)",
"remoteaddrip": "10.10.10.12:51318",
"request": "/https:/evt-hub-api-preprod.coruna.community/health", "requestmethod": "GET",
"requesttimed": 0,
"responsecontenttype": "text/plain; charset=utf-8",
"status": 404
}
{
"correlationid": "39086ebb-2e28-47a6-b715-803057cd772b", "httpreferrer": "http://192.168.0.53:6559/https://[evt-hub-api-preprod.coruna.community/health](evt-hub-api-preprod.coruna.community/health)",
"httpuseragent": "Go-http-client/1.1",
"level": "INFO",
"message": "GET /https:/evt-hub-api-preprod.coruna.community/health 404 2024-04-16T21:13:27Z 10.10.10.12:51500 0 http://192.168.0.53:6559/https://[evt-hub-api-preprod.coruna.community/health](evt-hub-api-preprod.coruna.community/health)", "msg": "GET /https:/evt-hub-api-preprod.coruna.community/health 404 2024-04-16T21:13:27Z 10.10.10.12:51500 0 http://192.168.0.53:6559/https://[evt-hub-api-preprod.coruna.community/health](evt-hub-api-preprod.coruna.community/health)",
"remoteaddrip": "10.10.10.12:51500",
"request": "/https:/evt-hub-api-preprod.coruna.community/health", "requestmethod": "GET",
"requesttimed": 0,
"responsecontenttype": "text/plain; charset=utf-8",
"status": 404
}
Perhaps I'm wrong that's why I'm able to see on the logs.
ⓘ Deployment information is only viewable by Project members and Railway admins.
7 Replies
a year ago
The health check field does not accept full URLs, you can only enter a path - /_health
a year ago
That would be nice to be validated on the form field with a simple regex or so to avoid these kind of mistakes, I'll give it a try deploying a PR and check that everything work as expected.
Thanks dude!
a year ago
It works :D