a year 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
a year ago
project id: 6097cd13-bfe2-485b-ba57-61aebc55857a
service id: c25cda1d-e54b-4de9-8d8d-8e37db3b7753
deployment id: a4ac502a-4462-4b18-b4f2-5607d4ab484b
direct link:
a year ago
is hyperdx listening on ipv4?
a year ago
uhmm i've no idea
a year ago
let me see if I can check the code, there's no env variable for it afaik
a year ago
oh it uses nextjs under the hood so probably that env variable you told me should work
a year ago
I tried to set the HOSTNAME=0.0.0.0 and still no luck
a year ago
?

a year ago
ok I'm going crazy, sometimes it works, sometimes it does not?
a year ago
a year ago
like freshly new created project, same env variables
a year ago
odd
a year ago
will raise, ive never seen this before
a year 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?
a year ago
i'll confirm
a year ago
lol it is that
a year 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
a year ago
thank you, i will pass that info along
a year 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.
a year ago
so not an issue with Railway? seems weird that it works on second deployment
a year ago
yep not an issue with our health checks
a year ago
i do not see any string match with Error occurred on hyperdx 🤔
a year ago
likely an upstream error
a year ago
a year ago
and there we go
a year ago
maybe the healthcheck tries to check if it's publicly available and then fails
a year ago
yeah seems like removing the healthcheck is the only option
a year ago
we do set the host header to healthcheck.railway.app but I'm fairly certain you know that
a year ago
is there a route that does not use that middleware?
a year ago
/api/clickhouse-proxy uses http-proxy-middleware
a year ago
ah, one that does not use
a year ago
maybe I can change the server_url to be localhost, seems like it's not used anywhere else

a year ago
or even the private domain
a year ago
now you're thinking
a year 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
a year 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)?
a year ago
im using referenced variables from HyperDX but it seems that no dependency is created
a year ago
are the services referencing each other? if so, they are deployed at the same time
a year 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?
a year ago
yes it does, but no waiting will happen if the two services reference each other
a year ago
hmm fair enough
a year ago
i'll hardcode a specific environment variable, not the best option but until we get healthcheck to specific ports it's fine
a year ago
nvm seems like i cant do that, they're referencing private domains which may change depending on the service name
a year ago
i'll leave it as it is
a year ago
anyway, thread can be closed, thanks for the help brody
a year ago
no problem!
a year ago
!s
Status changed to Solved brody • 12 months ago