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

Exited Unexpectedly: exit code 1 #233

Open
williamneves opened this issue Nov 17, 2023 · 4 comments
Open

Exited Unexpectedly: exit code 1 #233

williamneves opened this issue Nov 17, 2023 · 4 comments

Comments

@williamneves
Copy link

I'm trying to make distant work, but I couldt:

How to reproduce:
distant installed on mac:

distant -V
distant 0.20.0
{
    "chipsenkbeil/distant.nvim",
    branch = "v0.3",
    lazy = false,
    config = function()
      require("distant"):setup()
    end,
  },

nvim commands

:DistantInstall
installed tp distant

:DistantCheckHealth
distant: require("distant.health").check()

distant.nvim ~
- OK distant installed
- OK distant version 0.20.0 meets minimum requirement of 0.20.0

Error:

:DistantConnect xxx (any host)
Exited unexpectedly: exit code 1

My system
MacOS 13.2.1
iTerm2
Nvim (nvchad)

@martlaf
Copy link

martlaf commented Dec 9, 2023

I have the same (Exited unexpectedly: exit code 1) from nvim plugin (Ubuntu 23.10, nvim 0.10.0-dev, distant 0.20.0, distant.nvim 0.3) when doing :DistantLaunch ssh://user@server, which translates into a Connection timed out (os error 110) when just trying to do it through commandline (distant launch ssh://user@server)

I have ensured binaries are on path on remote server (ssh user@server distant server listen --daemon works fine for instance), and tried setting the --distant argument to point to it

As for me starting the server manually first I can use it with connect instead of launch, I guess I won't be pursuing this much further

@dsuttonpreece
Copy link

It looks like the docs have been updated. If using ssh mode you should use DistantConnect

Installing on your server

If you want to just use distant to connect to an ssh server, you can skip
this and the remaining steps and use :DistantConnect ssh://example.com.

@justicenyaga
Copy link

justicenyaga commented Sep 24, 2024

I'm also facing this issue. The launch command results in a Connection timed out (os error 110).

using the --log-level trace --log-file /tmp/distant.log distant args, I can verify that the launch command can spawn a distant server by inspecting the log file.

[2024-09-24 10:40:21.669276 +00:00] DEBUG [src/cli/commands/server.rs:81] Forking process
[2024-09-24 10:40:21.670616 +00:00] TRACE [src/cli/commands/server.rs:115] Starting server using unresolved host 'ssh'
[2024-09-24 10:40:21.670672 +00:00] DEBUG [src/cli/commands/server.rs:137] Starting local API server, binding to 10.0.0.4 with port in range 0
[2024-09-24 10:40:21.670837 +00:00] INFO [src/cli/commands/server.rs:178] Server listening at 10.0.0.4:35607
[2024-09-24 10:40:21.670851 +00:00] INFO [distant-net/src/server/shutdown_timer.rs:58] Server shutdown timer configured: never terminate

The issue is that, it seems distant is not able to connect to the server even though the connect command is working just fine.

@justicenyaga
Copy link

So in my case, I was trying to connect to a Microsoft Azure VM which turns out, it does not expose all ports by default. So distant was actually starting a server internally that was not accessible to the public. I had to define a Network Security Group rule to expose a given port that I'm setting while using distant-args option and now everything is working as expected

distant launch ssh://root@ip-address --distant-args '--port 8181'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants