My deployment failed due to unhealthy allocations

Hi, this is my first deployment and I have no idea on how to deploy.

This is the output of the command.

$ fly logs -a throbbing-breeze-8957

Waiting for logs...

2022-10-27T16:34:00.995 app[a4e7fd10] sin [info] > nodemon index.js

2022-10-27T16:34:01.003 app[a4e7fd10] sin [info] sh: 1: nodemon: not found

2022-10-27T16:34:02.110 app[a4e7fd10] sin [info] Starting clean up.

2022-10-27T16:34:09.364 runner[a4e7fd10] sin [info] Starting instance

2022-10-27T16:34:09.672 runner[a4e7fd10] sin [info] Configuring virtual machine

2022-10-27T16:34:09.681 runner[a4e7fd10] sin [info] Pulling container image

2022-10-27T16:34:10.710 runner[a4e7fd10] sin [info] Unpacking image

2022-10-27T16:34:10.726 runner[a4e7fd10] sin [info] Preparing kernel init

2022-10-27T16:34:11.010 runner[a4e7fd10] sin [info] Configuring firecracker

2022-10-27T16:34:11.640 runner[a4e7fd10] sin [info] Starting virtual machine

2022-10-27T16:34:11.830 app[a4e7fd10] sin [info] Starting init (commit: 249766e)...

2022-10-27T16:34:11.854 app[a4e7fd10] sin [info] Preparing to run: `/cnb/process/web` as heroku

2022-10-27T16:34:11.875 app[a4e7fd10] sin [info] 2022/10/27 16:34:11 listening on [fdaa:0:c3a3:a7b:80:a4e7:fd10:2]:22 (DNS: [fdaa::3]:53)

2022-10-27T16:34:12.708 app[a4e7fd10] sin [info] > capstone-be@1.0.0 start

2022-10-27T16:34:12.708 app[a4e7fd10] sin [info] > nodemon index.js

2022-10-27T16:34:12.715 app[a4e7fd10] sin [info] sh: 1: nodemon: not found

2022-10-27T16:34:13.862 app[a4e7fd10] sin [info] Starting clean up.

2022-10-27T16:34:26.994 runner[a4e7fd10] sin [info] Starting instance

2022-10-27T16:34:27.265 runner[a4e7fd10] sin [info] Configuring virtual machine

2022-10-27T16:34:27.268 runner[a4e7fd10] sin [info] Pulling container image

2022-10-27T16:34:28.260 runner[a4e7fd10] sin [info] Unpacking image

2022-10-27T16:34:28.266 runner[a4e7fd10] sin [info] Preparing kernel init

2022-10-27T16:34:28.549 runner[a4e7fd10] sin [info] Configuring firecracker

2022-10-27T16:34:28.945 runner[a4e7fd10] sin [info] Starting virtual machine

2022-10-27T16:34:29.124 app[a4e7fd10] sin [info] Starting init (commit: 249766e)...

2022-10-27T16:34:29.148 app[a4e7fd10] sin [info] Preparing to run: `/cnb/process/web` as heroku

2022-10-27T16:34:29.170 app[a4e7fd10] sin [info] 2022/10/27 16:34:29 listening on [fdaa:0:c3a3:a7b:80:a4e7:fd10:2]:22 (DNS: [fdaa::3]:53)

2022-10-27T16:34:30.021 app[a4e7fd10] sin [info] > capstone-be@1.0.0 start

2022-10-27T16:34:30.021 app[a4e7fd10] sin [info] > nodemon index.js

2022-10-27T16:34:30.028 app[a4e7fd10] sin [info] sh: 1: nodemon: not found

2022-10-27T16:34:31.156 app[a4e7fd10] sin [info] Starting clean up.

2022-10-27T16:34:41.001 runner[620fbf11] sin [info] Starting instance

2022-10-27T16:34:41.255 runner[620fbf11] sin [info] Configuring virtual machine

2022-10-27T16:34:41.256 runner[620fbf11] sin [info] Pulling container image

2022-10-27T16:34:42.252 runner[620fbf11] sin [info] Unpacking image

2022-10-27T16:34:42.266 runner[620fbf11] sin [info] Preparing kernel init

2022-10-27T16:34:42.544 runner[620fbf11] sin [info] Configuring firecracker

2022-10-27T16:34:42.544 runner[620fbf11] sin [info] Starting virtual machine

2022-10-27T16:34:42.739 app[620fbf11] sin [info] Starting init (commit: 249766e)...

2022-10-27T16:34:42.796 app[620fbf11] sin [info] Setting up swapspace version 1, size = 512 MiB (536866816 bytes)

2022-10-27T16:34:42.797 app[620fbf11] sin [info] no label, UUID=f6e004f8-4496-4a04-b61c-00675b156187

2022-10-27T16:34:42.805 app[620fbf11] sin [info] Preparing to run: `launcher sh ./release.sh` as heroku

2022-10-27T16:34:42.823 app[620fbf11] sin [info] 2022/10/27 16:34:42 listening on [fdaa:0:c3a3:a7b:82:620f:bf11:2]:22 (DNS: [fdaa::3]:53)

2022-10-27T16:34:44.385 app[620fbf11] sin [info] Sequelize CLI [Node: 18.9.1, CLI: 6.5.1, ORM: 6.23.2]

2022-10-27T16:34:44.412 app[620fbf11] sin [info] Loaded configuration file "config/database.js".

2022-10-27T16:34:44.412 app[620fbf11] sin [info] Using environment "production".

2022-10-27T16:34:45.111 app[620fbf11] sin [info] Database resumebuilder dropped.

2022-10-27T16:34:45.132 app[620fbf11] sin [info] npm notice

2022-10-27T16:34:45.132 app[620fbf11] sin [info] npm notice New patch version of npm available! 8.19.1 -> 8.19.2

2022-10-27T16:34:45.132 app[620fbf11] sin [info] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.19.2>

2022-10-27T16:34:45.133 app[620fbf11] sin [info] npm notice Run `npm install -g npm@8.19.2` to update!

2022-10-27T16:34:45.133 app[620fbf11] sin [info] npm notice

2022-10-27T16:34:45.856 app[620fbf11] sin [info] Sequelize CLI [Node: 18.9.1, CLI: 6.5.1, ORM: 6.23.2]

2022-10-27T16:34:45.885 app[620fbf11] sin [info] Loaded configuration file "config/database.js".

2022-10-27T16:34:45.886 app[620fbf11] sin [info] Using environment "production".

2022-10-27T16:34:46.266 app[620fbf11] sin [info] Database resumebuilder created.

2022-10-27T16:34:46.982 app[620fbf11] sin [info] Sequelize CLI [Node: 18.9.1, CLI: 6.5.1, ORM: 6.23.2]

2022-10-27T16:34:47.004 app[620fbf11] sin [info] Loaded configuration file "config/database.js".

2022-10-27T16:34:47.004 app[620fbf11] sin [info] Using environment "production".

2022-10-27T16:34:47.321 app[620fbf11] sin [info] == 20221004072538-create-user: migrating =======

2022-10-27T16:34:47.343 app[620fbf11] sin [info] == 20221004072538-create-user: migrated (0.022s)

2022-10-27T16:34:47.353 app[620fbf11] sin [info] == 20221004072918-create-cv: migrating =======

2022-10-27T16:34:47.370 app[620fbf11] sin [info] == 20221004072918-create-cv: migrated (0.017s)

2022-10-27T16:34:48.212 app[620fbf11] sin [info] Sequelize CLI [Node: 18.9.1, CLI: 6.5.1, ORM: 6.23.2]

2022-10-27T16:34:48.232 app[620fbf11] sin [info] Loaded configuration file "config/database.js".

2022-10-27T16:34:48.232 app[620fbf11] sin [info] Using environment "production".

2022-10-27T16:34:48.471 app[620fbf11] sin [info] == first: migrating =======

2022-10-27T16:34:48.487 app[620fbf11] sin [info] == first: migrated (0.016s)

2022-10-27T16:34:48.817 app[620fbf11] sin [info] Starting clean up.

2022-10-27T16:35:01.264 runner[d5c010bd] sin [info] Configuring virtual machine

2022-10-27T16:35:01.265 runner[d5c010bd] sin [info] Pulling container image

2022-10-27T16:35:02.339 runner[d5c010bd] sin [info] Preparing kernel init

2022-10-27T16:35:02.697 runner[d5c010bd] sin [info] Configuring firecracker

2022-10-27T16:35:03.129 app[d5c010bd] sin [info] Starting init (commit: 249766e)...

2022-10-27T16:35:03.145 app[d5c010bd] sin [info] Preparing to run: `/cnb/process/web` as heroku

2022-10-27T16:35:03.156 app[d5c010bd] sin [info] 2022/10/27 16:35:03 listening on [fdaa:0:c3a3:a7b:a754:d5c0:10bd:2]:22 (DNS: [fdaa::3]:53)

2022-10-27T16:35:03.719 app[d5c010bd] sin [info] > capstone-be@1.0.0 start

2022-10-27T16:35:03.719 app[d5c010bd] sin [info] > nodemon index.js

2022-10-27T16:35:12.267 runner[d5c010bd] sin [info] Starting instance

2022-10-27T16:35:12.611 runner[d5c010bd] sin [info] Pulling container image

2022-10-27T16:35:13.693 runner[d5c010bd] sin [info] Unpacking image

2022-10-27T16:35:13.697 runner[d5c010bd] sin [info] Preparing kernel init

2022-10-27T16:35:14.411 app[d5c010bd] sin [info] Starting init (commit: 249766e)...

2022-10-27T16:35:14.427 app[d5c010bd] sin [info] Preparing to run: `/cnb/process/web` as heroku

2022-10-27T16:35:14.439 app[d5c010bd] sin [info] 2022/10/27 16:35:14 listening on [fdaa:0:c3a3:a7b:a754:d5c0:10bd:2]:22 (DNS: [fdaa::3]:53)

2022-10-27T16:35:15.015 app[d5c010bd] sin [info] > capstone-be@1.0.0 start

2022-10-27T16:35:15.015 app[d5c010bd] sin [info] > nodemon index.js

2022-10-27T16:35:23.448 runner[d5c010bd] sin [info] Starting instance

2022-10-27T16:35:23.747 runner[d5c010bd] sin [info] Configuring virtual machine

2022-10-27T16:35:23.747 runner[d5c010bd] sin [info] Pulling container image

2022-10-27T16:35:24.831 runner[d5c010bd] sin [info] Unpacking image

2022-10-27T16:35:24.838 runner[d5c010bd] sin [info] Preparing kernel init

2022-10-27T16:35:25.141 runner[d5c010bd] sin [info] Configuring firecracker

2022-10-27T16:35:25.530 runner[d5c010bd] sin [info] Starting virtual machine

2022-10-27T16:35:25.700 app[d5c010bd] sin [info] Starting init (commit: 249766e)...

2022-10-27T16:35:25.715 app[d5c010bd] sin [info] Preparing to run: `/cnb/process/web` as heroku

2022-10-27T16:35:25.727 app[d5c010bd] sin [info] 2022/10/27 16:35:25 listening on [fdaa:0:c3a3:a7b:a754:d5c0:10bd:2]:22 (DNS: [fdaa::3]:53)

2022-10-27T16:35:26.295 app[d5c010bd] sin [info] > capstone-be@1.0.0 start

2022-10-27T16:35:26.295 app[d5c010bd] sin [info] > nodemon index.js

2022-10-27T16:35:26.300 app[d5c010bd] sin [info] sh: 1: nodemon: not found

After that the error is this:

--> v3 failed - Failed due to unhealthy allocations - no stable job version to auto revert to and deploying as v4 

--> Troubleshooting guide at https://fly.io/docs/getting-started/troubleshooting/
Error abort

If I run the flyctl doctor, this is the outcome:

Testing authentication token... PASSED
Testing flyctl agent... PASSED
Testing local Docker instance... Nope
Pinging WireGuard gateway (give us a sec)... PASSED

App specific checks for throbbing-breeze-8957:
Checking that app has ip addresses allocated... PASSED
Checking A record for throbbing-breeze-8957.fly.dev... PASSED
Checking AAAA record for throbbing-breeze-8957.fly.dev... PASSED

What went wrong?

The error suggests that Command “nodemod” cannot be found, and that’s likely your entrypoint or cmd

Can you share your fly.toml and perhaps your Dockerfile if present?

Thanks for your reply! Here is my fly.toml

# fly.toml file generated for throbbing-breeze-8957 on 2022-10-23T09:23:51+08:00

app = "throbbing-breeze-8957"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []

[build]
  builder = "heroku/buildpacks:20"

 [deploy]
  release_command = "sh ./release.sh"


[env]
  PORT = "8080"
  USERNAME = "postgres"
  PASSWORD = "X"
  DATABASE = "newX"
  HOST = "breeze-8957-db.internal"
  DIALECT = "postgres"
  NODE_ENV = "production"


[experimental]
  allowed_public_ports = []
  auto_rollback = true

[[services]]
  http_checks = []
  internal_port = 80
  processes = ["app"]
  protocol = "tcp"
  script_checks = []
  [services.concurrency]
    hard_limit = 25
    soft_limit = 20
    type = "connections"

  [[services.ports]]
    force_https = true
    handlers = ["http"]
    port = 80

  [[services.ports]]
    handlers = ["tls", "http"]
    port = 443

  [[services.tcp_checks]]
    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

I don’t think I have a docker. Not sure what that is.

Thanks!

So, let me check some assumptions here to make sure we can help correctly:

  1. You have an NodeJS application here, correct?
  2. Did this configuration get setup automatically for you via the fly launch command? (and then you added extra env vars and the release_command yourself?)
    • In other words, what steps did you take to get this far?
  1. Yes I have a node Js application
  2. I created a react app and did the deployment much later. So I created the .env and release.sh file

After I redeploy, it gives me the error code:
--> This release will not be available until the release command succeeds. Error server returned a non-200 status code: 503

This is due to an ongoing outage: Fly.io Status - Delayed deployments, errors during monitoring

Sir,When will it be fixed?

Thanks! Now the error is just:

--> v1 failed - Failed due to unhealthy allocations - no stable job version to auto revert to and deploying as v2