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

49 messages · Page 1 of 1 (latest)

minor flume
#

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

vernal basinBOT
#

Project ID: N/A

#

Project ID: N/A

minor flume
grim peak
#

is hyperdx listening on ipv4?

minor flume
#

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

grim peak
minor flume
#

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

#

like freshly new created project, same env variables

grim peak
#

odd

#

will raise, ive never seen this before

minor flume
#

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

#

steps to reproduce:
1 - deploy the following template https://railway.com/deploy/clickstack
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

grim peak
#

thank you, i will pass that info along

grim peak
#

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.

minor flume
grim peak
#

yep not an issue with our health checks

minor flume
#

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

grim peak
#

likely an upstream error

minor flume
grim peak
#

and there we go

minor flume
#

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

#

yeah seems like removing the healthcheck is the only option

grim peak
#

we do set the host header to healthcheck.railway.app but I'm fairly certain you know that

#

is there a route that does not use that middleware?

minor flume
#

/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

#

or even the private domain

grim peak
#

now you're thinking

minor flume
#

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

grim peak
#

are the services referencing each other? if so, they are deployed at the same time

minor flume
#

maybe im confusing things up but doesn't railway have an option to wait for a successful deploy when it detects a referenced variable?

grim peak
#

yes it does, but no waiting will happen if the two services reference each other

minor flume
#

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

grim peak
#

no problem!

grim peak
#

!s