Failed due to unhealthy allocations - no stable job version to auto revert to and deploying

Hi there,

This error happened more than once when running fly depoly --local-only.

2023-01-04T14:18:13Z   [info]Starting virtual machine
2023-01-04T14:18:13Z   [info]Starting init (commit: f447594)...
2023-01-04T14:18:13Z   [info]Preparing to run: `/cnb/process/whois` as 1000
2023-01-04T14:18:13Z   [info]2023/01/04 14:18:13 listening on [fdaa:1:1a3d:a7b:a596:340c:f0d8:2]:22 (DNS: [fdaa::3]:53)
2023-01-04T14:18:13Z   [info]2023/01/04 14:18:13 open config.toml: no such file or directory
2023-01-04T14:18:14Z   [info]Starting clean up.
2023-01-04T14:18:20Z   [info]Starting instance
2023-01-04T14:18:21Z   [info]Configuring virtual machine
2023-01-04T14:18:21Z   [info]Pulling container image
2023-01-04T14:18:21Z   [info]Unpacking image
2023-01-04T14:18:21Z   [info]Preparing kernel init
2023-01-04T14:18:21Z   [info]Configuring firecracker
2023-01-04T14:18:21Z   [info]Starting virtual machine
2023-01-04T14:18:21Z   [info]Starting init (commit: f447594)...
2023-01-04T14:18:21Z   [info]Preparing to run: `/cnb/process/whois` as 1000
2023-01-04T14:18:21Z   [info]2023/01/04 14:18:21 listening on [fdaa:1:1a3d:a7b:a596:340c:f0d8:2]:22 (DNS: [fdaa::3]:53)
2023-01-04T14:18:21Z   [info]2023/01/04 14:18:21 open config.toml: no such file or directory
2023-01-04T14:18:22Z   [info]Starting clean up.
2023-01-04T14:18:29Z   [info]Starting instance
2023-01-04T14:18:29Z   [info]Configuring virtual machine
2023-01-04T14:18:29Z   [info]Pulling container image
2023-01-04T14:18:29Z   [info]Unpacking image
2023-01-04T14:18:29Z   [info]Preparing kernel init
2023-01-04T14:18:30Z   [info]Configuring firecracker
2023-01-04T14:18:30Z   [info]Starting virtual machine
2023-01-04T14:18:30Z   [info]Starting init (commit: f447594)...
2023-01-04T14:18:30Z   [info]Preparing to run: `/cnb/process/whois` as 1000
2023-01-04T14:18:30Z   [info]2023/01/04 14:18:30 listening on [fdaa:1:1a3d:a7b:a596:340c:f0d8:2]:22 (DNS: [fdaa::3]:53)
2023-01-04T14:18:30Z   [info]2023/01/04 14:18:30 open config.toml: no such file or directory
2023-01-04T14:18:31Z   [info]Starting clean up.
--> 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

But the config.toml actually exist.

The fly.toml:

# fly.toml file generated for aidoru-whois on 2023-01-04T13:49:16Z

app = "aidoru-whois"
kill_signal = "SIGINT"
kill_timeout = 5


[build]
  builder = "paketobuildpacks/builder:base"
  buildpacks = ["gcr.io/paketo-buildpacks/go"]

[env]
  PORT = "8080"

[experimental]
  allowed_public_ports = []
  auto_rollback = true

[[services]]
  http_checks = []
  internal_port = 8080
  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"

Logs:

2023-01-04T14:18:20.607 runner[340cf0d8] lax [info] Starting instance

2023-01-04T14:18:21.086 runner[340cf0d8] lax [info] Configuring virtual machine

2023-01-04T14:18:21.087 runner[340cf0d8] lax [info] Pulling container image

2023-01-04T14:18:21.380 runner[340cf0d8] lax [info] Unpacking image

2023-01-04T14:18:21.390 runner[340cf0d8] lax [info] Preparing kernel init

2023-01-04T14:18:21.648 runner[340cf0d8] lax [info] Configuring firecracker

2023-01-04T14:18:21.728 runner[340cf0d8] lax [info] Starting virtual machine

2023-01-04T14:18:21.882 app[340cf0d8] lax [info] Starting init (commit: f447594)...

2023-01-04T14:18:21.901 app[340cf0d8] lax [info] Preparing to run: `/cnb/process/whois` as 1000

2023-01-04T14:18:21.914 app[340cf0d8] lax [info] 2023/01/04 14:18:21 listening on [fdaa:1:1a3d:a7b:a596:340c:f0d8:2]:22 (DNS: [fdaa::3]:53)

2023-01-04T14:18:21.953 app[340cf0d8] lax [info] 2023/01/04 14:18:21 open config.toml: no such file or directory

2023-01-04T14:18:22.907 app[340cf0d8] lax [info] Starting clean up.

2023-01-04T14:18:29.061 runner[340cf0d8] lax [info] Starting instance

2023-01-04T14:18:29.504 runner[340cf0d8] lax [info] Configuring virtual machine

2023-01-04T14:18:29.505 runner[340cf0d8] lax [info] Pulling container image

2023-01-04T14:18:29.801 runner[340cf0d8] lax [info] Unpacking image

2023-01-04T14:18:29.807 runner[340cf0d8] lax [info] Preparing kernel init

2023-01-04T14:18:30.065 runner[340cf0d8] lax [info] Configuring firecracker

2023-01-04T14:18:30.133 runner[340cf0d8] lax [info] Starting virtual machine

2023-01-04T14:18:30.295 app[340cf0d8] lax [info] Starting init (commit: f447594)...

2023-01-04T14:18:30.314 app[340cf0d8] lax [info] Preparing to run: `/cnb/process/whois` as 1000

2023-01-04T14:18:30.328 app[340cf0d8] lax [info] 2023/01/04 14:18:30 listening on [fdaa:1:1a3d:a7b:a596:340c:f0d8:2]:22 (DNS: [fdaa::3]:53)

2023-01-04T14:18:30.366 app[340cf0d8] lax [info] 2023/01/04 14:18:30 open config.toml: no such file or directory

2023-01-04T14:18:31.318 app[340cf0d8] lax [info] Starting clean up.

Thanks a lot in advance.

Hi!

Do you get that error every deployment?

I wonder if the toml file is being ignored in a .dockerignore file, or perhaps the WORKDIR is set somewhere unexpected so the path to the config.toml file isn’t correct?

I’m seeing the same thing on my app

started this morning but the app is running just fine, which is weird

1 Like

Hi,

I checked my .dockerignore file, and it doesn’t contain config.toml. As for WORKDIR, I don’t have a Dockerfile in my project folder. This project is based on Go, should i create one manually?

Thanks!

I (meaning @rugwiro, who is smarter than me) suspects that the config.toml file isn’t getting copied due to buildpack configurations.

It looks like you can set an env var BP_KEEP_FILES in your fly.toml file to tell it to keep certain files - see here for reference: How to Build Go Apps with Paketo Buildpacks - Paketo Buildpacks