I can’t reach my web app when it’s deployed to fly.io. It seems like the health check works fine because I see logs indicating that I receive requests but I can’t reach it myself. I’m listening to 0.0.0.0:8080 in the app.
Hello @rahmatjunaid thanks for pointing me to this forum
Our app prints the routing table on every request because we need to clean up so what I’m seeing is just a bunch of routing tables with no errors.These seems to correspond to when the healthcheck is running and I’m not seeing anything when I refresh my browser.
@rahmatjunaid I have now updated the logging handling so it’s at least somewhat resonable.
And as you can see we only have requests to the /healthz endpoint
2022-08-12T18:25:26.023 app[ba057140] fra [info] tzauth: [INFO] GET /healthz HTTP/1.1
2022-08-12T18:25:26.023 app[ba057140] fra [info] Host: 172.19.7.98:8080
2022-08-12T18:25:26.023 app[ba057140] fra [info] User-Agent: Consul Health Check
2022-08-12T18:25:26.023 app[ba057140] fra [info] Accept: text/plain, text/*, */*
2022-08-12T18:25:26.023 app[ba057140] fra [info] Accept-Encoding: gzip
2022-08-12T18:25:26.023 app[ba057140] fra [info] Connection: close
2022-08-12T18:25:41.023 app[ba057140] fra [info] tzauth: [INFO] GET /healthz HTTP/1.1
2022-08-12T18:25:41.023 app[ba057140] fra [info] Host: 172.19.7.98:8080
2022-08-12T18:25:41.023 app[ba057140] fra [info] User-Agent: Consul Health Check
2022-08-12T18:25:41.023 app[ba057140] fra [info] Accept: text/plain, text/*, */*
2022-08-12T18:25:41.023 app[ba057140] fra [info] Accept-Encoding: gzip
2022-08-12T18:25:41.023 app[ba057140] fra [info] Connection: close
2022-08-12T18:25:56.024 app[ba057140] fra [info] tzauth: [INFO] GET /healthz HTTP/1.1
2022-08-12T18:25:56.024 app[ba057140] fra [info] Host: 172.19.7.98:8080
2022-08-12T18:25:56.024 app[ba057140] fra [info] User-Agent: Consul Health Check
2022-08-12T18:25:56.024 app[ba057140] fra [info] Accept: text/plain, text/*, */*
2022-08-12T18:25:56.024 app[ba057140] fra [info] Accept-Encoding: gzip
2022-08-12T18:25:56.024 app[ba057140] fra [info] Connection: close
2022-08-12T18:26:11.025 app[ba057140] fra [info] tzauth: [INFO] GET /healthz HTTP/1.1
2022-08-12T18:26:11.025 app[ba057140] fra [info] Host: 172.19.7.98:8080
2022-08-12T18:26:11.025 app[ba057140] fra [info] User-Agent: Consul Health Check
2022-08-12T18:26:11.025 app[ba057140] fra [info] Accept: text/plain, text/*, */*
2022-08-12T18:26:11.025 app[ba057140] fra [info] Accept-Encoding: gzip
2022-08-12T18:26:11.025 app[ba057140] fra [info] Connection: close
2022-08-12T18:26:26.026 app[ba057140] fra [info] tzauth: [INFO] GET /healthz HTTP/1.1
2022-08-12T18:26:26.026 app[ba057140] fra [info] Host: 172.19.7.98:8080
2022-08-12T18:26:26.026 app[ba057140] fra [info] User-Agent: Consul Health Check
2022-08-12T18:26:26.026 app[ba057140] fra [info] Accept: text/plain, text/*, */*
2022-08-12T18:26:26.026 app[ba057140] fra [info] Accept-Encoding: gzip
2022-08-12T18:26:26.026 app[ba057140] fra [info] Connection: close
2022-08-12T18:26:41.027 app[ba057140] fra [info] tzauth: [INFO] GET /healthz HTTP/1.1
2022-08-12T18:26:41.027 app[ba057140] fra [info] Host: 172.19.7.98:8080
2022-08-12T18:26:41.027 app[ba057140] fra [info] User-Agent: Consul Health Check
2022-08-12T18:26:41.027 app[ba057140] fra [info] Accept: text/plain, text/*, */*
2022-08-12T18:26:41.027 app[ba057140] fra [info] Accept-Encoding: gzip
2022-08-12T18:26:41.027 app[ba057140] fra [info] Connection: close
Hi! Happy to help look into things. If you’re not getting the answer you’d expect to see to your dig queries, I’d be curious to see what IPs flyctl thinks that your app is running. What does fly ips list say? (you can also allocate IP addresses to your app with the ips subcommand).
Hey, just before you posted this I saw that I was never assigned any IP for the app. I created another one (we’re doing a staging/production setup) which got a IP assigned immediately and worked.
I’ll try to assign an IP to the staging app and see if it works.