finch icon indicating copy to clipboard operation
finch copied to clipboard

Finch vm init failed after install

Open Zlender opened this issue 2 years ago • 11 comments

Describe the bug Using Finch Finch-v0.1.0-aarch64 the command vm init fails with fatal error as seen in the logs section.

It the end it looks like init did succeed as I can build and run containers.

Steps to reproduce Install Finch-v0.1.0-aarch64 and run finch vm init

Expected behavior No fatal error.

Screenshots or logs

finch vm init
INFO[0000] Using default values due to missing config file at "/Users/r.zlender/.finch/finch.yaml"
INFO[0000] "/Users/r.zlender/.finch" directory doesn't exist, attempting to create it
FROM alpine:latest
INFO[0002] binaries directory doesn't exist
INFO[0002] Requesting root access to finish network dependency configuration
Password:
INFO[0010] sudoers file not found: %!w(*fs.PathError=&{open /etc/sudoers.d/finch-lima 2})
INFO[0010] Initializing and starting Finch virtual machine...
INFO[0150] Finch virtual machine started successfully
FATA[0150] failed to setup ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

Additional context Add any other context about the problem here.

Zlender avatar Nov 23 '22 15:11 Zlender

I looked up similar issue and seems rancher rke also had this issue before: https://github.com/rancher/rke/issues/2696 From their thread, seems related with Fedora: https://www.reddit.com/r/Fedora/comments/jhxbdh/no_ssh_public_key_auth_after_upgrade_to_fedora_33/

However in the current case, lima did finish booting the vm because it shows vm started successfully, but it still shows the fatal error. @Zlender could you please try finch vm stop and finch vm remove, and then retry finch vm init again to see if you can consistently reproduce this error? Thanks

KevinLiAWS avatar Nov 23 '22 18:11 KevinLiAWS

I'm seeing the same error. It's reproducible with stop/remove/init:

[~ 13:16:32]
# finch vm start
INFO[0000] Starting existing Finch virtual machine...
INFO[0024] Finch virtual machine started successfully
FATA[0025] failed to setup ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
[~ 13:17:00]
# finch vm stop
INFO[0000] Stopping existing Finch virtual machine...
INFO[0005] Finch virtual machine stopped successfully
[~ 13:18:45]
# finch vm remove
INFO[0000] Removing existing Finch virtual machine...
INFO[0000] Finch virtual machine removed successfully
[~ 13:18:49]
# finch vm init
INFO[0000] Initializing and starting Finch virtual machine...
INFO[0073] Finch virtual machine started successfully
FATA[0073] failed to setup ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
[~ 13:20:07]
[~ 13:21:44]
# finch version
Finch version: v0.1.0
[~ 13:21:52]
# uname -a
Darwin X.local 21.4.0 Darwin Kernel Version 21.4.0: Mon Feb 21 20:35:58 PST 2022; root:xnu-8020.101.4~2/RELEASE_ARM64_T6000 x86_64

oraclesean avatar Nov 23 '22 20:11 oraclesean

With --debug:

# finch vm init --debug
DEBU[0000] Creating limactl command: ARGUMENTS: [ls -f {{.Status}} finch], LIMA_HOME: /Applications/Finch/lima/data
DEBU[0000] Status of virtual machine:
DEBU[0000] Creating limactl command: ARGUMENTS: [sudoers], LIMA_HOME: /Applications/Finch/lima/data
DEBU[0000] Creating limactl command: ARGUMENTS: [start --name=finch /Applications/Finch/os/finch.yaml --tty=false], LIMA_HOME: /Applications/Finch/lima/data
INFO[0000] Initializing and starting Finch virtual machine...
INFO[0160] Finch virtual machine started successfully
DEBU[0160] Applying guest configuration options
DEBU[0160] Creating limactl command: ARGUMENTS: [ls -f {{.SSHLocalPort}} finch], LIMA_HOME: /Applications/Finch/lima/data
FATA[0160] failed to setup ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

oraclesean avatar Nov 23 '22 20:11 oraclesean

@KevinLiAWS this is the output

➜  ~ finch vm stop
INFO[0000] Stopping existing Finch virtual machine...
INFO[0002] Finch virtual machine stopped successfully
➜  ~ finch vm remove
INFO[0000] Removing existing Finch virtual machine...
INFO[0000] Finch virtual machine removed successfully
➜  ~ finch vm init --debug
DEBU[0000] Creating limactl command: ARGUMENTS: [ls -f {{.Status}} finch], LIMA_HOME: /Applications/Finch/lima/data
DEBU[0000] Status of virtual machine:
DEBU[0000] Creating limactl command: ARGUMENTS: [sudoers], LIMA_HOME: /Applications/Finch/lima/data
DEBU[0000] Creating limactl command: ARGUMENTS: [start --name=finch /Applications/Finch/os/finch.yaml --tty=false], LIMA_HOME: /Applications/Finch/lima/data
INFO[0000] Initializing and starting Finch virtual machine...
INFO[0070] Finch virtual machine started successfully
DEBU[0070] Applying guest configuration options
DEBU[0070] Creating limactl command: ARGUMENTS: [ls -f {{.SSHLocalPort}} finch], LIMA_HOME: /Applications/Finch/lima/data
FATA[0070] failed to setup ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
➜  ~ finch vm init --debug
DEBU[0000] Creating limactl command: ARGUMENTS: [ls -f {{.Status}} finch], LIMA_HOME: /Applications/Finch/lima/data
DEBU[0000] Status of virtual machine: Running
FATA[0000] the instance "finch" is already running```

Zlender avatar Nov 24 '22 08:11 Zlender

➜  ~ LIMA_HOME=/Applications/Finch/lima/data /Applications/Finch/lima/bin/limactl ls
NAME     STATUS     SSH                ARCH       CPUS    MEMORY    DISK      DIR
finch    Running    127.0.0.1:61998    aarch64    3       8GiB      100GiB    /Applications/Finch/lima/data/finch

Zlender avatar Nov 24 '22 08:11 Zlender

Thanks for your detailed debug info. @Zlender and @oraclesean could you please share me your mac os version? I noticed that it might be related with the mac os version, so I would like to collect more data about the env. Thanks

KevinLiAWS avatar Nov 25 '22 05:11 KevinLiAWS

Sure

➜  ~ uname -v
Darwin Kernel Version 22.1.0: Sun Oct  9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
➜  ~ sw_vers
ProductName:		macOS
ProductVersion:		13.0
BuildVersion:		22A380

Zlender avatar Nov 25 '22 08:11 Zlender

Same issue.

$ uname -v
Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000

$ sw_vers
ProductName:    macOS
ProductVersion: 12.6.1
BuildVersion:   21G217

EigoOda avatar Nov 26 '22 07:11 EigoOda

# uname -v
Darwin Kernel Version 21.4.0: Mon Feb 21 20:35:58 PST 2022; root:xnu-8020.101.4~2/RELEASE_ARM64_T6000
# sw_vers
ProductName:	macOS
ProductVersion:	12.3
BuildVersion:	21E230

oraclesean avatar Nov 28 '22 13:11 oraclesean

same issue here

$ uname -v
Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000

$ sw_vers
ProductName:	macOS
ProductVersion:	12.6.1
BuildVersion:	21G217

netcode avatar Nov 29 '22 08:11 netcode

Same issue.

$ finch --version
finch version v0.1.0
$ uname -v
Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:46 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T8101
$ sw_vers
ProductName:    macOS
ProductVersion: 12.6.1
BuildVersion:   21G217

CkReal avatar Dec 03 '22 02:12 CkReal

After v0.2.0 released, the issue looks like not resolved

➜  ~ finch version
Finch version:	v0.2.0
FATA[0000] detailed version info is unavailable because VM is not running
➜  ~ 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: open /etc/sudoers.d/finch-lima: no such file or directory
INFO[0006] Initializing and starting Finch virtual machine...
INFO[0130] Finch virtual machine started successfully
FATA[0130] failed to setup ssh client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
➜  ~ uname -v
Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000
➜  ~ sw_vers
ProductName:		macOS
ProductVersion:		13.1
BuildVersion:		22C65
➜  ~

tranngoclam avatar Jan 12 '23 07:01 tranngoclam

Also running into this problem.

❯ finch --version
finch version v0.3.0
❯ sw_vers
ProductName:	macOS
ProductVersion:	12.6
BuildVersion:	21G115

marcelmindemann avatar Jan 24 '23 13:01 marcelmindemann

Did some research and found similar issue here: https://support.okta.com/help/s/article/No-supported-methods-remain-unable-to-ssh-to-target-server-via-sft?language=en_US It seems related ssh policy settings, and needs changes in /etc/ssh/sshd_config. Could you please try if the config change can resolve the issue? Thanks

KevinLiAWS avatar Jan 25 '23 19:01 KevinLiAWS

Closing the issue because of no response. Feel free to reopen.

ningziwen avatar Apr 03 '23 21:04 ningziwen