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

Failed to connect to the remote extension host server due to unsupported, out of date libraries like glibc (e.g. older CentOS version) #103

Closed
wqfan opened this issue May 4, 2019 · 195 comments · Fixed by NixOS/nixpkgs#76202 or microsoft/vscode#147676
Assignees
Labels
feature-request Request for new features or functionality linux Issue on Linux plan-review PM-highlighted item determined to be P1 or P2 remote Issues in the code server support remote-environment Issues with the remote server's environment rhel/centos

Comments

@wqfan
Copy link

wqfan commented May 4, 2019

  • VSCode Version: Version 1.34.0-insider (1.34.0-insider)
  • Local OS Version: macOS 10.14.4 (18E226)
  • Remote OS Version: Amazon Linux Bare Metal release 2012.03
  • Remote Extension/Connection Type: SSH

Steps to Reproduce:

  1. Cmd-Shift-P, and choose Remote-SSH: Connect current window to host...
  2. Connection is successful. Remote tools are installed and server is running on remote
  3. VS Code shows an error at right-bottom: Failed to connect to the remote extension host server (Error: Connection error: Unauthorized client refused.)

AllowTcpForwarding is enabled on the remote server.

Here is the full output from "Remote - SSH" channel:

SSH Resolver called for "ssh-remote+dev-server"
SSH Resolver called for host: dev-server
Setting up SSH remote "dev-server"
Using commit id "473af338e1bd9ad4d9853933da1cd9d5d9e07dc9" and quality "insider" for server
Install and start server if needed
> bash: no job control in this shell
> Found existing installation...
> Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
> 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)
> *
>  
> bb80525e-2122-4fa5-8e4a-9d91821eeb83==45539==
"install" terminal command done
Received install output: bb80525e-2122-4fa5-8e4a-9d91821eeb83==45539==
Server is listening on port 45539
Spawning tunnel with: ssh  dev-server -N -L localhost:32546:localhost:45539
Spawned SSH tunnel between local port 32546 and remote port 45539
Waiting for ssh tunnel to be ready
Tunneling remote port 45539 to local port 32546
Resolving "ssh-remote+dev-server" to "localhost:32546", attempt: 1

Logs from "Log (Window)" channel:

[2019-05-03 18:02:25.843] [renderer1] [error] Connection error: Unauthorized client refused.: Error: Connection error: Unauthorized client refused.
    at v (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1544:9)
    at t.onControlMessage.o (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1542:930)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:77:818)
    at a (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:321:48)
    at e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:321:94)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:77:818)
    at S._receiveMessage (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:330:65)
    at S._socketDisposables.push._socketReader.onMessage.e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:327:243)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:77:818)
    at g.acceptChunk (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:323:801)
    at _register._socket.onData.e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:323:153)
    at Socket.t (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:332:235)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:279:12)
    at readableAddChunk (_stream_readable.js:264:11)
    at Socket.Readable.push (_stream_readable.js:219:10)
    at TCP.onread (net.js:636:20)
[2019-05-03 18:02:25.844] [renderer1] [error] Cannot read property 'extensions' of null: TypeError: Cannot read property 'extensions' of null
    at e.<anonymous> (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3850:751)
    at Generator.next (<anonymous>)
    at r (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:34:454)
    at process._tickCallback (internal/process/next_tick.js:68:7)
[2019-05-03 18:02:25.844] [renderer1] [error] Connection error: Unauthorized client refused.: Error: Connection error: Unauthorized client refused.
    at v (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1544:9)
    at t.onControlMessage.o (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1542:930)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:77:818)
    at a (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:321:48)
    at e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:321:94)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:77:818)
    at S._receiveMessage (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:330:65)
    at S._socketDisposables.push._socketReader.onMessage.e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:327:243)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:77:818)
    at g.acceptChunk (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:323:801)
    at _register._socket.onData.e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:323:153)
    at Socket.t (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:332:235)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:279:12)
    at readableAddChunk (_stream_readable.js:264:11)
    at Socket.Readable.push (_stream_readable.js:219:10)
    at TCP.onread (net.js:636:20)
[2019-05-03 18:02:28.207] [renderer1] [error] Could not fetch environment: Error: Could not fetch environment
    at d.getEnvironment.then.e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3813:413)

Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: Yes

@roblourens
Copy link
Member

@alexandrudima Unauthorized client refused comes from some kind of auth failure, what does that imply?

@wqfan You could try reinstalling by deleting the folder ~/.vscode-remote from the remote machine

@wqfan
Copy link
Author

wqfan commented May 4, 2019

@roblourens Thanks for your follow up on this issue. I have tried deleting that folder a few times and it doesn't make any difference.

@lars18th
Copy link

lars18th commented May 4, 2019

Hi,

Identical problem.
Futhermore in the "new" VSCode window (when connecting with "Connect to host in new window") in the Terminal after all I see:

Connected to SSH Host - Please do not close this terminal

But the same error
Failed to connect to the remote extension host server (Error: Connection error: Unauthorized client refused.)

This doesn't have sense!

@lars18th
Copy link

lars18th commented May 4, 2019

Debug info:

This is my .vscode-remote/.473af338e1bd9ad4d9853933da1cd9d5d9e07dc9.log:

Remote configuration data at /root/.vscode-remote


*
* Visual Studio Code Server
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license https://aka.ms/vscode-remote/license
*


Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/node_modules/spdlog/build/Release/spdlog.node)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:731:18)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at Module.patchedRequire [as require] (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
    at require (internal/modules/cjs/helpers.js:20:18)
    at bindings (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/node_modules/bindings/bindings.js:81:44)
    at Object.<anonymous> (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/node_modules/spdlog/index.js:3:35)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at Module.patchedRequire [as require] (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Function.i [as __$__nodeRequire] (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:31:542)
    at Object.t.createSpdLogService (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/agent/remoteExtensionHostAgent.js:213:301)
    at G.<anonymous> (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/agent/remoteExtensionHostAgent.js:363:833)
    at Generator.next (<anonymous>)
    at /root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/agent/remoteExtensionHostAgent.js:16:388
    at new Promise (<anonymous>)
    at r (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/agent/remoteExtensionHostAgent.js:16:165)
    at G._createServices (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/agent/remoteExtensionHostAgent.js:363:624)
    at Function.create (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/agent/remoteExtensionHostAgent.js:363:554)
    at T.<anonymous> (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/agent/remoteExtensionHostAgent.js:370:597)
    at Generator.next (<anonymous>)
    at /root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/agent/remoteExtensionHostAgent.js:16:388
    at new Promise (<anonymous>)
    at r (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/agent/remoteExtensionHostAgent.js:16:165)
    at T.start (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/agent/remoteExtensionHostAgent.js:370:516)
    at Object.<anonymous> (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/agent/remoteExtensionHostAgent.js:379:52)
    at Function.t._safeInvokeFunction (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:20:173)
    at Function.t._invokeFactory (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:20:420)
    at t.complete (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:20:657)
    at s._onModuleComplete (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:30:796)
    at s._onModuleComplete (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:31:41)
    at s._onModuleComplete (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:31:41)
    at s._onModuleComplete (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:31:41)
    at s._onModuleComplete (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:31:41)
    at s._onModuleComplete (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:31:41)
    at s._resolve (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:30:356)
    at s.defineModule (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:24:768)
    at r (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:28:919)
    at Object.l (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:36:405)
    at Function.t._safeInvokeFunction (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:20:173)
    at Function.t._invokeFactory (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:20:420)
    at t.complete (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:20:657)
    at s._onModuleComplete (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:30:796)
    at s._onModuleComplete (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:31:41)
    at s._resolve (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:30:356)
    at s.defineModule (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:24:768)
    at r (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:31:950)
    at f (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:17:524)
    at Object.<anonymous> (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/agent/remoteExtensionHostAgent.nls.js:4:1)
    at t._loadAndEvalScript (/root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:17:568)
    at /root/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/out/vs/loader.js:17:285
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:440:3)
IP Address: 192.168.1.142
Extension host agent listening on 56216
{ [Error: ENOENT: no such file or directory, scandir '/root/.vscode-remote/data/logs']
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: '/root/.vscode-remote/data/logs' }
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.

I hope it can be fixed soon. 😢

@u3u
Copy link

u3u commented May 4, 2019

The same problem.
When I remove the ~/.vscode-remote directory reconnect prompts the following error:

> cat: ~/.vscode-remote/.473af338e1bd9ad4d9853933da1cd9d5d9e07dc9.log: No such file or directory
> Server did not start successfully. Full server log:
> cat: ~/.vscode-remote/.473af338e1bd9ad4d9853933da1cd9d5d9e07dc9.log411693af-6a8f-4de5-9053-7abf6ae26efe====
> : 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

When I manually create the log file, connect the prompt again:
Could not establish connection to "server".

> Server did not start successfully. Full server log:
> 
> 127e184a-8aae-450a-9261-613691a553db====
"install" terminal command done
Received install output: 127e184a-8aae-450a-9261-613691a553db====
Failed to parse remote port from server output: 127e184a-8aae-450a-9261-613691a553db====

@kieferrm
Copy link
Member

kieferrm commented May 4, 2019

@wqfan it looks like you're running Amazon Linux Bare Metal release 2012.03. I'm guessing that's causing your issue. If possible, please try a Ubuntu 18.04.

@lars18th what server OS are you running.

@wqfan
Copy link
Author

wqfan commented May 4, 2019

@kieferrm It can be a problem of the OS. Does the remote extension only work with Ubuntu? Unfortunately, this is the only development server I have and I can't change the OS.

My ~/.vscode-remote/.473af338e1bd9ad4d9853933da1cd9d5d9e07dc9.log is a bit different from @lars18th:

Remote configuration data at /home/qingfanw/.vscode-remote


*
* Visual Studio Code Server
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license https://aka.ms/vscode-remote/license
*


IP Address: 172.22.135.15
Extension host agent listening on 38337
Unauthorized client refused.
Unauthorized client refused.

@wqfan
Copy link
Author

wqfan commented May 4, 2019

@u3u I think you shouldn't remove the folder directly.

Try the Remote SSH: Uninstall VS Code Server from Host... command and then reinstall it with Remote-SSH: Connect current window to host....

@khuongduybui
Copy link

@wqfan I am not sure it's the OS. I just tried a public AL2012 EC2 instance (not AL2) and it worked just fine. (Of course it's named 2018.03 but we all know it's AL2012.)

So the first thing I checked is sshd version.
AL2012: OpenSSH_7.4p1, OpenSSL 1.0.1k-fips 8 Jan 2015
AL2018: OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017

Are we screwed because our super-legacy dev desktops still use OpenSSL 1.0.1 for sshd?

@wqfan
Copy link
Author

wqfan commented May 4, 2019

@khuongduybui Thanks for your information. I have upgraded OpenSSL and been using OpenSSH:

$ openssl version                                                                                                                                    255 ↵
OpenSSL 1.0.2r  26 Feb 2019

$ sshd -V                                                                                                                                             1 ↵
OpenSSH_8.0p1, OpenSSL 1.0.2r  26 Feb 2019

The problem still exists.

@singerb
Copy link

singerb commented May 4, 2019

Same version `GLIBCXX_3.4.18' not found issue, same unable to connect (this is after replacing the realpath with readlink -f in server.sh to allow the server to start). strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC lists up to GLIBCXX_3.4.17, cat /etc/debian_version -> 7.9. Like many people, this is a sandbox environment and I don't have access to mess with the software on it. Perhaps a statically compiled node-spdlog would work?

@lars18th
Copy link

lars18th commented May 5, 2019

@lars18th what server OS are you running.

Debian 7 x64 sandbox. No other alternative.

Please, think on compile dependencies STATICALLY to resolve these problems.
Note too that I feel this issue is related to #84 .

@egamma egamma added the remote Issues in the code server support label May 6, 2019
@alexdima
Copy link
Member

alexdima commented May 6, 2019

@joaomoreno @sandy081

Would you know what we need to do to make node-spdlog work on these environments? See #103 (comment)

@lars18th
Copy link

lars18th commented May 6, 2019

@joaomoreno @sandy081

Would you know what we need to do to make node-spdlog work on these environments? See #103 (comment)

Sorry! I don't want to offend anyone. My objective is provide feedback and ideas. 😉

@iamatypeofwalrus
Copy link

Debug info:

This is my .vscode-remote/.473af338e1bd9ad4d9853933da1cd9d5d9e07dc9.log:

 ...

I hope it can be fixed soon. 😢

The spdlog issue seems different than the error op is seeing but manifests as the same unauthorized error. @lars18th can you create a separate issue for the spdlog issue you're seeing?

For what it's worth I'm seeing the exact same issue as op (not surprising given our mutual employer).

@alexdima
Copy link
Member

alexdima commented May 7, 2019

Can I download Amazon Linux Bare Metal release 2012.03 and run it locally in a VM to investigate what's going on ? i.e. how could I investigate?

@lars18th
Copy link

lars18th commented May 7, 2019

@lars18th can you create a separate issue for the spdlog issue you're seeing?

Hi @iamatypeofwalrus ,

Three comments:

  1. I'm testing on Debian 7 x64 (where the error of spdlog appears) and in a CHROOT environment with Debian 9.9 x64 (in this case the error log is different). However, in booth cases I get the same error Unauthorized client refused.
  2. As I commented before in another thread/issue every time the client can't connect over the tunnel, it prints the same in the log: Unauthorized client refused. The code really needs to be improved to distinguish the different causes.
  3. And as for the bug with Debian 9.9 I identified it with that the server closes a few seconds after the tunnel has been set up. But I don't know why, because the server log doesn't indicate anything.

Regards.

@azjps
Copy link

azjps commented May 7, 2019

Just for another data point, I encounter the same backtrace attempting to connect to a remote server running RHEL6:

$ grep -i error ~/.vscode-remote/.473af338e1bd9ad4d9853933da1cd9d5d9e07dc9.log 
Error: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by ~/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/node_modules/spdlog/build/Release/spdlog.node)

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.10 (Santiago)

The same issue presumably occurs with CentOS 6.10: https://github.com/microsoft/vscode/issues/73427.

@khuongduybui
Copy link

Can I download Amazon Linux Bare Metal release 2012.03 and run it locally in a VM to investigate what's going on ? i.e. how could I investigate?

Unfortunately I can't find the image to download anymore.
However, it's basically just RHEL5 modded to run with Kernel 4.9.

@dsych
Copy link

dsych commented May 8, 2019

Just for another data point, I encounter the same backtrace attempting to connect to a remote server running RHEL6:

$ grep -i error ~/.vscode-remote/.473af338e1bd9ad4d9853933da1cd9d5d9e07dc9.log 
Error: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by ~/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/node_modules/spdlog/build/Release/spdlog.node)

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.10 (Santiago)

The same issue presumably occurs with CentOS 6.10: microsoft/vscode#73427.

Just download a newer version of libstdc++ and add it to the LD_LIBRARY_PATH link

@achhabr1
Copy link

achhabr1 commented May 8, 2019

Getting the same issue with RHEL6

[ac043s@SDNAUTOS02 .vscode-remote]$ uname -a
Linux SDNAUTOS02 2.6.32-754.6.3.el6.x86_64 #1 SMP Tue Sep 18 10:29:08 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
[ac043s@SDNAUTOS02 .vscode-remote]$

[ac043s@SDNAUTOS02 .vscode-remote]$ grep -i error ~/.vscode-remote/.daf71423252a707b8e396e8afa8102b717f8213b.log
Error: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/node_modules/spdlog/build/Release/spdlog.node)
{ [Error: ENOENT: no such file or directory, scandir '/home/ac043s/.vscode-remote/data/logs']
[ac043s@SDNAUTOS02 .vscode-remote]$

Remote configuration data at /home/ac043s/.vscode-remote

Error: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/node_modules/spdlog/build/Release/spdlog.node)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:731:18)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
at Module.require (internal/modules/cjs/loader.js:650:17)
at Module.patchedRequire [as require] (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
at require (internal/modules/cjs/helpers.js:20:18)
at bindings (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/node_modules/bindings/bindings.js:81:44)
at Object. (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/node_modules/spdlog/index.js:3:35)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
at Module.require (internal/modules/cjs/loader.js:650:17)
at Module.patchedRequire [as require] (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
at require (internal/modules/cjs/helpers.js:20:18)
at Function.i [as __$__nodeRequire] (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:31:542)
at Object.t.createSpdLogService (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/agent/remoteExtensionHostAgent.js:213:301)
at G. (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/agent/remoteExtensionHostAgent.js:363:833)
at Generator.next ()
at /home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/agent/remoteExtensionHostAgent.js:16:388
at new Promise ()
at r (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/agent/remoteExtensionHostAgent.js:16:165)
at G._createServices (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/agent/remoteExtensionHostAgent.js:363:624)
at Function.create (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/agent/remoteExtensionHostAgent.js:363:554)
at T. (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/agent/remoteExtensionHostAgent.js:370:597)
at Generator.next ()
at /home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/agent/remoteExtensionHostAgent.js:16:388
at new Promise ()
at r (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/agent/remoteExtensionHostAgent.js:16:165)
at T.start (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/agent/remoteExtensionHostAgent.js:370:516)
at Object. (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/agent/remoteExtensionHostAgent.js:379:52)
at Function.t._safeInvokeFunction (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:20:173)
at Function.t._invokeFactory (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:20:420)
at t.complete (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:20:657)
at s._onModuleComplete (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:30:796)
at s._onModuleComplete (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:31:41)
at s._onModuleComplete (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:31:41)
at s._onModuleComplete (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:31:41)
at s._onModuleComplete (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:31:41)
at s._onModuleComplete (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:31:41)
at s._resolve (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:30:356)
at s.defineModule (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:24:768)
at r (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:28:919)
at Object.l (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:36:405)
at Function.t._safeInvokeFunction (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:20:173)
at Function.t._invokeFactory (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:20:420)
at t.complete (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:20:657)
at s._onModuleComplete (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:30:796)
at s._onModuleComplete (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:31:41)
at s._resolve (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:30:356)
at s.defineModule (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:24:768)
at r (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:31:950)
at f (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:17:524)
at Object. (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/agent/remoteExtensionHostAgent.nls.js:4:1)
at t._loadAndEvalScript (/home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:17:568)
at /home/ac043s/.vscode-remote/bin/daf71423252a707b8e396e8afa8102b717f8213b/out/vs/loader.js:17:285
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:440:3)
IP Address: 10.10.57.179
IP Address: 192.168.53.4
IP Address: 192.168.54.4
IP Address: 192.168.55.4
IP Address: 192.168.59.4
IP Address: 192.168.56.4
IP Address: 192.168.132.4
IP Address: 192.168.72.4
IP Address: 192.168.71.4
IP Address: 192.168.64.4
IP Address: 172.30.7.212
IP Address: 192.168.165.4
Extension host agent listening on 33377
{ [Error: ENOENT: no such file or directory, scandir '/home/ac043s/.vscode-remote/data/logs']
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/home/ac043s/.vscode-remote/data/logs' }
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.
Unauthorized client refused.

@MarkDHarris
Copy link

Did you modify anything to get this additional information in the log? I get this exact behavior but my log only contains (below the IP and visual studio code server banner):

Extension host agent listening on 45799
Unauthorized client refused.

and I get a new "Unauthorized client refused." entry every time I attempt to establish a connection.

I would like to enable additional diagnostics but have not found anything to help. (already enabled the remote.SSH.showLoginTerminal: true)

@lars18th
Copy link

Getting the same issue with RHEL6
....
Extension host agent listening on 33377
....
Unauthorized client refused.

Hi @achhabr1 ,
Read this: #84 (comment)
The cause is that the server is closed after it has started and it lists the listening port. However, no information about the cause it's printed at time.

@lars18th
Copy link

Hi,

Regarding this bug I discovered:

    yargs@~3.10.0:
    version "3.10.0"
    resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
    dependencies:
      camelcase "^1.0.2"
      cliui "^2.1.0"
      decamelize "^1.0.0"
      window-size "0.1.0"

Trace:
  Error: Command failed.
  Exit code: 1
  Command: sh
  Arguments: -c mocha --require coffeescript/register
  Directory: /src/qix-/node-is-arrayish
  Output:

      at ProcessTermError.MessageError (/Users/junon/.yarn/lib/cli.js:186:110)
      at new ProcessTermError (/Users/junon/.yarn/lib/cli.js:226:113)
      at ChildProcess.<anonymous> (/Users/junon/.yarn/lib/cli.js:30281:17)
      at ChildProcess.emit (events.js:127:13)
      at maybeClose (internal/child_process.js:933:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
  • But the origin of the problem can be an incorrect detection of the platform. The same log shows at start:
Arguments:
  /Users/junon/n/bin/node /Users/junon/.yarn/bin/yarn.js test

PATH:
  /Users/junon/.yarn/bin:/Users/junon/.config/yarn/global/node_modules/.bin:/Users/junon/perl5/bin:/Users/junon/google-cloud-sdk/bi
n:/usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/junon/bin:/Users/junon/.local/bin
:/src/.go/bin:/src/llvm/llvm/build/bin:/Users/junon/Library/Android/sdk/platform-tools:/Users/junon/n/bin:/usr/local/texlive/2017/b
in/x86_64-darwin/

Yarn version:
  1.5.1

Node version:
  9.6.1

Platform:
  darwin x64

-- Note the "Platform" value of darwin x64, as the real platform is Debian 9.9 x64.

  • Futhermore at the start of run the Remote-SSH plugin you can see this on the Output log:
> mesg: ttyname failed: Invalid argument
> 
> bash: cannot set terminal process group (3210): Invalid argument
> bash: no job control in this shell
> mesg: ttyname failed: Invalid argument

-- And note here the error about the detection of the tty.

So, here my conclusion:

  • The current code fails detecting the target platform.
  • I suggest to improve this detection, and printing a MORE CLEAR DATA ABOUT THE TARGET PLATFORM
    detected.
  • And in any case, provide a configuration tool to ENFORCE to use one specific platform, even if the detection scripts indicates a different one.

I feel a lot of errors are caused because this bug.
Regards.

@dtasev
Copy link

dtasev commented May 21, 2021

Another case where this error comes up, rather regularly, after updates for VSCode are installed.

It seems to happen when having >1 remote sessions going on, possibly simultaneously. For example, I remote SSH to SERVER from PC1 and PC2, where PC2 uses a forwarded port on PC1, to avoid having to join a specific internal network.

Maybe at some point VSCode gets confused and mislabels which session comes from where, but so far only PC1 goes into a state in which it is unable to get in. This seems to happen ONLY after PC2 upgrades VSCode locally, and presumably, the version server.

It seems that the server process for PC1 does not get properly restarted/killed when another remote SSH client updates the VSCode server, and so when trying to connect at a later point it is still running an earlier version of the VSCode server.

SSHing into SERVER and killing all live node vscode processes fixes the issue. I did not have to upgrade any libraries or reinstall VSCode, and throughout the whole process PC2 could always connect successfully.

It seems my case is rather rare, and possibly not relevant to the original reported issue. It doesn't help that "Unauthorized client refused" is way too generic and gets misreported in this issue (myself likely included) because there's 50 different ways of getting the error.

Perhaps it's worth changing the title to "Unauthorized client refused due to mismatching library versions / unsupported distro", as that seems to be the cause of OP's issue.

@iiwolf
Copy link

iiwolf commented Jun 25, 2021

This is happening to me daily now on different computers. Opening a VSCode instance on a remote server works fine, but opening up a workspace on a remote machine breaks. It's happened too and from both Ubuntu 18.04 and Centos 7. Restarting worked on Ubuntu, Centos 7 still isn't working killing all vscode instances or restarting.

@Chuxel Chuxel changed the title Failed to connect to the remote extension host server (Error: Connection error: Unauthorized client refused.) Failed to connect to the remote extension host server due to out of date libraries (e.g. older CentOS version) Jun 25, 2021
@Chuxel
Copy link
Member

Chuxel commented Jun 25, 2021

@iiwolf I'd suggest opening up a different issue on that. This issue is about out of date OS dependencies that VS Code cannot support because of a fundamental dependency Node (often really V8) brings. I updated the title to make that clear. The feature request is to either use all statically compiled libraries (which increases download sizes and thus we do not want to do) or allow alternate path for the libraries. Any support we would be able to add here would be unofficial given our dependencies could break in other ways. It's also worth noting that Remote - SSH does not support musl currently, so distros that use it or a mix like Void are unknowns.

@Chuxel Chuxel changed the title Failed to connect to the remote extension host server due to out of date libraries (e.g. older CentOS version) Failed to connect to the remote extension host server due to out of date libraries like glibc the extension cannot support (e.g. older CentOS version) Jun 25, 2021
@Chuxel Chuxel changed the title Failed to connect to the remote extension host server due to out of date libraries like glibc the extension cannot support (e.g. older CentOS version) Failed to connect to the remote extension host server due to unsupported, out of date libraries like glibc (e.g. older CentOS version) Jun 25, 2021
@lars18th
Copy link

Hi @Chuxel ,

The feature request is to either use all statically compiled libraries (which increases download sizes and thus we do not want to do) or allow alternate path for the libraries. Any support we would be able to add here would be unofficial given our dependencies could break in other ways.

Thank you for the response. However, please can you explain why allowing alternative path for the libraries could break something?

As I pointed before (years ago), the ONLY problem to run the remote extension in old servers is that the current implementation of the agent wants to use a recent version of Node and some system libraries. But this is only necessary to run the agent. So, installing the required Node version with the necessary libraries it could work. Where is then the problem with this simple solution?

Regards.

@anddam
Copy link

anddam commented Jun 28, 2021

This issue is about out of date OS dependencies that VS Code cannot support because of a fundamental dependency Node (often really V8) brings.

Is it?

I am (still) seeing the issue between two glibc Void systems, it's a rolling system and the packages are up-to-date.

If you can point me toward figuring what the actual failing part is, or what is the unfulfilled dependency it would be very helpful.

@lars18th
Copy link

Hi @anddam ,

This issue is about out of date OS dependencies that VS Code cannot support because of a fundamental dependency Node (often really V8) brings.

Is it?
I am (still) seeing the issue between two glibc Void systems, it's a rolling system and the packages are up-to-date.

Sorry if this sounds quite rude... but don't waste your time! The developers of the vscode-remote extension doesn't want to support any environment. I feel they want to enforce to use only recent versions of Linux. The agent doesn't run in some systems only because it wants to use an specific version of the Node and it requires to be the regular node and linked to system libraries. As discussed some time ago, it is possible to hack the agent to run within an alternative environment.

I hope at some time the developers will add the option to use and specific path for the Node runtime (like node-runtime: /opt/local/node-v8-vscode/node), and this will solve the problem in one shot.

Regards.

@Chuxel
Copy link
Member

Chuxel commented Jun 28, 2021

@anddam The minimum requirements are explained here: https://code.visualstudio.com/docs/remote/linux

We have a set of Linux distributions we focus on listed in the document. Mileage may vary outside of it given the sheer variability on what each Linux distribution can contain. Beyond node, node modules can include native code, so its possible something else could be going on.

To be clear, this error can also happen if you are not using an official VS Code release. We sometimes see packages marked as VS Code that are actually Code - OSS or something else, rather than an official distribution. This could also be causing a problem and isn't related to OS requirements.

We left this issue open so people could compare notes rather than just locking the conversation. We're always appreciative of tips and would be happy to accept PRs to the vscode-docs repo with workarounds folks have found that work for distributions that the team is not directly focusing on at the moment. There's a "tips by distribution" section we setup with exactly this in mind.

@ajay-ib
Copy link

ajay-ib commented Jun 29, 2021

Hi,
I'm using a very old Fedora-12 machine and I see this error, I can neither upgrade my machine nor I like to work on terminal. I can get inside the machine via SSH, but I cannot install node. It would be of great help, if we get a support from VScode side.

@lars18th
Copy link

Hi @anddam ,

@anddam The minimum requirements are explained here: https://code.visualstudio.com/docs/remote/linux

[…]

I really appreciate your comment. And please believe me when I say that I want to be positive. My aim is to present my point of view with due respect to all the developers of this great tool.

That said, I suggest you to do this simple test:

  • Select two Linux servers, one listed in the supported environments and the other has to be an old and legacy (so not supported). Check that the second is ABI and binary compatible with the first.
  • Mount with root privileges the root of the first system in the /mnt/altroot/ path of the second one.
  • Try to execute one static binary in the second system (the ancient environment not supported) from some subdirectory (i.e /mnt/altroot/bin/which). If this test executes without errors then continue…

The real test is this:

  • As you can recompile the VS Remote Extension AGENT, patch the source code to support an alternative path of the node binary.
  • Next, recompile from scratch the node runtime in the first system without using the system libraries.
  • Finally, execute the recompiled node binary in the second system.
  • And then try to use this custom node binary with the VS Remote Extension Agent when you connect to the second and unsupported system. Is the agent now working?

If the answer is yes, then why not support this?
The key question that I want to point is that the only problem is the node version, and not the libraries required to run node. But the current implementation is not supporting the use of an alternative node binary. So if the user provides an alternative and supported version of node then the agent could run without problems.

Regads.

@youralmight
Copy link

I found a solution to jump over this problem, which is to build code-server from termux and run it manually. Morrison Chang discovered it and wrote a guide on dev.to. And it works for me.

@lars18th
Copy link

lars18th commented Jul 7, 2021

Hi @youralmight ,

I found a solution to jump over this problem, which is to build code-server from termux and run it manually. Morrison Chang discovered it and wrote a guide on dev.to. And it works for me.

This an interesting workaround. But it's based on changing the VS Code with the code-server. Then it's not possible to use the Remote Extension (see: https://github.com/cdr/code-server/blob/v3.5.0/doc/FAQ.md#differences-compared-to-vs-code). In fact, what we want is to develop (compile/debug) in some target Linux environments that are not supported because they're consired old by Microsoft (even they could be compatible). Perhaps at some time a new opensource alternative of the plugin will appear: coder/code-server#1315.

Regards.

@szmarczak
Copy link

I'm having glibc-2.33 installed and still getting Error: Connection error: Unauthorized client refused

@tbenst
Copy link

tbenst commented Aug 30, 2021

@Chuxel thank you so much for your work,remote-ssh has been the single most game changing tool for me as a developer/scientist in the last five years. I spend many hours a day using the extension, and I’m super grateful :).

Would you/the devs be willing to discuss adopting the solution in #103 (comment)? That implementation, of using the local node if it matches the required version, and defaulting to the current behavior of downloading if it does not, would solve 99% of the issues in this thread, dramatically improve using the number of distributions supported, all while minimally impacting support surface.

The challenge with the solution is most people on this thread have not adopted it, as it requires patching this extension after every update. This isn’t hard to do as the source code is “just javascript.”

@jspraul
Copy link

jspraul commented Sep 6, 2021

VSCode (Insiders) runs on older distros (again?) as of Aug. 9 2021, because they could afford to statically link libstdc++:

microsoft/vscode#129360

use the libcxx library from chromium and statically link it to our native modules. Advantage of this approach is that the runtime and native modules use the same libcxx library. The increase in bundle size is significantly small (~10MB). Currently we only do this on linux.

I encountered this VSCode Remote - SSH "GLIBCXX_3.4.20' not found (required by [...]/node_modules/spdlog" issue on Oracle-Linux-7.9-aarch64 (ARM on the Oracle Cloud free tier). The solution is to put a newer version of libstdc++ earlier on the share library / dynamic loader path. I found the package to install by choosing the most recent version returned by yum whatprovides *libstdc++.so.6 then running repoquery -l oracle-armtoolset-8-libstdc++ | grep libstdc++.so to find the path to the file:

sudo yum install oracle-armtoolset-8-libstdc++
echo ' 
export LD_LIBRARY_PATH=/opt/oracle/oracle-armtoolset-8/root/usr/lib64:$LD_LIBRARY_PATH
' >> ~/.bashrc

Others have obtained libstdc++.so.6 for CentOS7 arch x86_64 by grabbing it from anaconda3, using Ghettoforge, or building from source.

As far as I can tell, node-spdlog instantiates the header-only spdlog, which is tested all the way back to GCC 4.8.1. It might be worth changing the node-spdlog build to specify an old compiler version for maximum compatibility, e.g. GCC 4.8.3 / GLIBCXX_3.4.19 (I'm not sure that's right).

@nom3ad
Copy link

nom3ad commented Oct 13, 2021

Thanks for the workaround @jspraul. I was facing the same issue on Oracle Cloud "Oracle Linux Server 7.9" ARM machine.
For some reason, updating '~/.bashrc' wasn't working for me. So I had to patch ~/.vscode-server/bin/<some-uuid>/server.sh, by putting export LD_LIBRARY_PATH=/opt/oracle/oracle-armtoolset-8/root/usr/lib64:$LD_LIBRARY_PATH as the first line.

@keithy
Copy link

keithy commented Mar 7, 2022

For NixOs added this to my configuration, providing a script that links to a working local node version.

{ config, pkgs, ... }:

let
  fix_node_server = pkgs.writeScriptBin "fix_node_server" ''
      #! /usr/bin/env bash

      set u+
      for node in "$HOME"/.vscode-server/bin/*/node
      do
        if "$node" --version; then
          echo "Node is working"
        else
          echo "Needs fixing..."
          mv "$node" "$node.backup"
          ln -s "/run/current-system/sw/bin/node" "$node"
          if "$node" --version; then
            echo  "Fixed: Node is now working"
          fi
        fi
      done
  '';

in
{
  environment.systemPackages = [ 
    pkgs.nodejs-14_x 
    fix_node_server
  ];
}

@quanvuong
Copy link

+1, I'm having this issue when using VSCode to connect to a running pod in a Kubernetes cluster.

This is the output of executing code --version on the cmdline:

1.66.0
e18005f0f1b33c29e81d732535d8c0e47cafb0b5
x64

@daniel-scheliga
Copy link

+1, Same here.
Version: 1.66.0 (Universal)
Commit: e18005f0f1b33c29e81d732535d8c0e47cafb0b5

ERR Connection error: Unauthorized client refused: auth mismatch: Error: Connection error: Unauthorized client refused: auth mismatch
    at V (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:616:55705)
    at vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:616:43257
    at S.invoke (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:67:145)
    at s.fire (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:67:1856)
    at u.fire (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:83:19607)
    at g._receiveMessage (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:83:24238)
    at vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:83:21722
    at S.invoke (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:67:145)
    at s.fire (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:67:1856)
    at s.acceptChunk (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:83:16438)
    at vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:83:15568
    at vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:616:40443
    at S.invoke (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:67:145)
    at s.fire (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:67:1856)
    at FileReader._fileReader.onload (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:616:38374)

@gatheluck
Copy link

gatheluck commented Apr 8, 2022

+1, my colleague who are using vscode with this extension sent report and he cannot connect to a running pod in a Kubernetes cluster from 3days before.

code --version result:
1.66.0
e18005f0f1b33c29e81d732535d8c0e47cafb0b5
x64

Are there any way to avoid this?

@daniel-scheliga
Copy link

@quanvuong @gatheluck Downgrading the Remote - Containers Extension to v0.224.3 solved the issue for me.

@lnicola
Copy link

lnicola commented Apr 8, 2022

CC microsoft/vscode#146390

@gatheluck
Copy link

@quanvuong @gatheluck Downgrading the Remote - Containers Extension to v0.224.3 solved the issue for me.

@daniel-scheliga
This also worked for my colleague! Thank you so much!

@lnicola
Also thank you for your info!

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 linux Issue on Linux plan-review PM-highlighted item determined to be P1 or P2 remote Issues in the code server support remote-environment Issues with the remote server's environment rhel/centos
Projects
None yet