'How do i resolve "Failed to parse remote port from server"
I'm setting up a new remote host and every time i initiate it i get the following error output: Any feedback or direction on how to resolve this issue?
Pseudo-terminal will not be allocated because stdin is not a terminal.
Linux Destiny 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1 (2019-04-12) x86_64
The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
mesg: ttyname failed: Inappropriate ioctl for device
bash: cannot set terminal process group (3202): Inappropriate ioctl for device bash: no job control in this shell
mesg: ttyname failed: Inappropriate ioctl for device
Installing... Downloading with wget
WARNING: tar exited with non-0 exit code
Found running server...
* * Reminder: You may only use this software with Visual Studio family products, * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057) *
cat: /root/.vscode-remote/.473af338e1bd9ad4d9853933da1cd9d5d9e07dc9.log: No such file or directory
Server did not start successfully. Full server log: cat: /root/.vscode-remote/.X.log51ec4692- 4da4-4ec0-b613-5a3563034cf1==== : No such file or directory
"install" terminal command done Received install output: : No such file or directory Failed to parse remote port from server output: : No such file or directory
Solution 1:[1]
If the server fails to shut down properly, sometimes it leaves dangling lockfiles. This can cause startup to fail and produce the "Failed to parse remote port from server output" error message. In this case the solution is to simply to delete the lockfiles:
.vscode-server/bin/[:xdigit:]*/vscode-remote-lock.*
Solution 2:[2]
Fixed the issue. It appears I had 2 other server agents running incorrectly. I killed both server agents using kill (PID) and removed ".vscode_remote" directory from user home directory. Then i reinitialized remote-ssh from vscode. Successfully connected!
Solution 3:[3]
On remote machine you do not have a tar installed. It's in log output
Installing... Downloading with wget
WARNING: tar exited with non-0 exit code
so under a root run:
apt-get install tar
or with sudo, if you have a user with sudoers configured:
sudo apt-get install tar
Solution 4:[4]
I also got the same issue and my workaround was to provide proper rights to the home
or user
folder, so vscode can create a remote folder and do the required installation on it.
Example :
sudo chmod -R 777 home/
In this case, I have provided all rights to my home folder and It worked like a charm for all the users.
Solution 5:[5]
In case someone else encounters the same issue - I had an instance where remote target had no space left on device. After extending root volume of target machine, connection worked fine.
Solution 6:[6]
I ssh'd onto the remote server (linux) and then deleted both directories as follows:
$ rm -r .vscode-server.backup2022-04-03T16:20:18-05:00
$ rm -r .vscode-server
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Sean Zamora |
Solution 3 | bodo |
Solution 4 | Sachin |
Solution 5 | Greg |
Solution 6 | Finn |