Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to connect to server #126

Open
heaveless opened this issue Nov 5, 2023 · 4 comments
Open

Failed to connect to server #126

heaveless opened this issue Nov 5, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@heaveless
Copy link

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
@chipsenkbeil chipsenkbeil added the bug Something isn't working label Dec 10, 2023
@rileychc
Copy link

Me too.

☁ bin ./distant launch ssh://root@192.168.8.7

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 ~]# ''

@iliutaadrian
Copy link

+1

@carand
Copy link

carand commented Jan 20, 2024

Same problem
Exited unexpectedly: exit code 1

@chipsenkbeil
Copy link
Owner

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://root@192.168.8.7

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://root@192.168.8.7 --distant /home/riley/bin/distant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants