Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start remote server #123

Closed
seanzamora opened this issue May 4, 2019 · 17 comments
Closed

Unable to start remote server #123

seanzamora opened this issue May 4, 2019 · 17 comments
Labels
ssh Issue in vscode-remote SSH

Comments

@seanzamora
Copy link

seanzamora commented May 4, 2019

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
@Tyriar Tyriar transferred this issue from microsoft/vscode May 4, 2019
@Tyriar Tyriar removed their assignment May 4, 2019
@Tyriar Tyriar added the ssh Issue in vscode-remote SSH label May 4, 2019
@roblourens
Copy link
Member

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?

@seanzamora
Copy link
Author

seanzamora commented May 4, 2019 via email

@roblourens
Copy link
Member

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 $??

@seanzamora
Copy link
Author

seanzamora commented May 4, 2019 via email

@seanzamora
Copy link
Author

seanzamora commented May 4, 2019 via email

@seanzamora
Copy link
Author

Here's what extracted:

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

Echo $? returns 0 by the way.

@seanzamora
Copy link
Author

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.

@roblourens
Copy link
Member

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...

@seanzamora
Copy link
Author

seanzamora commented May 5, 2019 via email

@jeffberry
Copy link

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.

@lars18th
Copy link

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.

@roblourens
Copy link
Member

@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 -.

@jeffberry
Copy link

@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.

@ohmeow
Copy link

ohmeow commented May 21, 2019

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?

@seanzamora
Copy link
Author

seanzamora commented May 21, 2019 via email

@ohmeow
Copy link

ohmeow commented May 21, 2019

Thanks.

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

@seanzamora
Copy link
Author

seanzamora commented May 21, 2019 via email

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

6 participants