Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Failed to get DISPLAY: Error: Running the contributed command: 'remote-x11-ssh.connect' failed. #51

Open
seyeeet opened this issue Apr 23, 2021 · 4 comments

Comments

@seyeeet
Copy link

seyeeet commented Apr 23, 2021

I am on windows and server is Ubuntu. Im trying to do X11 forwarding in the vscode but I keep getting errors and it is not working.
I installed the Remote X11 but it keeps giving me the error that

Failed to get DISPLAY: Error: Running the contributed command: 'remote-x11-ssh.connect' failed.
@joelspadin
Copy link
Owner

Please see #50. If that doesn't work for you, please check the output window dropdown for "Remote X11" and "Remove X11: SSH" to get logs for the error.

@seyeeet
Copy link
Author

seyeeet commented Apr 23, 2021

@joelspadin
Thanks for your reply,
I checked it, but I am still receiving the same error.
Here is what I am doing, and I appreciate your input and feed back.
on windows I have my ~\.ssh\config
to include

Host *
    ForwardAgent yes
    ForwardX11 yes
    ForwardX11Trusted yes

I then connect to server via ssh via ssh [email protected] then I open the vscode on windows and connect to the ubuntu via Remote-SSH Connect-to Host...
I have both Remove X11: SSH and Remove X11 enable.

can you please let me know how I can check the output window dropdown for "Remote X11" and "Remove X11: SSH" to get logs for the error.?

I still get Failed to get DISPLAY: Error: Running the contributed command: 'remote-x11-ssh.connect' failed.
in the output in the log extension host I have this information:

[2021-04-22 23:15:35.309] [exthost] [info] extension host started
[2021-04-22 23:15:35.345] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-ssh {"startup":false,"extensionId":{"value":"ms-vscode-remote.remote-ssh","_lower":"ms-vscode-remote.remote-ssh"},"activationEvent":"onResolveRemoteAuthority:ssh-remote"}
[2021-04-22 23:15:35.346] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/seyeeet/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.4/out/extension
[2021-04-22 23:15:52.631] [exthost] [info] eager extensions activated
[2021-04-22 23:15:52.851] [exthost] [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication {"startup":false,"extensionId":{"value":"vscode.microsoft-authentication","_lower":"vscode.microsoft-authentication"},"activationEvent":"onAuthenticationRequest:microsoft"}
[2021-04-22 23:15:52.851] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Program Files/Microsoft VS Code/resources/app/extensions/microsoft-authentication/dist/extension.js
[2021-04-22 23:15:52.886] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-wsl {"startup":false,"extensionId":{"value":"ms-vscode-remote.remote-wsl","_lower":"ms-vscode-remote.remote-wsl"},"activationEvent":"onStartupFinished"}
[2021-04-22 23:15:52.886] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/seyeeet/.vscode/extensions/ms-vscode-remote.remote-wsl-0.54.6/dist/extension
[2021-04-22 23:15:54.040] [exthost] [info] ExtensionService#_doActivateExtension vscode.github-authentication {"startup":false,"extensionId":{"value":"vscode.github-authentication","_lower":"vscode.github-authentication"},"activationEvent":"onAuthenticationRequest:github"}
[2021-04-22 23:15:54.041] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Program Files/Microsoft VS Code/resources/app/extensions/github-authentication/dist/extension.js
[2021-04-22 23:15:54.606] [exthost] [info] ExtensionService#_doActivateExtension spadin.remote-x11-ssh {"startup":false,"extensionId":{"value":"spadin.remote-x11-ssh","_lower":"spadin.remote-x11-ssh"},"activationEvent":"onCommand:remote-x11-ssh.connect"}
[2021-04-22 23:15:54.606] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/seyeeet/.vscode/extensions/spadin.remote-x11-ssh-1.5.0/dist/extension.js
[2021-04-22 23:15:59.393] [exthost] [error] Error: connect ECONNREFUSED 10.141.0.3:22
	at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) remote-x11-ssh.connect
[2021-04-22 23:19:07.256] [exthost] [info] extension host terminating: received terminate message from renderer
[2021-04-22 23:19:08.262] [exthost] [info] exiting with code 0
[2021-04-22 23:19:11.484] [exthost] [info] extension host started
[2021-04-22 23:19:11.610] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-ssh {"startup":false,"extensionId":{"value":"ms-vscode-remote.remote-ssh","_lower":"ms-vscode-remote.remote-ssh"},"activationEvent":"onResolveRemoteAuthority:ssh-remote"}
[2021-04-22 23:19:11.610] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/seyeeet/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.4/out/extension
[2021-04-22 23:19:26.815] [exthost] [info] eager extensions activated
[2021-04-22 23:19:27.074] [exthost] [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication {"startup":false,"extensionId":{"value":"vscode.microsoft-authentication","_lower":"vscode.microsoft-authentication"},"activationEvent":"onAuthenticationRequest:microsoft"}
[2021-04-22 23:19:27.074] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Program Files/Microsoft VS Code/resources/app/extensions/microsoft-authentication/dist/extension.js
[2021-04-22 23:19:27.103] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-wsl {"startup":false,"extensionId":{"value":"ms-vscode-remote.remote-wsl","_lower":"ms-vscode-remote.remote-wsl"},"activationEvent":"onStartupFinished"}
[2021-04-22 23:19:27.103] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/seyeeet/.vscode/extensions/ms-vscode-remote.remote-wsl-0.54.6/dist/extension
[2021-04-22 23:19:28.540] [exthost] [info] ExtensionService#_doActivateExtension vscode.github-authentication {"startup":false,"extensionId":{"value":"vscode.github-authentication","_lower":"vscode.github-authentication"},"activationEvent":"onAuthenticationRequest:github"}
[2021-04-22 23:19:28.540] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Program Files/Microsoft VS Code/resources/app/extensions/github-authentication/dist/extension.js
[2021-04-22 23:19:29.029] [exthost] [info] ExtensionService#_doActivateExtension spadin.remote-x11-ssh {"startup":false,"extensionId":{"value":"spadin.remote-x11-ssh","_lower":"spadin.remote-x11-ssh"},"activationEvent":"onCommand:remote-x11-ssh.connect"}
[2021-04-22 23:19:29.029] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/seyeeet/.vscode/extensions/spadin.remote-x11-ssh-1.5.0/dist/extension.js
[2021-04-22 23:19:32.581] [exthost] [error] Error: connect ECONNREFUSED 10.141.0.3:22
	at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) remote-x11-ssh.connect

on the log of window I have:

[2021-04-22 23:15:43.196] [renderer1] [warning] Workbench did not finish loading in 10 seconds, that might be a problem that should be reported.
[2021-04-22 23:15:56.120] [renderer1] [error] Error: [File Watcher (chokidar)] Inotify limit reached (ENOSPC)
[2021-04-22 23:17:58.211] [renderer1] [error] read ECONNRESET: Error: read ECONNRESET
	at TCP.onStreamRead (internal/stream_base_commons.js:205:27)
[2021-04-22 23:19:19.169] [renderer1] [warning] Workbench did not finish loading in 10 seconds, that might be a problem that should be reported.
[2021-04-22 23:19:30.022] [renderer1] [error] Error: [File Watcher (chokidar)] Inotify limit reached (ENOSPC)
[2021-04-22 23:21:32.016] [renderer1] [error] read ECONNRESET: Error: read ECONNRESET
	at TCP.onStreamRead (internal/stream_base_commons.js:205:27)

and on the log of Remote Server I have:

[2021-04-22 20:15:50.498] [remoteagent] [info] Got delay-shutdown request while in shutdown timeout, delaying
[2021-04-22 20:15:50.498] [remoteagent] [info] Cancelling previous shutdown timeout
[2021-04-22 20:15:51.175] [remoteagent] [info] [127.0.0.1][b5a52cd1][ManagementConnection] New connection established.
[2021-04-22 20:15:51.675] [remoteagent] [info] [127.0.0.1][0d813f67][ExtensionHostConnection] New connection established.
[2021-04-22 20:15:51.695] [remoteagent] [info] [127.0.0.1][0d813f67][ExtensionHostConnection] <18379> Launched Extension Host Process.
[2021-04-22 20:15:56.108] [remoteagent] [error] [File Watcher (chokidar)] Inotify limit reached (ENOSPC)
[2021-04-22 20:19:03.881] [remoteagent] [info] Uninstalling extension: visualstudioexptteam.vscodeintellicode
[2021-04-22 20:19:03.898] [remoteagent] [info] Successfully uninstalled extension: visualstudioexptteam.vscodeintellicode
[2021-04-22 20:19:07.338] [remoteagent] [info] [127.0.0.1][b5a52cd1][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[2021-04-22 20:19:08.420] [remoteagent] [info] [127.0.0.1][0d813f67][ExtensionHostConnection] <18379> Extension Host Process exited with code: 0, signal: null.
[2021-04-22 20:19:08.421] [remoteagent] [info] Cancelling previous shutdown timeout
[2021-04-22 20:19:08.421] [remoteagent] [info] Last EH closed, waiting before shutting down
[2021-04-22 20:19:24.327] [remoteagent] [info] Got delay-shutdown request while in shutdown timeout, delaying
[2021-04-22 20:19:24.328] [remoteagent] [info] Cancelling previous shutdown timeout
[2021-04-22 20:19:25.032] [remoteagent] [info] [127.0.0.1][5d590d17][ManagementConnection] New connection established.
[2021-04-22 20:19:25.517] [remoteagent] [info] [127.0.0.1][1c1bf877][ExtensionHostConnection] New connection established.
[2021-04-22 20:19:25.534] [remoteagent] [info] [127.0.0.1][1c1bf877][ExtensionHostConnection] <19834> Launched Extension Host Process.
[2021-04-22 20:19:29.961] [remoteagent] [error] [File Watcher (chokidar)] Inotify limit reached (ENOSPC)

II am not sure if I should also change anything here or not:
image

image

update:
adding export DISPLAY=localhost:0.0 to bashrc and "terminal.integrated.env.linux": {"DISPLAY":"localhost:0.0"}, to the vscode json setting did not help aslo

@yjianzhu
Copy link

yjianzhu commented Jul 7, 2021

same error. have you fixed it?

Thx!

@joelspadin
Copy link
Owner

As noted at #50, Microsoft's remote SSH extension now supports X11 forwarding, so I do not plan to continue working on the SSH part of this extension. I suggest you disable my extension and check if the built-in X11 forwarding works for you. If it does not, use https://github.com/microsoft/vscode-remote-release/issues to report the problem to Microsoft.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants