9 months ago
Trying to add a healthcheck to a service but for some reason I'm getting the following issue, seems like it's not actually a health issue with my service but with Railway itself? The error seems off, never got that one specifically.
Healthcheck works just fine when trying it through the browser
A environment variable for the port is set
46 Replies
9 months ago
project id: 6097cd13-bfe2-485b-ba57-61aebc55857a
service id: c25cda1d-e54b-4de9-8d8d-8e37db3b7753
deployment id: a4ac502a-4462-4b18-b4f2-5607d4ab484b
direct link:
9 months ago
is hyperdx listening on ipv4?
9 months ago
uhmm i've no idea
9 months ago
let me see if I can check the code, there's no env variable for it afaik
9 months ago
oh it uses nextjs under the hood so probably that env variable you told me should work
9 months ago
I tried to set the HOSTNAME=0.0.0.0 and still no luck
9 months ago
?

9 months ago
ok I'm going crazy, sometimes it works, sometimes it does not?
9 months ago
9 months ago
like freshly new created project, same env variables
9 months ago
odd
9 months ago
will raise, ive never seen this before
9 months ago
like it seems to work when I poke around with it, maybe if I remove the healthcheck to allow for an active deploy and then add it again it works?
9 months ago
i'll confirm
9 months ago
lol it is that
9 months ago
steps to reproduce:
1 - deploy the following template
2 - go to hyperdx service and see the weird error
3 - remove healthcheck from the service, deploy it
4 - add a healthcheck right after an active deployment
9 months ago
thank you, i will pass that info along
9 months ago
i've traced our healthcheck code for the v2 runtime, and the Error occurred while trying to proxy: healthcheck.railway.app/health text comes directly from the http request via code that reads directly from the response body of the http health check, this is not text from our code.
9 months ago
so not an issue with Railway? seems weird that it works on second deployment
9 months ago
yep not an issue with our health checks
9 months ago
i do not see any string match with Error occurred on hyperdx 🤔
9 months ago
likely an upstream error
9 months ago
9 months ago
and there we go
9 months ago
maybe the healthcheck tries to check if it's publicly available and then fails
9 months ago
yeah seems like removing the healthcheck is the only option
9 months ago
we do set the host header to healthcheck.railway.app but I'm fairly certain you know that
9 months ago
is there a route that does not use that middleware?
9 months ago
/api/clickhouse-proxy uses http-proxy-middleware
9 months ago
ah, one that does not use
9 months ago
maybe I can change the server_url to be localhost, seems like it's not used anywhere else

9 months ago
or even the private domain
9 months ago
now you're thinking
9 months ago
now its going through, btw maybe that error from the healthcheck should be improved to make it clear that it's from the origin
9 months ago
anyway, i guess thats all, one small problem left is that the OTEL Collector depends on HyperDX but their healthcheck runs on a different port
is it possible to create a deploy/build dependency (that message saying "waiting for deploy…" or smth like that)?
9 months ago
im using referenced variables from HyperDX but it seems that no dependency is created
9 months ago
are the services referencing each other? if so, they are deployed at the same time
9 months ago
maybe im confusing things up but doesn't railway have an option to wait for a successful deploy when it detects a referenced variable?
9 months ago
yes it does, but no waiting will happen if the two services reference each other
9 months ago
hmm fair enough
9 months ago
i'll hardcode a specific environment variable, not the best option but until we get healthcheck to specific ports it's fine
9 months ago
nvm seems like i cant do that, they're referencing private domains which may change depending on the service name
9 months ago
i'll leave it as it is
9 months ago
anyway, thread can be closed, thanks for the help brody
9 months ago
no problem!
8 months ago
!s
Status changed to Solved brody • 9 months ago