distant icon indicating copy to clipboard operation
distant copied to clipboard

Could not resolve hostname when doing 'distant launch'

Open allencho1222 opened this issue 4 years ago • 8 comments

distant (v 0.15.0) fails to resolve hostname (IP) while followings are successfully done:

  1. DistantLaunch from neovim (DistantLaunch 192.168.245.129 mode=distant distant.bin=/home/allencho122/local_installs/distant/distant<CR>)

  2. ssh to the target IP (ssh 192.168.245.129)

However, within the terminal, distant launch <IP> --distant /path/to/remote/distant shows: ERROR [distant] Exiting due to error: ssh: Could not resolve hostname 192.168.245.129:22: Name or service not known

allencho1222 avatar Dec 29 '21 08:12 allencho1222

You're saying that DistantLaunch from neovim worked, sshing into 192.168.245.129 worked, but that using the terminal to launch failed?

chipsenkbeil avatar Dec 29 '21 17:12 chipsenkbeil

Yes, it is. BTW this only happens on my desktop, while other PCs work correctly. I couldn't find causes.

allencho1222 avatar Dec 29 '21 18:12 allencho1222

What operating system is your desktop? Do you have any custom ssh configs?

chipsenkbeil avatar Dec 29 '21 19:12 chipsenkbeil

It uses ubuntu 18.04 and there are no differences in configurations between PCs.

allencho1222 avatar Dec 29 '21 19:12 allencho1222

Oh, just saw that you're using v0.15.0 of the cli. Have you tried v0.15.1?

chipsenkbeil avatar Dec 29 '21 21:12 chipsenkbeil

I also tried v0.15.1 and it didn't work. I think something is going wrong on my desktop because it cannot resolve the IP address of the virtual machine when using distant.

My desktop uses static IP instead of DHCP. Can it be one of causes? Other PCs can connect to my desktop by using distant.

allencho1222 avatar Dec 30 '21 07:12 allencho1222

The fact that the neovim library succeeded whereas the cli failed is perplexing. You're using which mode? Distant or ssh?

chipsenkbeil avatar Dec 30 '21 20:12 chipsenkbeil

I sent you two videos testing some scenarios by your gmail. Please check them.

For the first video, only the distant mode for both nvim and command line does not work (Other PCs work correctly on distant mode).

For the second, while DistantLaunch mode=distant works correctly within nvim, distant launch in the terminal does not work.

allencho1222 avatar Dec 31 '21 06:12 allencho1222

@allencho1222 I'm planning to close this issue soon due to lack of activity. I'm assuming you either got this working or moved on to another project, but I like to give heads up before closing an issue. Distant has changed quite a bit underneath including with the plugin, so this issue may be stale.

chipsenkbeil avatar Dec 28 '22 02:12 chipsenkbeil

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Jul 06 '23 03:07 github-actions[bot]