Could not resolve hostname when doing 'distant launch'
distant (v 0.15.0) fails to resolve hostname (IP) while followings are successfully done:
-
DistantLaunch from neovim (
DistantLaunch 192.168.245.129 mode=distant distant.bin=/home/allencho122/local_installs/distant/distant<CR>) -
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
You're saying that DistantLaunch from neovim worked, sshing into 192.168.245.129 worked, but that using the terminal to launch failed?
Yes, it is. BTW this only happens on my desktop, while other PCs work correctly. I couldn't find causes.
What operating system is your desktop? Do you have any custom ssh configs?
It uses ubuntu 18.04 and there are no differences in configurations between PCs.
Oh, just saw that you're using v0.15.0 of the cli. Have you tried v0.15.1?
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.
The fact that the neovim library succeeded whereas the cli failed is perplexing. You're using which mode? Distant or ssh?
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 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.
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.