Skip to content

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

Closed
@LesterCheng

Description

@LesterCheng

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?

Activity

Chuxel

Chuxel commented on May 2, 2019

@Chuxel
Member

@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

LesterCheng commented on May 2, 2019

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

kieferrm commented on May 2, 2019

@kieferrm
Member

@LesterCheng not at this time.

LesterCheng

LesterCheng commented on May 2, 2019

@LesterCheng
Author

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

Chuxel

Chuxel commented on May 2, 2019

@Chuxel
Member

@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

LesterCheng commented on May 2, 2019

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

changed the title [-]Offline Connectivity[/-] [+]Use VS Code Remote Development w/o marketplace, update connectivity[/+] on May 2, 2019
Chuxel

Chuxel commented on May 2, 2019

@Chuxel
Member

@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

underchemist commented on May 3, 2019

@underchemist

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

WSLUser commented on May 3, 2019

@WSLUser

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.

added
sshIssue in vscode-remote SSH
on May 3, 2019

94 remaining items

roblourens

roblourens commented on Aug 27, 2019

@roblourens
Member

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

jjunac

jjunac commented on Aug 27, 2019

@jjunac

@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

underchemist commented on Aug 27, 2019

@underchemist

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

roblourens commented on Aug 27, 2019

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

jjunac commented on Aug 28, 2019

@jjunac

@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

LiXiaYu commented on Sep 10, 2019

@LiXiaYu

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

lpetre commented on Sep 19, 2019

@lpetre

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

locked and limited conversation to collaborators on Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityon-testplansshIssue in vscode-remote SSH

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @atomgalaxy@egamma@lpetre@Chuxel@roblourens

      Issue actions

        Use VS Code Remote Development w/o marketplace, update connectivity · Issue #15 · microsoft/vscode-remote-release