Timeout in start_server on remote is not communicated to client
Is there an existing issue for this bug?
- [x] I have searched the existing open issues and found none that apply.
- [x] If I find any issue of interest that is related or closed, I will included a link to it in this issue.
Required Troubleshooting Steps
- [x] I have read and performed the troubleshooting steps
- [x] I have tried both values of the
remote.SSH.useLocalServersetting - [x] My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
- [x] I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar
[Optional] Diagnose with Copilot
I did not ask the @remote-ssh participant for help
In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?
I did not try step 2 of the troubleshooting steps
Remote-SSH Log
Remote-SSH Log
...
[14:41:21.662] Platform: linux
[14:41:21.666] > /bin/bash
[14:41:21.666] Parent Shell: bash
[14:41:21.666] Parent Shell pid: 7495
[14:41:21.667] Waiting for subshell to start
[14:41:21.672] > 3702013
[14:41:21.672] stdout -> '3702013'
[14:41:21.672] sub-process detected
[14:41:21.679] > 302696a65d5d: running
> Script executing under PID: 3702013
[14:41:21.689] > Found existing installation at /home/user/.vscode-server...
> Starting VS Code CLI...
[14:41:21.690] > Removing old logfile at /home/user/.vscode-server/.cli.ddc367ed5c8936efe395cffeec279b04ffd7db78.log
[14:41:21.695] > Spawned remote CLI: 3702031
[14:41:21.697] > Waiting for server log...
[14:41:21.731] > Waiting for server log...
[14:41:21.764] > Waiting for server log...
[14:41:21.799] > Waiting for server log...
[14:41:21.832] > Waiting for server log...
[14:41:21.867] > Waiting for server log...
[14:41:21.900] > Waiting for server log...
[14:41:21.933] > Waiting for server log...
[14:41:21.966] > Waiting for server log...
[14:41:22.000] > Waiting for server log...
[14:41:22.033] > Waiting for server log...
[14:41:22.067] > Waiting for server log...
[14:41:22.100] > Waiting for server log...
[14:41:22.133] > Waiting for server log...
[14:41:22.167] > Waiting for server log...
[14:41:22.201] > 302696a65d5d: start
> listeningOn====
> osReleaseId==debian==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/2897==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==509==
> execServerToken==11a111aa-aaa1-1aa1-aa1a-a1111a1111aa==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK==/tmp/ssh-zll5DDTaLtZ4/agent.2000706==
> DISPLAY====
> 302696a65d5d: end
[14:41:22.202] Received install output:
listeningOn====
osReleaseId==debian==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/2897==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==509==
execServerToken==11a111aa-aaa1-1aa1-aa1a-a1111a1111aa==
platformDownloadPath==cli-alpine-x64==
SSH_AUTH_SOCK==/tmp/ssh-zll5DDTaLtZ4/agent.2000706==
DISPLAY====
[14:41:22.204] Failed to parse remote port from server output
[14:41:22.204] Terminating local server
[14:41:22.209] Resolver error: Error:
at y.Create (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:742768)
at t.handleInstallOutput (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:740849)
at e (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:796388)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:819119
at async t.withShowDetailsEvent (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:822810)
at async /Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:793100
at async P (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:791155)
at async t.resolveWithLocalServer (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:792652)
at async x (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:815972)
at async t.resolve (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:820211)
at async /Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:1107798
[14:41:22.210] Local server exit: 15
[14:41:22.214] ------
Expected Behavior
At the very least, VSCode should show a modal that says Timed out waiting for VSCode server to start on "hostname". Ideally, the timeout is simply a bit longer than 15 * .03 seconds.
Actual Behavior
VSCode shows a Could not establish a connection to "hostname" message, which is not true.
Steps To Reproduce
Exceed the timeout in linux-exec-server-installer.sh, either by having a slow .bashrc or by manually delaying server startup.
Anything else?
No response
I ran into the same issue with a slightly different use case and haven’t been able to figure it out yet.
Here are the minimal steps to reproduce what I’m seeing:
- Fresh NET install of OpenSUSE Tumbleweed Server (this may occur on other distros too, but I haven’t confirmed)
- Install OpenSSL with:
sudo zypper in openssl -y - Attempt to connect using VSCode
The strange part is that libopenssl is already installed, so I’m not sure why installing the OpenSSL CLI would break things.
I’m currently testing a few things to see if there’s a crash in code-server, but I haven’t had any luck so far.
I encountered the same issue as described by @ThePicpixel. Upon investigating with strace on the CLI, I discovered that the OpenSSL library is utilizing a configuration file located at /etc/ssl/openssl.cnf. This configuration file is parsed by the VSCode CLI and subsequently closed, which seems to function correctly.
Additionally, the CLI checks another file, mentioned in the previous configuration file, located at /etc/crypto-policies/back-ends/opensslcnf.config. Below is the content of the file for reference:
CipherString = @SECLEVEL=2:kEECDH:kRSA:kEDH:kPSK:kDHEPSK:kECDHEPSK:kRSAPSK:-aDSS:-3DES:!DES:!RC4:!RC2:!IDEA:-SEED:!eNULL:!aNULL:!MD5:-SHA384:-CAMELLIA:-ARIA:-AESCCM8
Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_SHA256
TLS.MinProtocol = TLSv1.2
TLS.MaxProtocol = TLSv1.3
DTLS.MinProtocol = DTLSv1.2
DTLS.MaxProtocol = DTLSv1.2
SignatureAlgorithms = ECDSA+SHA256:ECDSA+SHA384:ECDSA+SHA512:ed25519:ed448:rsa_pss_pss_sha256:rsa_pss_pss_sha384:rsa_pss_pss_sha512:rsa_pss_rsae_sha256:rsa_pss_rsae_sha384:rsa_pss_rsae_sha512:RSA+SHA256:RSA+SHA384:RSA+SHA512:ECDSA+SHA224:RSA+SHA224
Groups = X25519:secp256r1:X448:secp521r1:secp384r1:ffdhe2048:ffdhe3072:ffdhe4096:ffdhe6144:ffdhe8192
[openssl_init]
alg_section = evp_properties
[evp_properties]
rh-allow-sha1-signatures = yes
The current version of OpenSSL is 3.5.0-1.1. Removing this configuration file has resolved the issue for now.
@eleanorjboyd hi, just closing the loop, this is the issue I mentioned to you at PyCon!
@connor4312 and @joshspicer could one of you take a quick look at this?
@Rampboss any idea where this configuration file came from? Could it have been updated with a recent release of openssl?
@noahbkim Does @Rampboss 's workaround solve the issue for you?
I'm unable to provide any updates at the moment. I will update openssl and try again to see if the issue persists. I believe this configuration file came from the OpenSUSE openssl package and was updated when the issue occurred. However, I don't think I had any configuration previously installed before updating/installing openssl.
With @ThePicpixel, we tried uninstalling OpenSSL, which resolved the issue. However, removing this configuration file only worked for me, not for ThePicpixel.