Vscode-remote-release: Failed to parse remote port from server output after the install command

Created on 15 May 2019  路  28Comments  路  Source: microsoft/vscode-remote-release

I am able to connect to the ssh server through a normal terminal, and i can see the .profile being run from the server in the remote ssh connection inside VScode.

But after that i get the following

"install" terminal command done
Received install output: 
Failed to parse remote port from server output: 
needs-more-info

Most helpful comment

Execute Remote-SSH: Kill VS Code Server on Host..., and then reconnect.
Above solves my problem.

All 28 comments

Execute Remote-SSH: Kill VS Code Server on Host..., and then reconnect.
Above solves my problem.

Solves it for me too, I tried logging off and on multiple times and it seems that I can't reproduce the bug ... interesting

Does not seem to help, i get

Command failed: ssh -T -o ConnectTimeout=15  <ssh_connection> << 'EOSSH'

        kill -9 `ps -ax | grep "remoteExtensionHostAgent.js" | grep -v grep | awk '{print $1}'`
        sleep 3
        # go after the restarted agent
        kill -9 `ps -ax | grep "remoteExtensionHostAgent.js" | grep -v grep | awk '{print $1}'`
        kill -9 `ps -ax | grep "watcherService" | grep -v grep | awk '{print $1}'`
        rm -rf $HOME/.vscode-remote/bin

EOSSH
ssh_askpass: exec(/usr/X11R6/bin/ssh-askpass): No such file or directory
Connection closed by UNKNOWN port 65535

ssh_askpass: exec(/usr/X11R6/bin/ssh-askpass): No such file or directory

Could $SSH_ASKPASS be set to a path that doesn't exist? Not sure what's happening there. Can you try to connect again and attach the full log from the "Remote - SSH" output channel?

SSH Resolver called for "ssh-remote+<SSHMACHINE>"
SSH Resolver called for host: <SSHMACHINE>
Setting up SSH remote "<SSHMACHINE>"
Using commit id "57b550c559b945eb9d871dbf2b2e4cb9e31e2551" and quality "insider" for server
Install and start server if needed
> Pseudo-terminal will not be allocated because stdin is not a terminal.
> ?? pure.setup: PurifyPlus local cache directory /local/cache/rational doesn't exist
> bash: no job control in this shell
> 
>  
<!!!!! .profile things run !!!!>
"install" terminal command done
Received install output: 
Failed to parse remote port from server output: 

Did you delete some things like at <!!!!! .profile things run !!!!>? It looks like all the output from the install script is gone, can you include that as well?

Would also help if you can check whether /usr/X11R6/bin/ssh-askpass exists and what echo $SSH_ASKPASS gives.

i only removed the things that are printed from the .profile running (Company related sensitive things), when i echo ssh_askpass it returns empty

/usr/X11R6/bin/ssh-askpass does not exist

Then it seems like the install script is not running properly. Does your .profile do anything like launch a new shell? It might be doing something that disturbs the install script.

it does start a new terminal, commenting that out takes it to wget but it seems to just get hung at that point. Not sure if it is a proxy issue

Are you using a proxy from the remote machine? Does the environment have http_proxy or https_proxy variables specified?

After i specified them i now get the following

> Installation already in progress...
> 152efa98-f646-40ec-834f-78cbdcea2f00##24##
"install" terminal command done
Received install output: 152efa98-f646-40ec-834f-78cbdcea2f00##24##
Server installation process already in progress - waiting and retrying 30

It get stuck retrying for a bit then eventually gives up

Do you only have one remote window open?

It seems to think another installation is already in progress. Maybe something got messed up while failing to install multiple times. Can you try running the "Uninstall vs code server from host" command to clean it up? (Or delete the ~/.vscode-remote folder manually)

Killing and retrying led to

RROR: cannot verify update.code.visualstudio.com's certificate, issued by `<CERT>': Self-signed certificate encountered. To connect to update.code.visualstudio.com insecurely, use `--no-check-certificate'.
> 88953005-5fe5-407a-8d3c-470a485a9db4##25##
"install" terminal command done
Received install output: 88953005-5fe5-407a-8d3c-470a485a9db4##25##
Server download failed
Downloading VS Code Server failed. Please try again later.

Ok, interesting. Could your remote be missing the CA? Can you try sudo apt-get install ca-certificates?

install in the remote or local?

I dont think i have sudo privileges in the remote

I added the appropriate cert to wget, and finally installed, now i get another issue

Received install output: 48f5ec91-942b-4feb-8181-2b41cb2f4a9b==39063==
Server is listening on port 39063
Spawning tunnel with: ssh <HOST> -L localhost:58150:localhost:39063 "echo -e 'Connected to SSH Host - Please do not close this terminal' && sleep infinity"
Spawned SSH tunnel between local port 58150 and remote port 39063
Waiting for ssh tunnel to be ready
> Cannot execute command-line and remote command.
"SSH Tunnel" terminal command done
SSH tunnel command completed unexpectedly
Could not establish tunnel to "<HOST>" (Max wait time exhausted).
Could not establish tunnel to "<HOST>" (Max wait time exhausted).

Do you use RemoteCommand in your ssh config? I think that will break us also.

I do, anyway around it?

For now you need to remove that (or clone that ssh config, remove it from one copy, use that copy for vscode). In the future I think we can override it on our end.

Removed it and now it gets stuck on

Connected to SSH Host - Please do not close this terminal

That is supposed to stay there, so are you connected at this point?

It says opening remote on the bottom left in the green box, cannot see any files or anything

Can you share the full log from the "Remote - SSH" output channel now?

SSH Resolver called for "ssh-remote+<SSHHOST>"
SSH Resolver called for host: <SSHHOST>
Setting up SSH remote "<SSHHOST>"
Using commit id "57b550c559b945eb9d871dbf2b2e4cb9e31e2551" and quality "insider" for server
Install and start server if needed
> 
> ?? pure.setup: PurifyPlus local cache directory /local/cache/rational doesn't exist
> ~/.profile has run
> stty: 'standard input': Invalid argument
> bash: no job control in this shell
> stty: 'standard input': Invalid argument
> Found existing installation...
> Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
> Printing the current remote environment...
> MANPATH=<PATH>
> HOSTNAME=<SSHHOST>
> FINALPATH=<PATH>
> SHELL=/usr/bin/ksh
> TERM=vt100
> PUREOPTIONS= -cache-dir=/bb/cache/rational/Linux -always-use-cache-dir=yes   -cache-file-permissions=0777 -recursion-depth-limit=0 -max-threads=320 -use-rpath-in-build=no 
> SSH_CLIENT=10.122.142.218 47086 22
> TMPDIR=<PATH>
> PERL5LIB=<PATH>
> PROCTYPE=x86_64
> PURIFYOPTIONS=  -chain-length=20 
> USER=<USER>
> _AST_FEATURES=UNIVERSE - ucb
> http_proxy=<PROXY>
> _POSIX2_VERSION=199209
> ftp_proxy=<PROXY>
> A__z="*SHLVL
> TOTALVIEW_ROOT=/opt/swt/common
> PATH=<PATH>
> PWD=<PATH>
> j
> EDITOR=vim
> LANG=C
> PURIFYPLUS_ROOT=/opt/swt/common
> TZ=America/New_York
> SYSTYPE=Linux
> HOME=<PATH>
> MANPAGER=less
> SHLVL=3
> OSTYPE=Linux
> ID=general
> no_proxy=<PROXY>
> HTTP_PROXY=<PROXY>
> LOGNAME=<USER>
> PURIFYPLUS_VER=7.5
> SSH_CONNECTION=<SSH>
> ARCH=Linux x86_64 x86_64
> TOTALVIEW_VER=2017.2.11
> QUANTIFYOPTIONS= -handle-calls-to-java -optimize-basic-block-insertion=no -verify-basic-block-updates=yes 
> Starting agent...
> Waiting for server log...
> Waiting for server log...
> Waiting for server log...
> Waiting for server log...
> Waiting for server log...
>  
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
> *
>  
> bcfe0bff-35c6-46eb-94b9-3e5c950b202c==42287==
"install" terminal command done
Received install output: bcfe0bff-35c6-46eb-94b9-3e5c950b202c==42287==
Server is listening on port 42287
Spawning tunnel with: ssh  <SSHHOST> -L localhost:34623:localhost:42287 "echo -e 'Connected to SSH Host - Please do not close this terminal' && sleep infinity"
Spawned SSH tunnel between local port 34623 and remote port 42287
Waiting for ssh tunnel to be ready
>
Tunneling remote port 42287 to local port 34623
Resolving "ssh-remote+<SSHHOST>" to "localhost:34623", attempt: 1
> Connected to SSH Host - Please do not close this terminal

Well everything looks correct, but you still can't open files? Can you check for errors in the developer tools console? (Help > Toggle Developer Tools)

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

Was this page helpful?
0 / 5 - 0 ratings