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

Use VS Code Remote Development w/o marketplace, update connectivity #15

Closed
LesterCheng opened this issue May 2, 2019 · 89 comments
Closed
Assignees
Labels
feature-request Request for new features or functionality on-testplan ssh Issue in vscode-remote SSH
Milestone

Comments

@LesterCheng
Copy link

Is there anyway to get around this limitation "VS Code Server requires outbound HTTPS (port 443) connectivity to update.code.visualstudio.com and marketplace.visualstudio.com"?

To clarify: will this work if the local os and remote machine both have ssh connectivity to each other but no outbound connectivity?

@Chuxel
Copy link
Member

Chuxel commented May 2, 2019

@LesterCheng Currently the machine you connect to needs to have outbound connectivity to both update.code.visualstudio.com and marketplace.visualstudio.com. These are used to acquire and update the "VS Code Server" and the extensions installed remotely. So, if I'm understanding correctly, I think the answer to your question is no.

@LesterCheng
Copy link
Author

@Chuxel is there any possibility of getting a packaged version of the "VS Code Server" that could be loaded onto the remote machine manually to avoid creating an outbound connection?

@kieferrm
Copy link
Member

kieferrm commented May 2, 2019

@LesterCheng not at this time.

@LesterCheng
Copy link
Author

@kieferrm Understood, thanks! Any plans to introduce something like this? Otherwise this issue can be closed.

@Chuxel
Copy link
Member

Chuxel commented May 2, 2019

@LesterCheng Beyond VS Code server, extensions are also installed on the remote host from the marketplace. We are in preview, so while we don't have specific plans, we are interested in understanding what people need to shape our direction.

That said, our of curiosity, what is your use case? Is there anything in particular preventing you from getting out bound access that we should be aware of?

@LesterCheng
Copy link
Author

@Chuxel without getting into specifics, this is an enterprise environment where development is only done on remote machines which need to be ssh'd into. Neither the remote machine nor the local os (where you ssh from) have connectivity to outside connections. I'd be happy to continue this over email you if it would help. I think a similar scenario was mentioned in the blog announcing this release: "Because the code bases are so large, we see engineers at shops like Facebook (and Microsoft!) use editors like vim to work remotely against secure and powerful "developer VMs".

@Chuxel Chuxel changed the title Offline Connectivity Use VS Code Remote Development w/o marketplace, update connectivity May 2, 2019
@Chuxel Chuxel added the feature-request Request for new features or functionality label May 2, 2019
@Chuxel
Copy link
Member

Chuxel commented May 2, 2019

@LesterCheng Got it - interesting scenario. I changed the title and made it a feature request.

Is this due to security requirements? Happy to interact via email - you can find my mail in my GH profile (but I won't paste it due to crawlers.)

@underchemist
Copy link

Just tagging on to say that I am also developing in a remote environment where we don't have access to outside internet except for certain mirrored repositories like pypi.

@WSLUser
Copy link

WSLUser commented May 3, 2019

I would like to add that I'm in the same situation as @underchemist. I will add supplement that with the caveat that my Windows VM can connect to the Internet to download extensions but in order to connect to the corporate network, I need to re-enable the VPN. The Linux server I develop on doesn't and will never have outside access. Everything is done using mirrored repos including PyPi as mentioned already. Basically I need extensions that I install locally to my VM to duplicate over to the server once I connect to it. A prompt that appears once it activates the ssh connection to the server asking if you would like to install and/or update the Linux extensions with a yes/no option to click on would be ideal. A status bar showing the transfer would great to see as well. This would be done through a sftp or scp session.

@Tyriar Tyriar added the ssh Issue in vscode-remote SSH label May 3, 2019
@lamnguyenx
Copy link

I'm on the same situation. At work I have to connect to a remote desktop before SSH to server. The remote desktop isn't allowed to access world wide web so I always have to install extensions from VSIX files.

Recently, I've switched from VSCode + SSHFS combo to Code-Server, which runs on browser and offer Intellisense. However, it still messing up with browser's keyboard shortcuts, which is a nightmare.

I'd really hope that you guy could build a standalone version soon!!

@soul4soul
Copy link

Similar situation. We have server machines that we can SSH to but they can't access the www. Our dev machines that we SSH from can access the www. It would be great to have an option to have the VSIX be downloaded on the dev machine and SCP'ed to the remote machine.

@jlugjb
Copy link

jlugjb commented May 7, 2019

I also has the similar problem.
manual solve, only for ssh mode

step 1: download the vscode-server
wget -nv -O vscode-server-linux-x64.tar.gz https://update.code.visualstudio.com/commit:daf71423252a707b8e396e8afa8102b717f8213b/server-linux-x64/insider

step 2: copy vscode-server-linux-x64.tar.gz to direction /
cp vscode-server-linux-x64.tar.gz /vscode-server-linux-x64.tar.gz

step 3: modify C:\Users\administrator\.vscode-insiders\extensions\ms-vscode-remote.remote-ssh-0.35.0\out\extension.js
search "wget -nv -O vscode-server-linux-x64.tar.gz https://update.code.visualstudio.com/commit:$COMMIT_ID/server-linux-x64/${t}"

replace it with "cp /vscode-server-linux-x64.tar.gz ."

then retry connected, it's ok.

@stamaimer
Copy link

I also in the same situation.

@cliffburdick
Copy link

Same situation. Cannot install the C++ plugin for some reason even though the internet access should work. It recommends using the VSIX, but I cannot install these manually as far as I know.

@egamma
Copy link
Member

egamma commented May 8, 2019

It recommends using the VSIX, but I cannot install these manually as far as I know.

You can install an extension manually in the remote context, pls see https://code.visualstudio.com/api/advanced-topics/remote-extensions#installing-a-development-version-of-your-extension

image

@lamnguyenx
Copy link

I also has the similar problem.
manual solve

step 1: download the vscode-server
wget -nv -O vscode-server-linux-x64.tar.gz https://update.code.visualstudio.com/commit:daf71423252a707b8e396e8afa8102b717f8213b/server-linux-x64/insider

step 2: copy vscode-server-linux-x64.tar.gz to direction /
cp vscode-server-linux-x64.tar.gz /vscode-server-linux-x64.tar.gz

step 3: modify extensions\ms-vscode-remote.remote-ssh-0.35.0\out\extension.js
search "wget -nv -O vscode-server-linux-x64.tar.gz https://update.code.visualstudio.com/commit:$COMMIT_ID/server-linux-x64/${t}"

replace it with "cp /vscode-server-linux-x64.tar.gz ."

then retry connected, it's ok.

Hi there.

I've downloaded the VSIX file of this extension and unpacked it. I couldn't find any lines in the code that cotains "wget -nv -O vscode-server-linux-x64.tar.gz" as you've suggested.

Anyway, this is what I'm getting when trying to install RemoteSSH extension v0.12 on VSCode v1.34.0 offline:
image

@stamaimer
Copy link

stamaimer commented May 8, 2019

@LesterCheng Currently the machine you connect to needs to have outbound connectivity to both update.code.visualstudio.com and marketplace.visualstudio.com. These are used to acquire and update the "VS Code Server" and the extensions installed remotely. So, if I'm understanding correctly, I think the answer to your question is no.

@Chuxel Instead of download files in the remote server, Is there a possible to use the connection between the local and the remote via ssh to transfer and update the "VS Code Server" and the extensions installed remotely?

@cliffburdick
Copy link

@egamma I don't know if it's specific to the C++ extension, but after installing the VSIX it appears to download a whole bunch of stuff, which is where it's failing and prints this:

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Linux / x86_64)'  Failed. Retrying... Failed. Retrying... Failed. Retrying...Waiting 8 seconds... Failed. Retrying...Waiting 16 seconds... Failed. Retrying... Done!
Downloading package 'ClangFormat (Linux / x86_64)'  Failed. Retrying... Failed. Retrying... Failed. Retrying...Waiting 8 seconds... Failed. Retrying...Waiting 16 seconds... Failed. Retrying... Done!
Downloading package 'Mono Framework Assemblies'  Failed. Retrying... Failed. Retrying... Failed. Retrying...Waiting 8 seconds... Failed. Retrying...Waiting 16 seconds... Failed. Retrying... Done!
Downloading package 'Mono Runtime (Linux / x86_64)'  Failed. Retrying... Failed. Retrying... Failed. Retrying...Waiting 8 seconds... Failed. Retrying...Waiting 16 seconds... Failed. Retrying... Done!

Installing package 'C/C++ language components (Linux / x86_64)'
Failed at stage: installPackages
Error: end of central directory record signature not found

If you work in an offline environment or repeatedly see this error, try downloading a version of the extension with all the dependencies pre-included from https://github.com/Microsoft/vscode-cpptools/releases, then use the "Install from VSIX" command in VS Code to install it.

I tried both the win32 version (client) and linux (server), and in both cases the VSIX fail to install.

@LesterCheng
Copy link
Author

@cliffburdick
Are you using the "offline" release of the c++ extension?
https://github.com/microsoft/vscode-cpptools/releases

@cliffburdick
Copy link

@cliffburdick
Are you using the "offline" release of the c++ extension?
https://github.com/microsoft/vscode-cpptools/releases

@LesterCheng I got it working from the following:
#205 (comment)

@Chuxel
Copy link
Member

Chuxel commented May 8, 2019

@stamaimer Not currently, but this feature request is tracking interest in exactly that scenario.

@dreamorosi
Copy link

dreamorosi commented Aug 21, 2019

@roblourens Yes, I know I am supposed to use the nightly version of the ssh extension. I initially used the regular one but right after I posted the comment I made an edit (see at the bottom) stating that I switched to the nightly one (uninstalling the regular one first) but the results where the same.

Anyway, I updated to today's build and it still doesn't work, but this time I get a different error that suggests that the download from the client actually gets triggered:

Failed to connect to the remote extension host server (Error: write EPROTO 1072394152:error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:../../third_party/boringssl/src/ssl/tls_record.cc:242: )

Here's the complete log, please notice the build number at the top:

[07:42:56.696] remote-ssh-nightly@2019.8.28260
[07:42:56.696] win32 x64
[07:42:56.697] SSH Resolver called for "ssh-remote+ec2-host", attempt 1
[07:42:56.697] SSH Resolver called for host: ec2-host
[07:42:56.697] Setting up SSH remote "ec2-host"
[07:42:56.743] Using commit id "c8d44e24dd250d416475a10efe64e35c9e2c65b3" and quality "insider" for server
[07:42:56.745] Testing ssh with C:\Users\{USER}\AppData\Local\Programs\Git\usr\bin\ssh.exe -V
[07:42:57.081] ssh exited with code: 0
[07:42:57.081] Got stderr from ssh: OpenSSH_7.9p1, OpenSSL 1.1.1a  20 Nov 2018
[07:42:57.081] Running script with connection command: "C:\Users\{USER}\AppData\Local\Programs\Git\usr\bin\ssh.exe" -D 53528 10.196.17.85 bash
[07:42:57.083] Install and start server if needed
[07:42:57.211] > 
[07:42:57.211] Got some output, clearing connection timeout
[07:42:58.303] > Running remote connection script
> Acquiring lock on /home/{REMOTE_USER}/.vscode-server-insiders/bin/c8d44e24dd250d41647
> 5a10efe64e35c9e2c65b3/vscode-remote-lock.c8d44e24dd250d416475a10efe64e35c9e2c65b
> 3
> Installing to /home/{REMOTE_USER}/.vscode-server-insiders/bin/c8d44e24dd250d416475a10
> efe64e35c9e2c65b3...
> Downloading with wget
> 
[07:42:58.434] > wget download failed
> Unable to establish SSL connection.
> XDG_SESSION_ID=5
> SHELL=/bin/bash
> VSCODE_AGENT_FOLDER=/home/{REMOTE_USER}/.vscode-server-insiders
> PWD=/home/{REMOTE_USER}/.vscode-server-insiders/bin/c8d44e24dd250d416475a10efe64e35c9
> e2c65b3
> SHLVL=2
> LESSOPEN=||/usr/bin/lesspipe.sh %s
> XDG_RUNTIME_DIR=/run/user/1000
> _=/usr/bin/printenv
> Trigger client server download
> VSCODE_ARCH==x64==
> 6257dd80-f0bf-4384-8d3a-9e6483712d0a__trigger_vscode_server_download__
> Waiting for client to transfer server archive...
> Waiting for /home/{REMOTE_USER}/.vscode-server-insiders/bin/c8d44e24dd250d416475a10ef
> e64e35c9e2c65b3/vscode-scp-done.flag and vscode-server-linux-x64.tar.gz to exist
> 
--- Removed some ENV VARS ---
> 
[07:42:58.434] Got request to download on client for x64
[07:42:58.517] write EPROTO 1072394152:error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:../../third_party/boringssl/src/ssl/tls_record.cc:242:

[07:42:58.517] ------


[07:43:01.413] > 
[07:43:04.414] > 
[07:43:07.405] > 
[07:43:10.427] > 
[07:43:13.444] > 
[07:43:16.433] > 
[07:43:19.413] > 
[07:43:22.432] > 
[07:43:25.433] > 
[07:43:28.435] > 
[07:43:31.438] > 
[07:43:34.428] > 
[07:43:37.431] > 
[07:43:40.442] >
... It continues to output lines endlessly ...

The OpenSSH version on the remote host is OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017.

Thanks a lot for the work you're putting in this :)

@jjunac
Copy link

jjunac commented Aug 21, 2019

@roblourens Indeed, my bad.
I've just updated it, I'm now running Insiders from 2019-08-19 and remote-ssh-nightly@2019.8.28260.

The wget still takes a while to timeout, I had to kill it manually. Here is the command launched on the remote if it can help you:
wget --connect-timeout=7 --dns-timeout=7 -nv -O vscode-server-linux-x64.tar.gz https://update.code.visualstudio.com/commit:c8d44e24dd250d416475a10efe64e35c9e2c65b3/server-linux-x64/insider

This time it tries try copy from the host, but something else is failing, it's hanging forever, here are the logs:

[07:46:14.918] remote-ssh-nightly@2019.8.28260
[07:46:14.918] win32 x64
[07:46:14.921] SSH Resolver called for "ssh-remote+remotemachine", attempt 1
[07:46:14.921] SSH Resolver called for host: remotemachine
[07:46:14.921] Setting up SSH remote "remotemachine"
[07:46:14.960] Using commit id "c8d44e24dd250d416475a10efe64e35c9e2c65b3" and quality "insider" for server
[07:46:14.963] Testing ssh with ssh -V
[07:46:15.107] ssh exited with code: 0
[07:46:15.107] Got stderr from ssh: OpenSSH_7.9p1, OpenSSL 1.1.1a  20 Nov 2018
[07:46:15.107] Using SSH config file "C:\Users\jjunac\.ssh\config"
[07:46:15.108] Running script with connection command: ssh -D 58334 -F C:\Users\jjunac\.ssh\config remotemachine bash
[07:46:15.110] Install and start server if needed
[07:46:15.313] > 
[07:46:15.313] Got some output, clearing connection timeout
[07:46:17.904] > Running remote connection script
> Acquiring lock on /remote/users/jjunac/.vscode-server-insiders/bin/c8d44e24dd250
> d416475a10efe64e35c9e2c65b3/vscode-remote-lock.c8d44e24dd250d416475a10efe64e35c9
> e2c65b3
> 
[07:46:17.930] > Migrating .vscode-remote to /remote/users/jjunac/.vscode-server-insiders...
> cp: cannot stat `/remote/users/jjunac/.vscode-remote/data': No such file or dire
> ctory
> cp: cannot stat `/remote/users/jjunac/.vscode-remote/extensions': No such file o
> r directory
> Installing to /remote/users/jjunac/.vscode-server-insiders/bin/c8d44e24dd250d416
> 475a10efe64e35c9e2c65b3...
> 
[07:46:17.966] > Downloading with wget
> 
[07:46:28.118] > Acquiring lock on /remote/users/jjunac/.vscode-server-insiders/bin/c8d44e24dd250d416475a10efe64e35c9e2c65b3/vscode-remote-lock.c8d44e24dd250d416475a10efe64e35c9e2c65b3
> Migrating .vscode-remote to /remote/users/jjunac/.vscode-server-insiders...
> cp: cannot stat `/remote/users/jjunac/.vscode-remote/data': No such file or directory
> cp: cannot stat `/remote/users/jjunac/.vscode-remote/extensions': No such file or directory
> Installing to /remote/users/jjunac/.vscode-server-insiders/bin/c8d44e24dd250d416475a10efe64e35c9e2c65b3...
> Downloading with wget
> 
[07:48:19.919] > wget download failed
> 
--- ENV ---
> Trigger client server download
> VSCODE_ARCH==x64==
> 5375110b-86e5-4d5d-9551-983f72a16ebe__trigger_vscode_server_download__
> Waiting for client to transfer server archive...
> Waiting for /remote/users/jjunac/.vscode-server-insiders/bin/c8d44e24dd250d416475a10efe64e35c9e2c65b3/vscode-scp-done.flag and vscode-server-linux-x64.tar.gz to exist
> 
[07:48:20.007] Got request to download on client for x64
[07:48:21.127] Following update server redirect
[07:48:22.951] > 
[07:48:25.955] > 
[07:48:28.972] > 
[07:48:30.554] Finished downloading to C:\Users\jjunac\AppData\Local\Temp\vscode-server_1566373701127\vscode-server-linux-x64.tar.gz
[07:48:30.559] Testing ssh with ssh -V
[07:48:30.631] ssh exited with code: 0
[07:48:30.631] Got stderr from ssh: OpenSSH_7.9p1, OpenSSL 1.1.1a  20 Nov 2018
[07:48:30.631] Testing scp with "scp"
[07:48:31.398] scp exited with code: 1
[07:48:31.398] Got stderr from scp: usage: scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
           [-l limit] [-o ssh_option] [-P port] [-S program] source ... target
[07:48:31.399] Using SSH config file "C:\Users\jjunac\.ssh\config"
[07:48:31.399] Copying file to remote with scp -F C:\Users\jjunac\.ssh\config C:\Users\jjunac\AppData\Local\Temp\vscode-server_1566373701127\vscode-server-linux-x64.tar.gz C:\Users\jjunac\AppData\Local\Temp\vscode-scp-done.flag remotemachine:~/.vscode-server-insiders/bin/c8d44e24dd250d416475a10efe64e35c9e2c65b3/
[07:48:31.535] > 
[07:48:31.968] > 
[07:48:33.998] > C:\Users\jjunac\AppData\Local\Temp\vscode-ser   0%    0     0.0KB/s   --:-- ETA
[07:48:34.963] > 
[07:48:34.998] > C:\Users\jjunac\AppData\Local\Temp\vscode-ser  46%   13MB  13.2MB/s   00:01 ETA
[07:48:35.996] > C:\Users\jjunac\AppData\Local\Temp\vscode-ser  86%   25MB  13.0MB/s   00:00 ETA
[07:48:36.628] > C:\Users\jjunac\AppData\Local\Temp\vscode-ser 100%   29MB  10.8MB/s   00:02
> C:\Users\jjunac\AppData\Local\Temp\vscode-scp 100%    9     1.3KB/s   00:00
> 
[07:48:36.909] "Copy server to host" terminal command done
[07:48:37.965] > 
--- Empty lines... ---
[07:54:47.184] > 
--- ENV ---
> Trigger client server download
> VSCODE_ARCH==x64==
> 5375110b-86e5-4d5d-9551-983f72a16ebe__trigger_vscode_server_download__
> Waiting for client to transfer server archive...
> Waiting for /remote/users/jjunac/.vscode-server-insiders/bin/c8d44e24dd250d416475a10efe64e35c9e2c65b3/vscode-scp-done.flag and vscode-server-linux-x64.tar.gz to exist
> 
[07:54:50.207] > 
[07:54:53.206] > 
--- ENV ---
> Trigger client server download
> VSCODE_ARCH==x64==
> 5375110b-86e5-4d5d-9551-983f72a16ebe__trigger_vscode_server_download__
> Waiting for client to transfer server archive...
> Waiting for /remote/users/jjunac/.vscode-server-insiders/bin/c8d44e24dd250d416475a10efe64e35c9e2c65b3/vscode-scp-done.flag and vscode-server-linux-x64.tar.gz to exist
> 
[07:54:56.202] > 
--- Empty lines... ---
[07:56:38.263] > 
[07:56:41.091] "install" terminal command done
[07:56:41.091] Install terminal quit with output: Waiting for /remote/users/jjunac/.vscode-server-insiders/bin/c8d44e24dd250d416475a10efe64e35c9e2c65b3/vscode-scp-done.flag and vscode-server-linux-x64.tar.gz to exist
[07:56:41.091] Received install output: Waiting for /remote/users/jjunac/.vscode-server-insiders/bin/c8d44e24dd250d416475a10efe64e35c9e2c65b3/vscode-scp-done.flag and vscode-server-linux-x64.tar.gz to exist
[07:56:41.092] Failed to parse remote port from server output: Waiting for /remote/users/jjunac/.vscode-server-insiders/bin/c8d44e24dd250d416475a10efe64e35c9e2c65b3/vscode-scp-done.flag and vscode-server-linux-x64.tar.gz to exist
[07:56:41.093] 
[07:56:41.093] TELEMETRY: {"eventName":"resolver","properties":{"outcome":"failure","reason":"UnparsableOutput"},"measures":{"resolveAttempts":1,"retries":1}}
[07:56:41.094] ------

I have the following file on the remote, if it can help:

$ tree .vscode-server-insiders
.vscode-server-insiders
`-- bin
    `-- c8d44e24dd250d416475a10efe64e35c9e2c65b3
        |-- C:\Users\jjunac\AppData\Local\Temp\vscode-scp-done.flag
        |-- C:\Users\jjunac\AppData\Local\Temp\vscode-server_1566373701127\vscode-server-linux-x64.tar.gz
        `-- vscode-server-linux-x64.tar.gz

2 directories, 3 files

The commands ran by the vscode ssh when it was hanging:

jjunac   23726 23721  0 09:46 ?        00:00:00 sshd: jjunac@notty
jjunac   23727 23726  0 09:46 ?        00:00:00 bash
jjunac   23984 23727  0 09:51 ?        00:00:00 sleep 3

@Helloimbob
Copy link

@roblourens Sure, the version of SSH on the windows box is
OpenSSH_7.9p1, OpenSSL 1.1.1a 20 Nov 2018

[07:58:46.366] remote-ssh-nightly@2019.8.28260
[07:58:46.366] win32 x64
[07:58:46.367] SSH Resolver called for "ssh-remote+remote_host", attempt 1
[07:58:46.367] SSH Resolver called for host: remote_host
[07:58:46.367] Setting up SSH remote "remote_host"
[07:58:46.399] Using commit id "4fa08902f7845050a948d3d74e3b836276fa613a" and quality "insider" for server
[07:58:46.401] Testing ssh with ssh -V
[07:58:46.632] ssh exited with code: 0
[07:58:46.632] Got stderr from ssh: OpenSSH_7.9p1, OpenSSL 1.1.1a  20 Nov 2018
[07:58:46.633] Running script with connection command: ssh -D 62204 remote_host bash
[07:58:46.643] Install and start server if needed
[07:58:47.235] > 
[07:58:47.235] Got some output, clearing connection timeout
[07:58:48.196] > Running remote connection script
> Acquiring lock on /server/users/user/.vscode-server-insiders/bin/4fa08902f7845050a948
> d3d74e3b836276fa613a/vscode-remote-lock.4fa08902f7845050a948d3d74e3b836276fa613a
> 
> 
[07:58:48.203] > Installing to /server/users/user/.vscode-server-insiders/bin/4fa08902f7845050a948d3d7
> 4e3b836276fa613a...
> 
[07:58:48.227] > Downloading with wget
> 
[08:03:33.288] > wget download failed
> 
> XDG_SESSION_ID=7113
> SHELL=/usr/bin/bash
> SSH_CLIENT=192.168.134.58 62208 22
> FID_CURRENTRUN_LOGS={}/runtime/currentRun
> PYTH_SCRIPTS=/top/users/user/scripts/python
> USER=user
> LS_COLORS=di=1;33:mi=1;31
> VSCODE_AGENT_FOLDER=/top/users/user/.vscode-server-insiders
> PATH=/usr/local/bin:/usr/bin
> MAIL=/var/mail/user
> PWD=/top/users/user/.vscode-server-insiders/bin/4fa08902f7845050a948d3d74e3b836276
> fa613a
[08:03:33.324] > 
> THIRD_PARTY=/server/infrastructure_release/vdev_build/core/third-party_LI
> NUX_X86/
> HOME=/top/users/user
> SHLVL=2
> FID_LOGS=/runtime/logs
> LOGNAME=user
> SSH_CONNECTION=192.168.134.58 62208 192.168.218.36 22
> P4USER=User
> XDG_RUNTIME_DIR=/run/user/2403
> _=/usr/bin/printenv
> OLDPWD=/server/users/user
> Trigger client server download
> VSCODE_ARCH==x64==
> 0d60836f-4b12-4551-9454-3a1b9752a48d__trigger_vscode_server_download__
> Waiting for client to transfer server archive...
> Waiting for /server/users/user/.vscode-server-insiders/bin/4fa08902f7845050a948d3d74e
> 3b836276fa613a/vscode-scp-done.flag and vscode-server-linux-x64.tar.gz to exist
> 
[08:03:33.324] Got request to download on client for x64
[08:03:33.423] Following update server redirect
[08:03:36.023] Finished downloading to C:\Users\User\AppData\Local\Temp\vscode-server_1566374613423\vscode-server-linux-x64.tar.gz
[08:03:36.026] Testing ssh with ssh -V
[08:03:36.289] ssh exited with code: 0
[08:03:36.289] Got stderr from ssh: OpenSSH_7.9p1, OpenSSL 1.1.1a  20 Nov 2018
[08:03:36.289] Testing scp with "scp"
[08:03:36.311] > 
[08:03:36.533] scp exited with code: 1
[08:03:36.533] Got stderr from scp: usage: scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
           [-l limit] [-o ssh_option] [-P port] [-S program] source ... target
[08:03:36.534] Copying file to remote with scp C:\Users\User\AppData\Local\Temp\vscode-server_1566374613423\vscode-server-linux-x64.tar.gz C:\Users\User\AppData\Local\Temp\vscode-scp-done.flag remote_host:~/.vscode-server-insiders/bin/4fa08902f7845050a948d3d74e3b836276fa613a/
[08:03:36.790] > 
[08:03:38.125] > C:\Users\User\AppData\Local\Temp\vsco   0%    0     0.0KB/s   --:-- ETA
[08:03:39.122] > C:\Users\User\AppData\Local\Temp\vsco  46%   13MB  13.2MB/s   00:01 ETA
[08:03:39.311] > 
[08:03:40.122] > C:\Users\User\AppData\Local\Temp\vsco  86%   25MB  13.0MB/s   00:00 ETA
[08:03:40.716] > C:\Users\User\AppData\Local\Temp\vsco 100%   29MB  11.1MB/s   00:02
> C:\Users\User\AppData\Local\Temp\vsco 100%    9     1.1KB/s   00:00
> 
[08:03:41.029] "Copy server to host" terminal command done

If I manually go to the AppData/Local/Temp/... directory and scp the file across with
scp vscode-server-linux-x64.tar.gz remote_host:~/.vscode-server-insiders/bin/4fa08902f7845050a948d3d74e3b836276fa613a/. it seems to transfer the file correctly.

@WSLUser
Copy link

WSLUser commented Aug 21, 2019

@roblourens Currently what you've done is make it so you need the client to have access to the remote host while remaining connected to the Internet. This dependency needs to be removed. By default, the server should be updated every time VSCode updates (thanks for clarification there) on the client side. Then, when the client does have access to the remote host (but does NOT have Internet access), the ssh extension will scp the server over to the remote host. This should also improve the situation for all users as it should be faster to download to client and then scp to remote host regardless if the remote has Internet access or not.

@underchemist
Copy link

Thanks for all this work! I'm still having some issues with this on latest insiders and nightly builds.

Running remote connection script
Acquiring lock on /home/<user>/.vscode-server-insiders/bin/ada79d72be36ecbfed6f88bb16edcc5cc3f5c2a8/vscode-remote-lock.ada79d72be36ecbfed6f88bb16edcc5cc3f5c2a8
Installing to /home/<user>/.vscode-server-insiders/bin/ada79d72be36ecbfed6f88bb16edcc5cc3f5c2a8...
Downloading with wget
wget download failed
https://update.code.visualstudio.com/commit:ada79d72be36ecbfed6f88bb16edcc5cc3f5c2a8/server-linux-x64/insider: 2019-08-21 09:30:12 ERROR 503: Service Unavailable.
SSH_CONNECTION=<redac> 58985 <redac>
LANG=en_US.UTF-8
XDG_SESSION_ID=329
USER=<user>
PWD=/home/<user>/.vscode-server-insiders/bin/ada79d72be36ecbfed6f88bb16edcc5cc3f5c2a8
HOME=/home/<user>
SSH_CLIENT=<redac> 58985 22
MAIL=/var/mail/<user>
SHELL=/bin/bash
SHLVL=2
VSCODE_AGENT_FOLDER=/home/<user>/.vscode-server-insiders
LOGNAME=<user>
XDG_RUNTIME_DIR=/run/user/70257
PATH=/data/<user>/anaconda3/bin:/home/<user>/local/bin/portainer:/home/<user>/local/bin:/usr/local/bin:/usr/bin
CVS_RSH=ssh
LESSOPEN=||/usr/bin/lesspipe.sh %s
_=/usr/bin/printenv
OLDPWD=/home/<user>
Trigger client server download
VSCODE_ARCH==x64==
55745db7-6184-48c0-8d6b-35a1ca7f8abf__trigger_vscode_server_download__
Waiting for client to transfer server archive...
Waiting for /home/<user>/.vscode-server-insiders/bin/ada79d72be36ecbfed6f88bb16edcc5cc3f5c2a8/vscode-scp-done.flag
and vscode-server-linux-x64.tar.gz to exist

After a few seconds new terminal pops up very briefly showing that it is transferring the server tar, however it returns to the above terminal waiting for the tar file to appear and hangs. Then if I check on my remote machine I see several tar files (for the several attempts I've made) however their filenames are the full windows path i.e.

 <user>@<hostname>  ~/.vscode-server-insiders/bin/ada79d72be36ecbfed6f88bb16edcc5cc3f5c2a8  ls -lha
total 143M
drwxr-x--- 2 <user> users 4.0K Aug 21 09:28 .
drwxr-x--- 6 <user> users 4.0K Aug 21 09:14 ..
-rw-r----- 1 <user> users    9 Aug 21 09:24 C:\Users\<user>\AppData\Local\Temp\vscode-scp-done.flag
-rw-r----- 1 <user> users  29M Aug 21 09:14 C:\Users\<user>\AppData\Local\Temp\vscode-server_1566404059237\vscode-server-linux-x64.tar.gz
-rw-r----- 1 <user> users  29M Aug 21 09:17 C:\Users\<user>\AppData\Local\Temp\vscode-server_1566404214604\vscode-server-linux-x64.tar.gz
-rw-r----- 1 <user> users  29M Aug 21 09:18 C:\Users\<user>\AppData\Local\Temp\vscode-server_1566404285566\vscode-server-linux-x64.tar.gz
-rw-r----- 1 <user> users  29M Aug 21 09:19 C:\Users\<user>\AppData\Local\Temp\vscode-server_1566404380582\vscode-server-linux-x64.tar.gz
-rw-r----- 1 <user> users  29M Aug 21 09:24 C:\Users\<user>\AppData\Local\Temp\vscode-server_1566404685253\vscode-server-linux-x64.tar.gz
-rw-r----- 1 <user> users    0 Aug 21 09:24 vscode-server-linux-x64.tar.gz

For some reason the check to see if the transfer is done is not being recognized, I assume because of the way the filenames are being saved when transferred? The vscode-scp-done.flag file output is

 <user>@<hostname>  ~/.vscode-server-insiders/bin/ada79d72be36ecbfed6f88bb16edcc5cc3f5c2a8  cat C:\\Users\\<user>\\AppData\\Local\\Temp\\vscode-scp-done.flag
finished

@roblourens
Copy link
Member

@dreamorosi well I have absolutely no idea what this error means:

write EPROTO 1072394152:error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:../../third_party/boringssl/src/ssl/tls_record.cc:242:

At this point, we are just trying to download the server on the client, using node's https. I think the error is coming from electron/node. Are you using a proxy or have any other special setup that might affect this?

@jjunac if you run that command in a terminal on the remote, does it ever time out? I am expecting it to timeout within 7 seconds. If it doesn't, I don't know what it's waiting for.

After that it seems likely that you are seeing the same issue with getting the wrong name for the target file that @Helloimbob and @underchemist are seeing.

If I manually go to the AppData/Local/Temp/... directory and scp the file across with
scp vscode-server-linux-x64.tar.gz remote_host:~/.vscode-server-insiders/bin/4fa08902f7845050a948d3d74e3b836276fa613a/. it seems to transfer the file correctly.

Thanks for the suggestion, will change the extension to try that.

@WSLUser Now I understand, thanks. The thing is, we publish a bunch of flavors of the server, and that number will grow, and they are large. We can't download all of the servers preemptively every time vscode updates. If we downloaded them ahead of time it would have to be a user-initiated experience. But I think this is separate from what I am trying to do here, so feel free to open a new issue for it.

@jjunac
Copy link

jjunac commented Aug 22, 2019

@roblourens I investigated the timeout thing, and on my version of wget (GNU 1.11.4, yeah pretty old) there are 20 tries by default. So the actual waiting time is 140 seconds. I would suggest adding the -t 1 option to limit the try to 1.
Also, with the current command wget can get a read timeout, which by default (at least on my version) is 900 seconds. Hence, you might want to use this option instead of specifying all the timeouts:

       -T seconds
       --timeout=seconds
           Set the network timeout to seconds seconds.  This is equivalent to specifying --dns-timeout, --connect-timeout, and --read-timeout, all at the same time.

           When interacting with the network, Wget can check for timeout and abort the operation if it takes too long.  This prevents anomalies like hanging reads and infinite connects.  The only timeout enabled by default is a 900-second read
           timeout.  Setting a timeout to 0 disables it altogether.  Unless you know what you are doing, it is best not to change the default timeout settings.

           All timeout-related options accept decimal values, as well as subsecond values.  For example, 0.1 seconds is a legal (though unwise) choice of timeout.  Subsecond timeouts are useful for checking server response times or for testing
           network latency.

Hope it helps 😃 Thank you for the huge amount of effort you are putting in this feature 💯

@dreamorosi
Copy link

@roblourens Yes, because of company policies I am connected to a VPN and use proxies. I have setup my proxy settings (credentials, host, etc. ) in vscode through the http.proxy setting so they should be picked up no?

In some cases SSL has proven to be an issue on this setup with many more tools due to some company self signed certificates. Is there any way to download the client without it (maybe some flags like --no-verify-ssl or better an entry in settings.json)? I know it's not ideal but maybe adding this kind of setting to do a manual override could solve the issue.

@WSLUser
Copy link

WSLUser commented Aug 22, 2019

@jjunac FWIW, the error message I get when it attempts (and fails since I can't be connected to download server and connect to remote host) shows it only retries once. However my remote host runs Fedora so maybe your remote host has a different default timeout for ssh.

@roblourens

The thing is, we publish a bunch of flavors of the server, and that number will grow, and they are large.

What are those flavors based on? It really should just be rpm based, deb based, bsd/mac, and arm. None of these servers should have a dependency on systemd and should be agnostic as possible. I would expect Ubuntu and Debian for example to work with the same exact server just like I would expect Oracle Linux and RHEL should use the same server (along with derivatives). (the only difference is the BerkeleyDB implementation in which Oracle provides a bunch of nasty hacks to get certain things running).

Worse comes to worse, you simply add a check so you know which server to download if you really want to maintain a ton of servers. That would only take a few seconds to run and ensure you're not just grabbing them all. You could also have an explicit setting that allows the user to tell the extension which server to download. I can file a new issue for this as suggested if it will allow this issue to be fully resolved.

@roblourens
Copy link
Member

@jjunac I set connect timeout and dns timeout. If you don't have internet access, that should be enough, right? I don't want to set --read-timeout because I don't want to fail just for slow connections. (not yet, maybe that is a use case for letting the user explicitly pick which side to download on)

@roblourens
Copy link
Member

@WSLUser There will be several versions for architecture/OS (including windows, eventually), and the download is about 30MB, so I think it's not ok for us to predownload every version ahead of time.

Thinking this goes along with the comments above about offline clients so I opened #1242 for this, feel free to add any comments.

@jjunac
Copy link

jjunac commented Aug 26, 2019

@roblourens Yes sure it is enough if there is no internet connection, I just wanted to raise that the read timeout is awfully long by default, but if you have a plan for that then it's fine :)

However is there a plan to hardcode the number of tries to make sure the behavior is the same for every machine ? As in my company we are running SLES 11 with an old version of GNU Wget (1.11.4) and by default wget tries 20 times:

       -t number
       --tries=number
           Set number of retries to number.  Specify 0 or inf for infinite retrying.  The default is to retry 20 times, with the exception of fatal errors like "connection refused" or "not found" (404), which are not retried.

@roblourens
Copy link
Member

Oh, does it retry for the offline error you get? In my testing, it is not retrying for "Network is unreachable".

If you just run wget for microsoft.com or something else on your offline host, what error do you get?

@roblourens
Copy link
Member

And I've pushed a fix for the path issue on windows that @Helloimbob and @underchemist are seeing.

@jjunac
Copy link

jjunac commented Aug 27, 2019

@roblourens I set the timeout to 1s and tried to wget something, and it is indeed trying 20 times:

--2019-08-27 09:15:41--  http://whatever.com/
Resolving whatever.com... ***an IP***
Connecting to whatever.com|***an IP***|:80... failed: Connection timed out.
Retrying.

--2019-08-27 09:15:43--  (try: 2)  http://whatever.com/
Connecting to whatever.com|***an IP***|:80... failed: Connection timed out.
Retrying.

--2019-08-27 09:15:46--  (try: 3)  http://whatever.com/
Connecting to whatever.com|***an IP***|:80... failed: Connection timed out.
Retrying.

--2019-08-27 09:15:50--  (try: 4)  http://whatever.com/
Connecting to whatever.com|***an IP***|:80... failed: Connection timed out.
Retrying.

.... and so on

On the other hand, I just did another test, and the path error is indeed fixed. However, I'm getting a Failed to connect to the remote extension host server (Error: Connection error: Unauthorized client refused.) error shortly after. Here are the logs:

[07:11:20.862] Remote server is listening on port 59753
[07:11:20.862] Parsed server configuration: {"agentPort":59753,"osReleaseId":"sles","webUiAccessToken":""}
[07:11:20.863] Starting forwarding server. localPort 56314 -> socksPort 56310 -> remotePort 59753
[07:11:20.865] Forwarding server listening on 56314
[07:11:20.865] Waiting for ssh tunnel to be ready
[07:11:20.869] Tunneled remote port 59753 to local port 56314
[07:11:20.869] Resolved "ssh-remote+remotemachine" to "127.0.0.1:56314"
[07:11:20.869] TELEMETRY: {"eventName":"resolver","properties":{"outcome":"success","osReleaseId":"sles"},"measures":{"resolveAttempts":1,"retries":1}}
[07:11:20.870] ------
[07:11:20.870] [Forwarding server 56314] Got connection 0
[07:11:20.884] [Forwarding server 56314] Got connection 1
[07:11:20.886] [Forwarding server 56314] Got connection 2

And here is the stack trace I'm getting in the JS console:

  ERR [remote-connection][Management   ][4efe7…][initial][127.0.0.1:56314] received error control message when negotiating connection. Error:
log.ts:173   ERR Error: Connection error: Unauthorized client refused.
    at _ (remoteAgentConnection.ts:553)
    at o.onControlMessage.l (remoteAgentConnection.ts:189)
    at d.fire (event.ts:572)
    at v.fire (ipc.net.ts:449)
    at _receiveMessage (ipc.net.ts:732)
    at _socketDisposables.push._socketReader.onMessage.e (ipc.net.ts:588)
    at d.fire (event.ts:572)
    at g.acceptChunk (ipc.net.ts:235)
    at _register._socket.onData.e (ipc.net.ts:196)
    at Socket.t (ipc.net.ts:28)
    at Socket.emit (events.js:182)
    at addChunk (_stream_readable.js:283)
    at readableAddChunk (_stream_readable.js:264)
    at Socket.Readable.push (_stream_readable.js:219)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94)
log.ts:173   ERR [remote-connection] An error occurred in the very first connect attempt, it will be treated as a permanent error! Error:
log.ts:173   ERR Error: Connection error: Unauthorized client refused.
    at _ (remoteAgentConnection.ts:553)
    at o.onControlMessage.l (remoteAgentConnection.ts:189)
    at d.fire (event.ts:572)
    at v.fire (ipc.net.ts:449)
    at _receiveMessage (ipc.net.ts:732)
    at _socketDisposables.push._socketReader.onMessage.e (ipc.net.ts:588)
    at d.fire (event.ts:572)
    at g.acceptChunk (ipc.net.ts:235)
    at _register._socket.onData.e (ipc.net.ts:196)
    at Socket.t (ipc.net.ts:28)
    at Socket.emit (events.js:182)
    at addChunk (_stream_readable.js:283)
    at readableAddChunk (_stream_readable.js:264)
    at Socket.Readable.push (_stream_readable.js:219)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94)
notificationsAlerts.ts:40 Failed to connect to the remote extension host server (Error: Connection error: Unauthorized client refused.)
onDidNotificationChange @ notificationsAlerts.ts:40
notificationsAlerts.ts:40 Could not fetch remote environment
onDidNotificationChange @ notificationsAlerts.ts:40
log.ts:173   ERR [remote-connection][ExtensionHost][14b57…][initial][127.0.0.1:56314] received error control message when negotiating connection. Error:
log.ts:173   ERR Error: Connection error: Unauthorized client refused.
    at _ (remoteAgentConnection.ts:553)
    at o.onControlMessage.l (remoteAgentConnection.ts:189)
    at d.fire (event.ts:572)
    at v.fire (ipc.net.ts:449)
    at _receiveMessage (ipc.net.ts:732)
    at _socketDisposables.push._socketReader.onMessage.e (ipc.net.ts:588)
    at d.fire (event.ts:572)
    at g.acceptChunk (ipc.net.ts:235)
    at _register._socket.onData.e (ipc.net.ts:196)
    at Socket.t (ipc.net.ts:28)
    at Socket.emit (events.js:182)
    at addChunk (_stream_readable.js:283)
    at readableAddChunk (_stream_readable.js:264)
    at Socket.Readable.push (_stream_readable.js:219)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94)
log.ts:173   ERR [remote-connection] An error occurred in the very first connect attempt, it will be treated as a permanent error! Error:
log.ts:173   ERR Error: Connection error: Unauthorized client refused.
    at _ (remoteAgentConnection.ts:553)
    at o.onControlMessage.l (remoteAgentConnection.ts:189)
    at d.fire (event.ts:572)
    at v.fire (ipc.net.ts:449)
    at _receiveMessage (ipc.net.ts:732)
    at _socketDisposables.push._socketReader.onMessage.e (ipc.net.ts:588)
    at d.fire (event.ts:572)
    at g.acceptChunk (ipc.net.ts:235)
    at _register._socket.onData.e (ipc.net.ts:196)
    at Socket.t (ipc.net.ts:28)
    at Socket.emit (events.js:182)
    at addChunk (_stream_readable.js:283)
    at readableAddChunk (_stream_readable.js:264)
    at Socket.Readable.push (_stream_readable.js:219)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94)
extensionHostProcessManager.ts:76 Error received from starting extension host
_extensionHostProcessProxy._extensionHostProcessWorker.start.then.e @ extensionHostProcessManager.ts:76
extensionHostProcessManager.ts:77 Error: Connection error: Unauthorized client refused.
    at _ (remoteAgentConnection.ts:553)
    at o.onControlMessage.l (remoteAgentConnection.ts:189)
    at d.fire (event.ts:572)
    at v.fire (ipc.net.ts:449)
    at _receiveMessage (ipc.net.ts:732)
    at _socketDisposables.push._socketReader.onMessage.e (ipc.net.ts:588)
    at d.fire (event.ts:572)
    at g.acceptChunk (ipc.net.ts:235)
    at _register._socket.onData.e (ipc.net.ts:196)
    at Socket.t (ipc.net.ts:28)
    at Socket.emit (events.js:182)
    at addChunk (_stream_readable.js:283)
    at readableAddChunk (_stream_readable.js:264)
    at Socket.Readable.push (_stream_readable.js:219)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94)
_extensionHostProcessProxy._extensionHostProcessWorker.start.then.e @ extensionHostProcessManager.ts:77
log.ts:173   ERR Connection error: Unauthorized client refused.: Error: Connection error: Unauthorized client refused.
    at _ (file:///C:/Users/jjunac/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1676:506)
    at o.onControlMessage.l (file:///C:/Users/jjunac/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1674:659)
    at d.fire (file:///C:/Users/jjunac/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:107:468)
    at v.fire (file:///C:/Users/jjunac/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:350:801)
    at _receiveMessage (file:///C:/Users/jjunac/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:355:324)
    at _socketDisposables.push._socketReader.onMessage.e (file:///C:/Users/jjunac/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:352:321)
    at d.fire (file:///C:/Users/jjunac/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:107:468)
    at g.acceptChunk (file:///C:/Users/jjunac/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:348:234)
    at _register._socket.onData.e (file:///C:/Users/jjunac/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:347:592)
    at Socket.t (file:///C:/Users/jjunac/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:357:518)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:283:12)
    at readableAddChunk (_stream_readable.js:264:11)
    at Socket.Readable.push (_stream_readable.js:219:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

It seems to be linked to the extension server. Am I missing something ?
Thanks for your work

@underchemist
Copy link

I can confirm that I can now connect to remote host by having my vs code client transfer the server code instead of fetching through wget. cheers.

@roblourens
Copy link
Member

Progress. @jjunac looks like you are now seeing #103 which means that you might not have a compatible glic version. Some details and tips here: https://code.visualstudio.com/docs/remote/linux#_remote-host-container-wsl-linux-prerequisites

@jjunac
Copy link

jjunac commented Aug 28, 2019

@roblourens Indeed, the version of glibc on the machine is below the requirements. Thank you for the doc, I will see what I can do.

@LiXiaYu
Copy link

LiXiaYu commented Sep 10, 2019

I also has the similar problem.
manual solve, only for ssh mode

step 1: download the vscode-server
wget -nv -O vscode-server-linux-x64.tar.gz https://update.code.visualstudio.com/commit:daf71423252a707b8e396e8afa8102b717f8213b/server-linux-x64/insider

step 2: copy vscode-server-linux-x64.tar.gz to direction /
cp vscode-server-linux-x64.tar.gz /vscode-server-linux-x64.tar.gz

step 3: modify C:\Users\administrator.vscode-insiders\extensions\ms-vscode-remote.remote-ssh-0.35.0\out\extension.js
search "wget -nv -O vscode-server-linux-x64.tar.gz https://update.code.visualstudio.com/commit:$COMMIT_ID/server-linux-x64/${t}"

replace it with "cp /vscode-server-linux-x64.tar.gz ."

then retry connected, it's ok.

Hi there.
Your method is cool! but I can't finish it because extension.js
changed form in version 0.46.0.
Could you help me see how to use it in the new version?
Thanks

@lpetre
Copy link

lpetre commented Sep 19, 2019

@roblourens thanks so much for adding this! I've been eagerly awaiting it.

I'm having trouble with proxy settings on the local side, running on Windows with system proxy settings. I have no problem installing extensions locally, but with allowLocalServerDownload=true the client server download is failing:

[15:10:31.982] remote-ssh-nightly@2019.9.25380
[15:10:31.982] win32 x64
[15:10:31.982] SSH Resolver called for "ssh-remote+lhs", attempt 1
[15:10:31.982] SSH Resolver called for host: lhs
[15:10:31.982] Setting up SSH remote "lhs"
[15:10:32.011] Using commit id "8b6e0efc0a98639085fabeb5226a516785424796" and quality "insider" for server
[15:10:32.014] Testing ssh with C:\Windows\System32\OpenSSH\ssh.exe -V
[15:10:32.068] ssh exited with code: 0
[15:10:32.068] Got stderr from ssh: OpenSSH_for_Windows_7.9p1, LibreSSL 2.6.4
[15:10:32.069] Using SSH config file "c:\Users\lukep\.ssh\config"
[15:10:32.069] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 54268 -F c:\Users\lukep\.ssh\config lhs bash
[15:10:32.073] Install and start server if needed
[15:10:32.226] > 
[15:10:32.226] Got some output, clearing connection timeout
[15:10:33.298] > 96508ccb4aba: running
> Acquiring lock on /home/lukep/.vscode-server-insiders/bin/8b6e0efc0a98639085fabe
> b5226a516785424796/vscode-remote-lock.8b6e0efc0a98639085fabeb5226a516785424796
> Installing to /home/lukep/.vscode-server-insiders/bin/8b6e0efc0a98639085fabeb522
> 6a516785424796...
> Downloading with wget
> 
[15:10:33.748] > Acquiring lock on /home/lukep/.vscode-server-insiders/bin/8b6e0efc0a98639085fabeb5226a516785424796/vscode-remote-lock.8b6e0efc0a986390
> 85fabeb5226a516785424796
> Installing to /home/lukep/.vscode-server-insiders/bin/8b6e0efc0a98639085fabeb5226a516785424796...
> Downloading with wget
> 
> 
[15:10:39.885] > Acquiring lock on /home/lukep/.vscode-server-insiders/bin/8b6e0efc0a98639085fabeb5226a516785424796/vscode-remote-lock.8b6e0efc0a98639085fabeb5226a516785424796
> Installing to /home/lukep/.vscode-server-insiders/bin/8b6e0efc0a98639085fabeb5226a516785424796...
> Downloading with wget
> 
> 
> 
[15:10:40.384] > wget download failed
> failed: Connection timed out.
...
> 
[15:10:40.472] > Trigger client server download
> VSCODE_ARCH==x64==
> 96508ccb4aba__trigger_vscode_server_download__
> Waiting for client to transfer server archive...
> Waiting for /home/lukep/.vscode-server-insiders/bin/8b6e0efc0a98639085fabeb5226a516785424796/vscode-scp-done.flag and vscode-server-linux-x64.tar.gz to exist
> 
[15:10:40.473] Got request to download on client for x64
[15:10:40.677] Failed to download VS Code Server: HTTP 407 - Proxy Authentication Required

I'm not sure how to debug this further, can you help?

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests