When i run fly deploy, everything looks to be going well until its waiting for the app to become healthy and then i cant get my app working. Healthy states 0/3 have passed and all showing critical
2024-05-20T10:02:09.584 app[32871445bd4dd8] lhr [info] 🚀 We have liftoff!
2024-05-20T10:02:09.585 app[32871445bd4dd8] lhr [info] Local: http://localhost:3001
2024-05-20T10:02:09.585 app[32871445bd4dd8] lhr [info] On Your Network: http://172.19.144.202:3001
2024-05-20T10:02:09.585 app[32871445bd4dd8] lhr [info] Press Ctrl+C to stop
[PR03] could not find a good candidate within 90 attempts at load balancing. last error: [PR01] no known healthy instances found for route tcp/443. (hint: is your app shut down? is there an ongoing deployment with a volume or are you using the 'immediate' strategy? have your app's instances all reached their hard limit?)
Local logs:
--> Pushing image done
image: registry.fly.io/hmsu-staging:deployment-01HYAQ2SXVGFJDXYSEPB2QV106
image size: 456 MB
Watch your deployment at https://fly.io/apps/hmsu-staging/monitoring
-------
Updating existing machines in 'hmsu-staging' with rolling strategy
WARNING The app is not listening on the expected address and will not be reachable by fly-proxy.
You can fix this by configuring your app to listen on the following addresses:
- 0.0.0.0:8080
Found these processes inside the machine with open listening sockets:
PROCESS | ADDRESSES
----------------------------------------------------------------*---------------------------------------
litefs mount -- /app/other/docker-entrypoint.js npm run start | [::]:20202, [::]:34291
/.fly/hallpass | [fdaa:5:1cc2:a7b:1ef:95e7:f5df:2]:22
node . | [::]:3001
-------
✖ Machine 32871445bd4dd8 [app] update failed: timeout reached waiting for health checks to pass for machine 32871445bd4dd8: failed to g…
-------
Checking DNS configuration for hmsu-staging.fly.dev
Error: timeout reached waiting for health checks to pass for machine 32871445bd4dd8: failed to get VM 32871445bd4dd8: Get "https://api.machines.dev/v1/apps/hmsu-staging/machines/32871445bd4dd8": net/http: request canceled
Your machine never reached the state "%s".
You can try increasing the timeout with the --wait-timeout flag
Updating existing machines in 'hmsu-staging' with rolling strategy
WARNING The app is not listening on the expected address and will not be reachable by fly-proxy.
You can fix this by configuring your app to listen on the following addresses:
- 0.0.0.0:8080
Found these processes inside the machine with open listening sockets:
PROCESS | ADDRESSES
----------------------------------------------------------------*---------------------------------------
litefs mount -- /app/other/docker-entrypoint.js npm run start | [::]:20202, [::]:44833
/.fly/hallpass | [fdaa:5:1cc2:a7b:1ef:95e7:f5df:2]:22
node . | [::]:3001
-------
✖ Machine 32871445bd4dd8 [app] update failed: timeout reached waiting for health checks to pass for machine 328…
-------
Checking DNS configuration for hmsu-staging.fly.dev
Error: timeout reached waiting for health checks to pass for machine 32871445bd4dd8: failed to get VM 32871445bd4dd8: Get "https://api.machines.dev/v1/apps/hmsu-staging/machines/32871445bd4dd8": net/http: request canceled
Your machine never reached the state "%s".
You can try increasing the timeout with the --wait-timeout flag
fly status gives me:
App
Name = hmsu-staging
Owner = personal
Hostname = hmsu-staging.fly.dev
Image = hmsu-staging:deployment-01HYB71RGE5MMMQRG2Q8YYZPR7
Machines
PROCESS ID VERSION REGION STATE ROLE CHECKS LAST UPDATED
app 32871445bd4dd8 8 lhr started primary 3 total, 3 critical 2024-05-20T14:39:13Z
--> Pushing image done
image: registry.fly.io/hmsu-staging:deployment-01HYBEHFZYW443N83ZDFV5MM3Q
image size: 464 MB
Watch your deployment at https://fly.io/apps/hmsu-staging/monitoring
-------
Updating existing machines in 'hmsu-staging' with rolling strategy
WARNING The app is not listening on the expected address and will not be reachable by fly-proxy.
You can fix this by configuring your app to listen on the following addresses:
- 0.0.0.0:8080
Found these processes inside the machine with open listening sockets:
PROCESS | ADDRESSES
----------------------------------------------------------------*---------------------------------------
litefs mount -- /app/other/docker-entrypoint.js npm run start | [::]:20202, [::]:44991
/.fly/hallpass | [fdaa:5:1cc2:a7b:1ef:95e7:f5df:2]:22
node . | [::]:3001
-------
✖ Machine 32871445bd4dd8 [app] update failed: timeout reached waiting for health checks to pass for machine 328…
-------
Checking DNS configuration for hmsu-staging.fly.dev
Error: timeout reached waiting for health checks to pass for machine 32871445bd4dd8: failed to get VM 32871445bd4dd8: Get "https://api.machines.dev/v1/apps/hmsu-staging/machines/32871445bd4dd8": net/http: request canceled
Your machine never reached the state "%s".
You can try increasing the timeout with the --wait-timeout flag
fly status
App
Name = hmsu-staging
Owner = personal
Hostname = hmsu-staging.fly.dev
Image = hmsu-staging:deployment-01HYBEHFZYW443N83ZDFV5MM3Q
Machines
PROCESS ID VERSION REGION STATE ROLE CHECKS LAST UPDATED
app 32871445bd4dd8 11 lhr started primary 3 total, 3 warning 2024-05-20T16:50:07Z
When trying to access the url i get:
2024-05-20T17:18:27.892 proxy[32871445bd4dd8] lhr [error] [PC01] instance refused connection. is your app listening on 0.0.0.0:8080? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)
2024-05-20T17:18:38.353 proxy[32871445bd4dd8] lhr [error] [PC01] instance refused connection. is your app listening on 0.0.0.0:8080? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)
--> Pushing image done
image: registry.fly.io/hmsu-staging:deployment-01HYD35DJKB8AEKFNKZC4FZBBE
image size: 464 MB
Watch your deployment at https://fly.io/apps/hmsu-staging/monitoring
-------
Updating existing machines in 'hmsu-staging' with rolling strategy
WARNING The app is not listening on the expected address and will not be reachable by fly-proxy.
You can fix this by configuring your app to listen on the following addresses:
- 0.0.0.0:8080
Found these processes inside the machine with open listening sockets:
PROCESS | ADDRESSES
----------------------------------------------------------------*---------------------------------------
litefs mount -- /app/other/docker-entrypoint.js npm run start | [::]:20202, [::]:45267
/.fly/hallpass | [fdaa:5:1cc2:a7b:1ef:95e7:f5df:2]:22
node . | [::]:3001
-------
✖ Machine 32871445bd4dd8 [app] update failed: timeout reached waiting for health checks to pass for machine 328…
-------
Checking DNS configuration for hmsu-staging.fly.dev
Error: timeout reached waiting for health checks to pass for machine 32871445bd4dd8: failed to get VM 32871445bd4dd8: Get "https://api.machines.dev/v1/apps/hmsu-staging/machines/32871445bd4dd8": net/http: request canceled
Your machine never reached the state "%s".
You can try increasing the timeout with the --wait-timeout flag
fly status
App
Name = hmsu-staging
Owner = personal
Hostname = hmsu-staging.fly.dev
Image = hmsu-staging:deployment-01HYD35DJKB8AEKFNKZC4FZBBE
Machines
PROCESS ID VERSION REGION STATE ROLE CHECKS LAST UPDATED
app 32871445bd4dd8 15 lhr stopped primary 3 total, 3 warning 2024-05-21T08:15:17Z
I see you are having some issues with getting your app to listen on the correct port/address. I have found some documentation that lists out steps on what to do when experiencing this issue: