After successfully deploying my rust service last week I went back to make a minor change and found that the same build command no longer works. I’m almost certain this is unrelated to the change I made.
I’m having trouble finding the issue from the deployment error and service logs and any help would be appreciated. Here is the output from fly-deploy --remote-only
which I must use because I’m on an M1 Mac:
❯ fly deploy --remote-only
==> Verifying app config
--> Verified app config
==> Building image
Remote builder fly-builder-dry-moon-914 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
[+] Building 149.4s (0/1)
[+] Building 0.2s (20/20) FINISHED
=> CACHED [internal] load remote build context 0.0s
=> CACHED copy /context / 0.0s
=> [internal] load metadata for docker.io/library/debian:buster-slim 0.2s
=> [internal] load metadata for docker.io/library/rust:latest 0.2s
=> [stage-1 1/11] FROM docker.io/library/debian:buster-slim@sha256:e61cffb42ef0dbb31832d4543d6998ab9125210d0136bc0aed65cc753cee9125 0.0s
=> [rust-env 1/4] FROM docker.io/library/rust:latest@sha256:12993d6e83049487cabb7afe0864535140f6e8b0322a45532a0a337fac870355 0.0s
=> CACHED [stage-1 2/11] RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && apt-get install -y libssl-dev 0.0s
=> CACHED [stage-1 3/11] RUN update-ca-certificates 0.0s
=> CACHED [stage-1 4/11] RUN apt-get install -y curl 0.0s
=> CACHED [stage-1 5/11] RUN curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh 0.0s
=> CACHED [stage-1 6/11] RUN bash nodesource_setup.sh 0.0s
=> CACHED [stage-1 7/11] RUN apt-get install -y nodejs 0.0s
=> CACHED [stage-1 8/11] RUN npm i -g ipfs-car 0.0s
=> CACHED [stage-1 9/11] RUN npm i -g carbites-cli 0.0s
=> CACHED [stage-1 10/11] RUN rm -rf /var/lib/apt/lists/* 0.0s
=> CACHED [rust-env 2/4] WORKDIR /app 0.0s
=> CACHED [rust-env 3/4] COPY server/. /app 0.0s
=> CACHED [rust-env 4/4] RUN cargo build --release 0.0s
=> CACHED [stage-1 11/11] COPY --from=rust-env /app/target/release/server / 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:76dd7cd146c56f8f47775a0a3e11be1eb28a80115ff1f4c786199397d08d33b8 0.0s
=> => naming to registry.fly.io/precrypt:deployment-1646251954 0.0s
--> Building image done
==> Pushing image to fly
The push refers to repository [registry.fly.io/precrypt]
9275d2ffb72a: Layer already exists
020f79bc4637: Layer already exists
f704113d1b48: Layer already exists
dcf7fa592184: Layer already exists
52468c85255f: Layer already exists
31d35832c7b9: Layer already exists
d1bd041492af: Layer already exists
5adf1992e17c: Layer already exists
c6aec2b2f35c: Layer already exists
b7da7346c91d: Layer already exists
e5baccb54724: Layer already exists
deployment-1646251954: digest: sha256:623ab22cbc72f09483409a26a0db8c88819a79c1bcee821ff3e40bc7ef9c2678 size: 2634
--> Pushing image done
image: registry.fly.io/precrypt:deployment-1646251954
image size: 307 MB
==> Creating release
--> release v53 created
--> You can detach the terminal anytime without stopping the deployment
==> Monitoring deployment
1 desired, 1 placed, 0 healthy, 1 unhealthy [restarts: 2] [health checks: 1 total]
Failed Instances
Failure #1
Instance
ID PROCESS VERSION REGION DESIRED STATUS HEALTH CHECKS RESTARTS CREATED
d948ffba 53 ord run pending 1 total 2 24s ago
Recent Events
TIMESTAMP TYPE MESSAGE
2022-03-02T20:15:08Z Received Task received by client
2022-03-02T20:15:08Z Task Setup Building Task Directory
2022-03-02T20:15:11Z Started Task started by client
2022-03-02T20:15:13Z Terminated Exit Code: 1
2022-03-02T20:15:13Z Restarting Task restarting in 1.08533806s
2022-03-02T20:15:20Z Started Task started by client
2022-03-02T20:15:22Z Terminated Exit Code: 1
2022-03-02T20:15:22Z Restarting Task restarting in 1.112323122s
2022-03-02T20:15:18Z [info]Starting instance
2022-03-02T20:15:18Z [info]Configuring virtual machine
2022-03-02T20:15:18Z [info]Pulling container image
2022-03-02T20:15:19Z [info]Unpacking image
2022-03-02T20:15:19Z [info]Preparing kernel init
2022-03-02T20:15:19Z [info]Setting up volume 'precrypt_data'
2022-03-02T20:15:20Z [info]Configuring firecracker
2022-03-02T20:15:20Z [info]Starting virtual machine
2022-03-02T20:15:20Z [info]Starting init (commit: 0c50bff)...
2022-03-02T20:15:20Z [info]Mounting /dev/vdc at /data w/ uid: 0, gid: 0 and chmod 0755
2022-03-02T20:15:20Z [info]Preparing to run: `/server` as root
2022-03-02T20:15:20Z [info]2022/03/02 20:15:20 listening on [fdaa:0:424c:a7b:20db:0:a0d8:2]:22 (DNS: [fdaa::3]:53)
2022-03-02T20:15:21Z [info]Main child exited normally with code: 1
2022-03-02T20:15:21Z [info]Starting clean up.
2022-03-02T20:15:21Z [info]Umounting /dev/vdc from /data
2022-03-02T20:15:27Z [info]Starting instance
2022-03-02T20:15:27Z [info]Configuring virtual machine
2022-03-02T20:15:27Z [info]Pulling container image
2022-03-02T20:15:28Z [info]Unpacking image
2022-03-02T20:15:28Z [info]Preparing kernel init
2022-03-02T20:15:28Z [info]Setting up volume 'precrypt_data'
2022-03-02T20:15:29Z [info]Configuring firecracker
2022-03-02T20:15:29Z [info]Starting virtual machine
2022-03-02T20:15:29Z [info]Starting init (commit: 0c50bff)...
2022-03-02T20:15:29Z [info]Mounting /dev/vdc at /data w/ uid: 0, gid: 0 and chmod 0755
2022-03-02T20:15:29Z [info]Preparing to run: `/server` as root
2022-03-02T20:15:29Z [info]2022/03/02 20:15:29 listening on [fdaa:0:424c:a7b:20db:0:a0d8:2]:22 (DNS: [fdaa::3]:53)
2022-03-02T20:15:30Z [info]Main child exited normally with code: 1
2022-03-02T20:15:30Z [info]Starting clean up.
2022-03-02T20:15:30Z [info]Umounting /dev/vdc from /data
--> v53 failed - Failed due to unhealthy allocations - not rolling back to stable job version 53 as current job has same specification and deploying as v54
--> Troubleshooting guide at https://fly.io/docs/getting-started/troubleshooting/
Error abort
I have also tried running with --no-cache
and re creating my volume and deployment instance. The error is obviously this line:
--> v53 failed - Failed due to unhealthy allocations - not rolling back to stable job version 53 as current job has same specification and deploying as v54
But where can I go to see what caused the unhealthy allocation? Here is a sample of my fly logs
:
2022-03-02T20:07:47Z runner[c1f597fe] ord [info]Setting up volume 'precrypt_data'
2022-03-02T20:07:48Z runner[c1f597fe] ord [info]Configuring firecracker
2022-03-02T20:07:48Z runner[c1f597fe] ord [info]Starting virtual machine
2022-03-02T20:07:49Z app[c1f597fe] ord [info]Starting init (commit: 0c50bff)...
2022-03-02T20:07:49Z app[c1f597fe] ord [info]Mounting /dev/vdc at /data w/ uid: 0, gid: 0 and chmod 0755
2022-03-02T20:07:49Z app[c1f597fe] ord [info]Preparing to run: `/server` as root
2022-03-02T20:07:49Z app[c1f597fe] ord [info]2022/03/02 20:07:49 listening on [fdaa:0:424c:a7b:20db:0:a0d8:2]:22 (DNS: [fdaa::3]:53)
2022-03-02T20:07:50Z app[c1f597fe] ord [info]Main child exited normally with code: 1
2022-03-02T20:07:50Z app[c1f597fe] ord [info]Starting clean up.
2022-03-02T20:07:50Z app[c1f597fe] ord [info]Umounting /dev/vdc from /data
2022-03-02T20:08:06Z runner[9a35b8a9] ord [info]Starting instance
2022-03-02T20:08:06Z runner[9a35b8a9] ord [info]Configuring virtual machine
2022-03-02T20:08:06Z runner[9a35b8a9] ord [info]Pulling container image
2022-03-02T20:08:07Z runner[9a35b8a9] ord [info]Unpacking image
2022-03-02T20:08:07Z runner[9a35b8a9] ord [info]Preparing kernel init
2022-03-02T20:08:07Z runner[9a35b8a9] ord [info]Setting up volume 'precrypt_data'
2022-03-02T20:08:08Z runner[9a35b8a9] ord [info]Configuring firecracker
2022-03-02T20:08:08Z runner[9a35b8a9] ord [info]Starting virtual machine
2022-03-02T20:08:08Z app[9a35b8a9] ord [info]Starting init (commit: 0c50bff)...
2022-03-02T20:08:08Z app[9a35b8a9] ord [info]Mounting /dev/vdc at /data w/ uid: 0, gid: 0 and chmod 0755
2022-03-02T20:08:08Z app[9a35b8a9] ord [info]Preparing to run: `/server` as root
2022-03-02T20:08:08Z app[9a35b8a9] ord [info]2022/03/02 20:08:08 listening on [fdaa:0:424c:a7b:20db:0:a0d8:2]:22 (DNS: [fdaa::3]:53)
2022-03-02T20:08:09Z app[9a35b8a9] ord [info]Main child exited normally with code: 1
2022-03-02T20:08:09Z app[9a35b8a9] ord [info]Starting clean up.
2022-03-02T20:08:09Z app[9a35b8a9] ord [info]Umounting /dev/vdc from /data
2022-03-02T20:08:16Z runner[9a35b8a9] ord [info]Starting instance
2022-03-02T20:08:16Z runner[9a35b8a9] ord [info]Configuring virtual machine
2022-03-02T20:08:16Z runner[9a35b8a9] ord [info]Pulling container image
2022-03-02T20:08:16Z runner[9a35b8a9] ord [info]Unpacking image
2022-03-02T20:08:16Z runner[9a35b8a9] ord [info]Preparing kernel init
2022-03-02T20:08:16Z runner[9a35b8a9] ord [info]Setting up volume 'precrypt_data'
2022-03-02T20:08:17Z runner[9a35b8a9] ord [info]Configuring firecracker
2022-03-02T20:08:17Z runner[9a35b8a9] ord [info]Starting virtual machine
2022-03-02T20:08:18Z app[9a35b8a9] ord [info]Starting init (commit: 0c50bff)...
2022-03-02T20:08:18Z app[9a35b8a9] ord [info]Mounting /dev/vdc at /data w/ uid: 0, gid: 0 and chmod 0755
2022-03-02T20:08:18Z app[9a35b8a9] ord [info]Preparing to run: `/server` as root
2022-03-02T20:08:18Z app[9a35b8a9] ord [info]2022/03/02 20:08:18 listening on [fdaa:0:424c:a7b:20db:0:a0d8:2]:22 (DNS: [fdaa::3]:53)
2022-03-02T20:08:19Z app[9a35b8a9] ord [info]Main child exited normally with code: 1
2022-03-02T20:08:19Z app[9a35b8a9] ord [info]Starting clean up.
2022-03-02T20:08:19Z app[9a35b8a9] ord [info]Umounting /dev/vdc from /data
2022-03-02T20:08:25Z runner[9a35b8a9] ord [info]Starting instance
2022-03-02T20:08:25Z runner[9a35b8a9] ord [info]Configuring virtual machine
2022-03-02T20:08:25Z runner[9a35b8a9] ord [info]Pulling container image
2022-03-02T20:08:25Z runner[9a35b8a9] ord [info]Unpacking image
2022-03-02T20:08:25Z runner[9a35b8a9] ord [info]Preparing kernel init
2022-03-02T20:08:25Z runner[9a35b8a9] ord [info]Setting up volume 'precrypt_data'
2022-03-02T20:08:27Z runner[9a35b8a9] ord [info]Configuring firecracker
2022-03-02T20:08:27Z runner[9a35b8a9] ord [info]Starting virtual machine
2022-03-02T20:08:27Z app[9a35b8a9] ord [info]Starting init (commit: 0c50bff)...
2022-03-02T20:08:27Z app[9a35b8a9] ord [info]Mounting /dev/vdc at /data w/ uid: 0, gid: 0 and chmod 0755
2022-03-02T20:08:27Z app[9a35b8a9] ord [info]Preparing to run: `/server` as root
2022-03-02T20:08:27Z app[9a35b8a9] ord [info]2022/03/02 20:08:27 listening on [fdaa:0:424c:a7b:20db:0:a0d8:2]:22 (DNS: [fdaa::3]:53)
2022-03-02T20:08:28Z app[9a35b8a9] ord [info]Main child exited normally with code: 1
2022-03-02T20:08:28Z app[9a35b8a9] ord [info]Starting clean up.
2022-03-02T20:08:28Z app[9a35b8a9] ord [info]Umounting /dev/vdc from /data
2022-03-02T20:15:09Z runner[d948ffba] ord [info]Starting instance
2022-03-02T20:15:09Z runner[d948ffba] ord [info]Configuring virtual machine
2022-03-02T20:15:09Z runner[d948ffba] ord [info]Pulling container image
2022-03-02T20:15:09Z runner[d948ffba] ord [info]Unpacking image
2022-03-02T20:15:09Z runner[d948ffba] ord [info]Preparing kernel init
2022-03-02T20:15:09Z runner[d948ffba] ord [info]Setting up volume 'precrypt_data'
2022-03-02T20:15:11Z runner[d948ffba] ord [info]Configuring firecracker
2022-03-02T20:15:11Z runner[d948ffba] ord [info]Starting virtual machine
2022-03-02T20:15:11Z app[d948ffba] ord [info]Starting init (commit: 0c50bff)...
2022-03-02T20:15:11Z app[d948ffba] ord [info]Mounting /dev/vdc at /data w/ uid: 0, gid: 0 and chmod 0755
2022-03-02T20:15:11Z app[d948ffba] ord [info]Preparing to run: `/server` as root
2022-03-02T20:15:11Z app[d948ffba] ord [info]2022/03/02 20:15:11 listening on [fdaa:0:424c:a7b:20db:0:a0d8:2]:22 (DNS: [fdaa::3]:53)
2022-03-02T20:15:12Z app[d948ffba] ord [info]Main child exited normally with code: 1
2022-03-02T20:15:12Z app[d948ffba] ord [info]Starting clean up.
2022-03-02T20:15:12Z app[d948ffba] ord [info]Umounting /dev/vdc from /data
2022-03-02T20:15:18Z runner[d948ffba] ord [info]Starting instance
2022-03-02T20:15:18Z runner[d948ffba] ord [info]Configuring virtual machine
2022-03-02T20:15:18Z runner[d948ffba] ord [info]Pulling container image
2022-03-02T20:15:19Z runner[d948ffba] ord [info]Unpacking image
2022-03-02T20:15:19Z runner[d948ffba] ord [info]Preparing kernel init
2022-03-02T20:15:19Z runner[d948ffba] ord [info]Setting up volume 'precrypt_data'
2022-03-02T20:15:20Z runner[d948ffba] ord [info]Configuring firecracker
2022-03-02T20:15:20Z runner[d948ffba] ord [info]Starting virtual machine
2022-03-02T20:15:20Z app[d948ffba] ord [info]Starting init (commit: 0c50bff)...
2022-03-02T20:15:20Z app[d948ffba] ord [info]Mounting /dev/vdc at /data w/ uid: 0, gid: 0 and chmod 0755
2022-03-02T20:15:20Z app[d948ffba] ord [info]Preparing to run: `/server` as root
2022-03-02T20:15:20Z app[d948ffba] ord [info]2022/03/02 20:15:20 listening on [fdaa:0:424c:a7b:20db:0:a0d8:2]:22 (DNS: [fdaa::3]:53)
2022-03-02T20:15:21Z app[d948ffba] ord [info]Main child exited normally with code: 1
2022-03-02T20:15:21Z app[d948ffba] ord [info]Starting clean up.
2022-03-02T20:15:21Z app[d948ffba] ord [info]Umounting /dev/vdc from /data
2022-03-02T20:15:27Z runner[d948ffba] ord [info]Starting instance
2022-03-02T20:15:27Z runner[d948ffba] ord [info]Configuring virtual machine
2022-03-02T20:15:27Z runner[d948ffba] ord [info]Pulling container image
2022-03-02T20:15:28Z runner[d948ffba] ord [info]Unpacking image
2022-03-02T20:15:28Z runner[d948ffba] ord [info]Preparing kernel init
2022-03-02T20:15:28Z runner[d948ffba] ord [info]Setting up volume 'precrypt_data'
2022-03-02T20:15:29Z runner[d948ffba] ord [info]Configuring firecracker
2022-03-02T20:15:29Z runner[d948ffba] ord [info]Starting virtual machine
2022-03-02T20:15:29Z app[d948ffba] ord [info]Starting init (commit: 0c50bff)...
2022-03-02T20:15:29Z app[d948ffba] ord [info]Mounting /dev/vdc at /data w/ uid: 0, gid: 0 and chmod 0755
2022-03-02T20:15:29Z app[d948ffba] ord [info]Preparing to run: `/server` as root
2022-03-02T20:15:29Z app[d948ffba] ord [info]2022/03/02 20:15:29 listening on [fdaa:0:424c:a7b:20db:0:a0d8:2]:22 (DNS: [fdaa::3]:53)
2022-03-02T20:15:30Z app[d948ffba] ord [info]Main child exited normally with code: 1
2022-03-02T20:15:30Z app[d948ffba] ord [info]Starting clean up.
2022-03-02T20:15:30Z app[d948ffba] ord [info]Umounting /dev/vdc from /data
Thank you any help in advance!