finch
finch copied to clipboard
`finch vm init` fails with nerdctl download error
Describe the bug
Installed finch via brew install finch
. Ran finch vm init
and received the following error output:
> finch vm init
INFO[0000] binaries directory doesn't exist
INFO[0000] Requesting root access to finish network dependency configuration
INFO[0000] sudoers file not found: %!w(*fs.PathError=&{open /etc/sudoers.d/finch-lima 2})
INFO[0000] Initializing and starting Finch virtual machine...
ERRO[0035] Finch virtual machine failed to start, debug logs: time="2022-11-28T16:07:41-06:00" level=info msg="Terminal is not available, proceeding without opening an editor"
time="2022-11-28T16:07:41-06:00" level=info msg="Starting socket_vmnet daemon for \"finch-shared\" network"
time="2022-11-28T16:07:41-06:00" level=info msg="Attempting to download the image from \"/Applications/Finch/os/Fedora-Cloud-Base-37-1.7.aarch64.qcow2\"" digest="sha256:cc8b0f49bc60875a16eef65ad13e0e86ba502ba3585cc51146f11f4182a628c0"
time="2022-11-28T16:07:41-06:00" level=info msg="Downloaded the image from \"/Applications/Finch/os/Fedora-Cloud-Base-37-1.7.aarch64.qcow2\""
time="2022-11-28T16:07:46-06:00" level=info msg="Attempting to download the nerdctl archive from \"https://github.com/containerd/nerdctl/releases/download/v1.0.0/nerdctl-full-1.0.0-linux-arm64.tar.gz\"" digest="sha256:e4c9b9434c88847f4d18f8b84c0d073555e4c949546cfa8a21e719de67afdf70"
time="2022-11-28T16:08:16-06:00" level=fatal msg="failed to download the nerdctl archive, attempted 2 candidates, errors=[unsupported arch: \"x86_64\" failed to download \"https://github.com/containerd/nerdctl/releases/download/v1.0.0/nerdctl-full-1.0.0-linux-arm64.tar.gz\": Get \"https://github.com/containerd/nerdctl/releases/download/v1.0.0/nerdctl-full-1.0.0-linux-arm64.tar.gz\": dial tcp 140.82.113.4:443: i/o timeout]"
FATA[0035] exit status 1
Ket failure appears to be:
time="2022-11-28T16:08:16-06:00" level=fatal msg="failed to download the nerdctl archive, attempted 2 candidates, errors=[unsupported arch: \"x86_64\" failed to download \"https://github.com/containerd/nerdctl/releases/download/v1.0.0/nerdctl-full-1.0.0-linux-arm64.tar.gz\": Get \"https://github.com/containerd/nerdctl/releases/download/v1.0.0/nerdctl-full-1.0.0-linux-arm64.tar.gz\": dial tcp 140.82.113.4:443: i/o timeout]"
Steps to reproduce
Install finch and attempt to initialize VM?
Expected behavior
VM initialized successfully.
Screenshots or logs
See above.
Additional context
OS info:
Not sure if the above is actually an error that can be ignored. After that error I was able to run finch vm start
and it reported success.
Since I didn't have a lot of confidence in that, I did finch vm remove
and ran finch vm init
again. This time there were no errors and again I was able to finch vm start
successfully. Running finch run --rm hello-world
works and everything appears to be functional.
So the bug to fix here may be to suppress error messages if they are not actually errors. Though I still don't know for sure if that is the case.
Hi @stmcginnis, thanks a lot for the feedback. We noticed that in some rare cases network can have timeout issue and will result in vm init failure. As you tried, run finch vm remove and finch vm init again is a temp solution to fix it. We are working on the improvements for the stability to avoid/reduce the chance of network timeout.
1、wget ghproxy.com/https://github.com/containerd/nerdctl/releases/download/v1.0.0/nerdctl-full-1.0.0-linux-arm64.tar.gz 2、mv nerdctl-full-1.0.0-linux-arm64.tar.gz ~/Downloads 3、finch vm init --debug @stmcginnis
In the future, we may pre-package nerdctl (and its dependencies) into the Finch installer
@KevinLiAWS
upgrade 0.3 version vm start failed @jude ➜ opt finch vm start INFO[0000] Starting existing Finch virtual machine...
ERRO[0120] Finch virtual machine failed to start, debug logs: time="2023-01-29T15:40:32+08:00" level=info msg="Using the existing instance "finch"" time="2023-01-29T15:40:32+08:00" level=info msg="Attempting to download the nerdctl archive from "https://github.com/containerd/nerdctl/releases/download/v1.1.0/nerdctl-full-1.1.0-linux-arm64.tar.gz"" digest="sha256:3b613a1be5a24460c44bb93a3609b790ada94e06efd1a86467d45bec7da8b449" time="2023-01-29T15:42:33+08:00" level=fatal msg="failed to download the nerdctl archive, attempted 2 candidates, errors=[unsupported arch: "x86_64" failed to download "https://github.com/containerd/nerdctl/releases/download/v1.1.0/nerdctl-full-1.1.0-linux-arm64.tar.gz": Get "https://github.com/containerd/nerdctl/releases/download/v1.1.0/nerdctl-full-1.1.0-linux-arm64.tar.gz": unexpected EOF]" FATA[0120] exit status @KevinLiAWS
@haozi4263 Thanks for the log sharing. We haven't packaged the nerdctl inside of the installer yet, so at this point if download fails, a temp solution is to remove existing vm and try finch vm init
again.