Error occurred while trying to proxy: healthcheck.railway.app/health

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

Solved$10 Bounty

46 Replies

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?


uhmm i've no idea


let me see if I can check the code, there's no env variable for it afaik


oh it uses nextjs under the hood so probably that env variable you told me should work


I tried to set the HOSTNAME=0.0.0.0 and still no luck


a year ago

?

1385815001771675648


ok I'm going crazy, sometimes it works, sometimes it does not?



like freshly new created project, same env variables


a year ago

odd


a year ago

will raise, ive never seen this before


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?


i'll confirm


lol it is that


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.


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


i do not see any string match with Error occurred on hyperdx 🤔


a year ago

likely an upstream error



a year ago

and there we go


maybe the healthcheck tries to check if it's publicly available and then fails


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?


/api/clickhouse-proxy uses http-proxy-middleware


ah, one that does not use


maybe I can change the server_url to be localhost, seems like it's not used anywhere else

1386916289754431518


or even the private domain


a year ago

now you're thinking


now its going through, btw maybe that error from the healthcheck should be improved to make it clear that it's from the origin


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)?


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


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


hmm fair enough


i'll hardcode a specific environment variable, not the best option but until we get healthcheck to specific ports it's fine


nvm seems like i cant do that, they're referencing private domains which may change depending on the service name


i'll leave it as it is


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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...