Vscode-remote-release: Unable to start remote server

Created on 4 May 2019  Â·  17Comments  Â·  Source: microsoft/vscode-remote-release

Here's the issue I'm experiencing when attempting to connect to remote host via remote-ssh:
Any feedback or suggestions?

Issue Type: Bug

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/.473af338e1bd9ad4d9853933da1cd9d5d9e07dc9.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

VS Code version: Code - Insiders 1.34.0-insider (473af338e1bd9ad4d9853933da1cd9d5d9e07dc9, 2019-05-01T00:22:05.899Z)
OS version: Windows_NT x64 10.0.17134
Fetching remote diagnostics for 'SSH' failed.


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-4440 CPU @ 3.10GHz (4 x 3192)|
|GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|15.94GB (10.79GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|

Fetching remote diagnostics for 'SSH' failed.

Extensions: none

ssh

Most helpful comment

@jeffberry Thanks for the analysis. You are right about Error 1, that has been fixed (but not released yet).

Error 2, I think you are right too, I will just remove the -.

All 17 comments

I see how Found running server... could be a false positive, that is one issue.

WARNING: tar exited with non-0 exit code is probably the real issue. Do you get the same error if you try this multiple times? We just download the server tar then try to untar it.

What OS is your remote machine running?

Latest stable version of debian stretch. I also thought that was the issue.
I made sure tar was installed and can confirm the server tar successfully
extracted nessassary files in the '. Vs_' directory. I also ran the
server.sh file manually and it seemed to work without any output errors.

Hope this helps.

On Sat, May 4, 2019, 3:25 PM Rob Lourens notifications@github.com wrote:

I see how Found running server... could be a false positive, that is one
issue.

WARNING: tar exited with non-0 exit code is probably the real issue. Do
you get the same error if you try this multiple times? We just download the
server tar then try to untar it.

What OS is your remote machine running?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode-remote-release/issues/123#issuecomment-489357822,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEDFA6ESH7YBJJ4EBTQ6N23PTXPKFANCNFSM4HKZKIIQ
.

Thanks for trying that.

extracted nessassary in the '. Vs_' directory

Not sure what this means exactly, there shouldn't be a Vs_ directory

Can you try running exactly tar -xf vscode-server-linux-x64.tar.gz --strip-components 1, see what files you get and check the exit code with echo $??

After initializing the connection to the remote ssh the script appears to
have extracted '.vs_*' folder into the user's home directory. This folder
contains bin/ and a few other folders in the bin folder.

On Sat, May 4, 2019, 3:39 PM Rob Lourens notifications@github.com wrote:

Thanks for trying that.

extracted nessassary in the '. Vs_' directory

Not sure what this means exactly, there shouldn't be a Vs_ directory

Can you try running exactly tar -xf vscode-server-linux-x64.tar.gz
--strip-components 1, see what files you get and check the exit code with echo
$??

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode-remote-release/issues/123#issuecomment-489359004,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEDFA6GNPX2HIUKMKFIUPBDPTXQ6LANCNFSM4HKZKIIQ
.

OK I'll try extracting the files. I'll keep you posted. Thanks for the help

On Sat, May 4, 2019, 3:44 PM Sean Zamora me@seanzamora.com wrote:

After initializing the connection to the remote ssh the script appears to
have extracted '.vs_*' folder into the user's home directory. This folder
contains bin/ and a few other folders in the bin folder.

On Sat, May 4, 2019, 3:39 PM Rob Lourens notifications@github.com wrote:

Thanks for trying that.

extracted nessassary in the '. Vs_' directory

Not sure what this means exactly, there shouldn't be a Vs_ directory

Can you try running exactly tar -xf vscode-server-linux-x64.tar.gz
--strip-components 1, see what files you get and check the exit code
with echo $??

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode-remote-release/issues/123#issuecomment-489359004,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEDFA6GNPX2HIUKMKFIUPBDPTXQ6LANCNFSM4HKZKIIQ
.

Here's what extracted:

. .. bin extensions insider LICENSE node node_modules out package.json product.json server.sh

Echo $? returns 0 by the way.

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!

I identified this when RUNNING bash variable was returning a 2 rather than a 0.

RUNNING="ps -ax | grep $VSCH_DIR/out/remoteExtensionHostAgent.js | grep -v grep | wc -l | tr -d '[:space:]'"

Perhaps killing any running server agents before the install bash is executed will help prevent this issue for other users.

Glad you fixed but but I don't understand what the issue was. If the agent was already installed, then we would not have tried to install it. But it found a running agent, but the agent's log file did not exist. Hm...

The initial install may have failed due to me not using rsa_key
authentication (i was using standard paraphrasing). The first error I got
was related to tunneling but I fixed it by setting up rsa. When I
reconnected using rsa it showed the error above. I may have messed up my
first install.

On Sat, May 4, 2019 at 10:07 PM Rob Lourens notifications@github.com
wrote:

Glad you fixed but but I don't understand what the issue was. If the agent
was already installed, then we would not have tried to install it. But it
found a running agent, but the agent's log file did not exist. Hm...

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode-remote-release/issues/123#issuecomment-489380744,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEDFA6HMNBA7242HYOKL4VTPTY6PPANCNFSM4HKZKIIQ
.

So I ran into the same non-0 exit code error and I spent a little while debugging it. I think the issue is just a case of cross-platform compatibility.

What I found was that if I edited .vscode-insiders/extensions/ms-vscode-remote.remote-ssh-0.37.0/out/extension.js, I could get these two warnings to go away:

Error 1

WARNING: tar exited with non-0 exit code

I would also get an empty filed named "0" being output to the ~/.vscode-remote/bin/a5536b8f5a16a10d859f3dec1e59701671bf069e folder.

FIX: This one is due to the way the condition is written after extracting the tar archive. There's an if statement immediately following the tar with the syntax if [ $? > 0 ] and that needs to be changed to if [ $? -ne 0 ]. What's happening in the first condition is it's actually writing the output to a file named "0" in the output directory and of course that conditional statement is passing because the > 0 write returns an exit-code of 0 itself.

Error 2

Warning: bad syntax, perhaps a bogus ‘-‘? See /usr/share/doc/procps-3.2.7/FAQ

I'm not really sure how to explain why this is an issue, but from what I can tell the ps command operates different under tty environments.

FIX: Again, I edited the same file .vscode-insiders/extensions/ms-vscode-remote.remote-ssh-0.37.0/out/extension.js and I just made a single find/replace: :s/ps -ax/ps ax/g and this warning went away.

Hi @roblourens ,

WARNING: tar exited with non-0 exit code is probably the real issue. Do you get the same error if you try this multiple times? We just download the server tar then try to untar it.

I see the same line in my log. Perhaps this is the cause of the issues #84 and #103.

What OS is your remote machine running?

Debian 9.9 Stretch too, like @seanzamora .

So, please reopen this issue.

@jeffberry Thanks for the analysis. You are right about Error 1, that has been fixed (but not released yet).

Error 2, I think you are right too, I will just remove the -.

@lars18th I am also experiencing #103 which is unfortunate because this extension looks like everything I've been waiting for. Unfortunately the fixes that I found for these two warnings did not fix the issue. I'm still trying to figure out what's going on there, but since the code is minified it's really hard to debug.

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!

I identified this when RUNNING bash variable was returning a 2 rather than a 0.

RUNNING="ps -ax | grep $VSCH_DIR/out/remoteExtensionHostAgent.js | grep -v grep | wc -l | tr -d '[:space:]'"

Perhaps killing any running server agents before the install bash is executed will help prevent this issue for other users.

How did you determine the proper processes to kill?

ps -ax I beleive.

Thanks.

What should I bee looking for? Don't see anything vscode related insofar as I can tell.

I'm not sure if this is 100% advised, but i did the following.

  1. Ran the following command "ps -ax | grep $VSCH_DIR/out/remoteExtensionHostAgent.js | grep -v grep", This should output a list of agents. The PID is the series of leading numbers.
  2. Now run the following command for each PID. " Kill {PID} "
  3. Delete ".vscode_remote" folder in user home directory type "cd ~" then "rm -r .vscode-remote"
  4. Reinitialize vscode Remote SSH.

Hope this helps. This worked for me.

Was this page helpful?
0 / 5 - 0 ratings