distant.nvim icon indicating copy to clipboard operation
distant.nvim copied to clipboard

Failed to connect to server

Open heaveless opened this issue 1 year ago • 4 comments

Command:

DistantLaunch ssh://myserver.com
Failed to connect to server
Caused by:
    Deserialize failed: IO error while reading marker: failed to fill whole buffer
Exited unexpectedly: exit code 1

heaveless avatar Nov 05 '23 09:11 heaveless

Me too.

☁ bin ./distant launch ssh://[email protected]

Failed to launch server

Caused by: Failed to spawn server: ''distant server listen --daemon --host ssh

Last login: Wed Dec 13 11:40:25 2023 from riley
]0;root@Centos:~[?1034h[root@Centos ~]# distant server listen --daemon --host ssh
-bash: distant: command not found
]0;root@Centos:~[root@Centos ~]#
]0;root@Centos:~[root@Centos ~]# ''

rileychc avatar Dec 13 '23 16:12 rileychc

+1

iliutaadrian avatar Jan 20 '24 10:01 iliutaadrian

Same problem Exited unexpectedly: exit code 1

carand avatar Jan 20 '24 13:01 carand

Okay, there are two things clear to me from this:

  1. We need better error reporting within neovim to figure out what happens when something goes wrong.
  2. We need to finish the migration to a pure-Rust ssh, as errors with ssh keep happening due to poor C library integrations. See the issue about moving to russh and the branch with progress towards better supporting plugins and using russh.

Me too.

☁ bin ./distant launch ssh://[email protected]

Failed to launch server

Caused by: Failed to spawn server: ''distant server listen --daemon --host ssh

Last login: Wed Dec 13 11:40:25 2023 from riley ]0;root@Centos:~[?1034h[root@Centos ~]# distant server listen --daemon --host ssh -bash: distant: command not found ]0;root@Centos:~[root@Centos ~]# ]0;root@Centos:~[root@Centos ~]# ''

@rileychc for your specific issue, the error just after distant server listen --daemon --host ssh makes me believe that either

a. You don't have distant installed on your server b. When distant on your host machine logs into your server via ssh, it doesn't have distant in its path to execute it.

If you do have distant on your server, I would recommend including -- distant /path/to/distant as part of your launch arguments, where the path is the absolute path to the distant binary on your server. For example:

# If there was a bin directory within your home directory of your user, and distant was in that bin directory
distant launch ssh://[email protected] --distant /home/riley/bin/distant

chipsenkbeil avatar Jan 27 '24 18:01 chipsenkbeil