Skip to content

Remote-SSH doesn't start /bin/bash #2579

Closed

Description

@vhood

Issue Type: Bug

Integrated terminal is just Starting... and it doesn't start.
Option "terminal.integrated.inheritEnv": false doesn't help.

settings.json
{
    "indentRainbow.colors": [
        "rgba(255,255,255,0.00)",
        "rgba(255,255,255,0.02)",
        "rgba(255,255,255,0.04)",
        "rgba(255,255,255,0.02)",
    ],
    "bracket-pair-colorizer-2.colors": [
        "#dcdcdc",
        "#bbbbbb"
    ],
    "[css]": {
        "editor.tabSize": 2
    },
    "[styl]": {
        "editor.tabSize": 2
    },
    "[json]": {
        "editor.tabSize": 2
    },
    "sync.gist": " some hash ",
    "workbench.iconTheme": "vscode-simpler-icons",
    "terminal.integrated.shell.windows": "${env:PathToBASH}",
    "editor.minimap.enabled": false,
    "editor.snippetSuggestions": "top",
    "editor.colorDecorators": false,
    "editor.renderWhitespace": "none",
    "editor.renderControlCharacters": false,
    "terminal.integrated.copyOnSelection": true,
    "window.restoreWindows": "none",
    "javascript.format.enable": false,
    "terminal.integrated.rendererType": "dom",
    "workbench.colorTheme": "Dark Turquoise ~ Rainbow",
    "extensions.ignoreRecommendations": false,
    "files.enableTrash": false,
    "telemetry.enableTelemetry": false,
    "explorer.autoReveal": false,
    "php-docblocker.returnGap": true,
    "terminal.integrated.commandsToSkipShell": [
        "-workbench.action.showCommands",
        "-workbench.action.terminal.findNext",
        "-workbench.action.debug.start",
        "-workbench.action.toggleFullScreen",
    ],
    "terminal.integrated.inheritEnv": false,
    "terminal.integrated.shell.linux": "/bin/bash",
    "composer.executablePath": "${env:PathToCOMPOSER}",
    "remote.SSH.useLocalServer": false,
    "remote.SSH.showLoginTerminal": true
}
connection logs
d88f8e9efcd0: running
Acquiring lock on /root/.vscode-server/bin/fe22a9645b44368865c0ba92e2fb881ff1afc
e94/vscode-remote-lock.root.fe22a9645b44368865c0ba92e2fb881ff1afce94
\ln /root/.vscode-server/bin/fe22a9645b44368865c0ba92e2fb881ff1afce94/vscode-rem
ote-lock.root.fe22a9645b44368865c0ba92e2fb881ff1afce94.target /root/.vscode-serv
er/bin/fe22a9645b44368865c0ba92e2fb881ff1afce94/vscode-remote-lock.root.fe22a964
5b44368865c0ba92e2fb881ff1afce94
Found existing installation at /root/.vscode-server/bin/fe22a9645b44368865c0ba92
e2fb881ff1afce94...
Found running server...

*
* Reminder: You may only use this software with Visual Studio family products,
\ln /root/.vscode-server/bin/fe22a9645b44368865c0ba92e2fb881ff1afce94/vscode-remote-lock.root.fe22a9645b44368865c0ba92e2fb881ff1afce94.target /root/.vscode-server/bin/fe22a9645b44368865c0ba92e2fb881ff1afce94/vscode-remote-lock.root.fe22a9645b44368865c0ba92e2fb881ff1afce94
Found existing installation at /root/.vscode-server/bin/fe22a9645b44368865c0ba92e2fb881ff1afce94...
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)
*

Checking server status on port 36181 with wget
d88f8e9efcd0: start
sshAuthSock====
agentPort==36181==
osReleaseId==centos==
arch==x86_64==
webUiAccessToken====
tmpDir==/run/user/0==
platform==linux==
d88f8e9efcd0: end

I can connect to the server with Windows git bash ssh [email protected]
Linux bash is executable

file /bin/bash  
/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=7e644dee920bc3ba797c38e05383286563712b49, stripped

Extension version: 0.50.0
VS Code version: Code 1.43.1 (fe22a9645b44368865c0ba92e2fb881ff1afce94, 2020-03-18T07:01:20.184Z)
OS version: Windows_NT x64 10.0.17763
Remote OS version: Linux x64 3.10.0-1062.9.1.el7.x86_64

System Info
Item Value
CPUs Intel(R) Pentium(R) CPU G3460 @ 3.50GHz (2 x 3500)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: disabled_off
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 3.87GB (0.40GB free)
Process Argv
Screen Reader no
VM 0%
Item Value
Remote SSH: 10.0.210.213
OS Linux x64 3.10.0-1062.9.1.el7.x86_64
CPUs Intel(R) Xeon(R) CPU X5680 @ 3.33GHz (4 x 3325)
Memory (System) 7.64GB (4.65GB free)
VM 100%

Activity

  1. roblourens commented on Mar 19, 2020

    @roblourens
    Member

    I don't see anything wrong from this info, can you open files in this window?

    If not, can you share the log from the Remote-SSH output channel?

  2. added
    info-needed
    on Mar 19, 2020
  3. vhood commented on Mar 21, 2020

    @vhood
    Author

    I can do anything in explorer and I can edit files, save them, remove them etc.
    My terminal is always "Starting..." and it doesn't respond.

    output channel ssh logs
    [08:58:51.503] Log Level: 2
    [08:58:51.504] [email protected]
    [08:58:51.504] win32 x64
    [08:58:51.506] SSH Resolver called for "ssh-remote+10.0.210.213", attempt 1
    [08:58:51.506] SSH Resolver called for host: 10.0.210.213
    [08:58:51.506] Setting up SSH remote "10.0.210.213"
    [08:58:51.523] Using commit id "fe22a9645b44368865c0ba92e2fb881ff1afce94" and quality "stable" for server
    [08:58:51.524] Install and start server if needed
    [08:58:51.527] Checking ssh with "ssh -V"
    [08:58:51.761] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
    [08:58:51.762] Running script with connection command: ssh -T -D 7427 10.0.210.213 bash
    [08:58:51.773] Terminal shell path: C:\Windows\System32\cmd.exe
    [08:58:52.806] > 
    [08:58:52.806] Got some output, clearing connection timeout
    [08:58:54.617] > b7637631ee26: running
    > Acquiring lock on /root/.vscode-server/bin/fe22a9645b44368865c0ba92e2fb881ff1afce94/vscode-remote-lock.root.fe22a9645b44368865c0ba92e2fb881ff1afce94
    > \ln /root/.vscode-server/bin/fe22a9645b44368865c0ba92e2fb881ff1afce94/vscode-remote-lock.root.fe22a9645b44368865c0ba92e2fb881ff1afce94.target /root/.vscode-server/bin/fe22a9645b44368865c0ba92e2fb881ff1
    > afce94/vscode-remote-lock.root.fe22a9645b44368865c0ba92e2fb881ff1afce94
    > Found existing installation at /root/.vscode-server/bin/fe22a9645b44368865c0ba92e2fb881ff1afce94...
    > XDG_SESSION_ID=65888
    > SHELL=/bin/bash
    > SSH_CLIENT=10.0.210.120 7429 22
    > USER=root
    > VSCODE_AGENT_FOLDER=/root/.vscode-server
    > PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
    > MAIL=/var/mail/root
    > PWD=/root
    > LANG=en_GB.UTF-8
    > HOME=/root
    > SHLVL=2
    > LOGNAME=root
    > SSH_CONNECTION=10.0.210.120 7429 10.0.210.213 22
    > LESSOPEN=||/usr/bin/lesspipe.sh %s
    > XDG_RUNTIME_DIR=/run/user/0
    > _=/usr/bin/printenv
    > Starting server with command... /root/.vscode-server/bin/fe22a9645b44368865c0ba92e2fb881ff1afce94/server.sh --host=127.0.0.1 --enable-remote-auto-shutdown --disable-telemetry --port=0 &> "/root/.vscode
    > -server/.fe22a9645b44368865c0ba92e2fb881ff1afce94.log" < /dev/null
    > Waiting for server log...
    > 
    [08:58:55.086] > Waiting for server log...
    > 
    [08:58:55.618] > Waiting for server log...
    > 
    [08:58:56.120] > 
    > *
    > * Reminder: You may only use this software with Visual Studio family products,
    > * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
    > *
    > 
    > b7637631ee26: start
    > sshAuthSock====
    > agentPort==40602==
    > osReleaseId==centos==
    > arch==x86_64==
    > webUiAccessToken====
    > tmpDir==/run/user/0==
    > platform==linux==
    > b7637631ee26: end
    > 
    [08:58:56.120] Received install output: 
    sshAuthSock====
    agentPort==40602==
    osReleaseId==centos==
    arch==x86_64==
    webUiAccessToken====
    tmpDir==/run/user/0==
    platform==linux==
    
    [08:58:56.121] Remote server is listening on port 40602
    [08:58:56.121] Parsed server configuration: {"agentPort":40602,"osReleaseId":"centos","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","tmpDir":"/run/user/0","platform":"linux"}
    [08:58:56.123] Starting forwarding server. localPort 7430 -> socksPort 7427 -> remotePort 40602
    [08:58:56.125] Forwarding server listening on 7430
    [08:58:56.125] Waiting for ssh tunnel to be ready
    [08:58:56.127] Tunneled remote port 40602 to local port 7430
    [08:58:56.127] Resolved "ssh-remote+10.0.210.213" to "127.0.0.1:7430"
    [08:58:56.129] [Forwarding server 7430] Got connection 0
    [08:58:56.133] ------
    
    
    
    
    [08:58:56.151] [Forwarding server 7430] Got connection 1
    [08:58:56.152] [Forwarding server 7430] Got connection 2
    [08:58:57.028] [Forwarding server 7430] Got connection 3
    [08:58:57.034] [Forwarding server 7430] Got connection 4
    [08:59:21.301] [Forwarding server 7430] Got connection 5
    [08:59:46.319] [Forwarding server 7430] Got connection 6
    [09:00:11.405] [Forwarding server 7430] Got connection 7
    [09:00:36.457] [Forwarding server 7430] Got connection 8
    [09:01:01.484] [Forwarding server 7430] Got connection 9
    [09:01:56.158] > 
    [09:04:56.120] > 
    
    window logs
    [2020-03-20 08:59:16.295] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
    [2020-03-20 08:59:16.296] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] waiting for 5 seconds before reconnecting...
    [2020-03-20 08:59:18.289] [renderer3] [error] Error: [File Watcher (chokidar)] Inotify limit reached (ENOSPC)
    [2020-03-20 08:59:21.297] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] resolving connection...
    [2020-03-20 08:59:21.297] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] connecting to 127.0.0.1:7430...
    [2020-03-20 08:59:21.312] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] reconnected!
    [2020-03-20 08:59:41.316] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
    [2020-03-20 08:59:41.316] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] waiting for 5 seconds before reconnecting...
    [2020-03-20 08:59:46.316] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] resolving connection...
    [2020-03-20 08:59:46.316] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] connecting to 127.0.0.1:7430...
    [2020-03-20 08:59:46.382] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] reconnected!
    [2020-03-20 09:00:06.394] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
    [2020-03-20 09:00:06.395] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] waiting for 5 seconds before reconnecting...
    [2020-03-20 09:00:11.401] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] resolving connection...
    [2020-03-20 09:00:11.401] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] connecting to 127.0.0.1:7430...
    [2020-03-20 09:00:11.436] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] reconnected!
    [2020-03-20 09:00:31.443] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
    [2020-03-20 09:00:31.444] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] waiting for 5 seconds before reconnecting...
    [2020-03-20 09:00:36.452] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] resolving connection...
    [2020-03-20 09:00:36.453] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] connecting to 127.0.0.1:7430...
    [2020-03-20 09:00:36.477] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] reconnected!
    [2020-03-20 09:00:56.478] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
    [2020-03-20 09:00:56.478] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] waiting for 5 seconds before reconnecting...
    [2020-03-20 09:01:01.479] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] resolving connection...
    [2020-03-20 09:01:01.479] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] connecting to 127.0.0.1:7430...
    [2020-03-20 09:01:01.500] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] reconnected!
    [2020-03-20 09:01:02.081] [renderer3] [error] read ECONNRESET: Error: read ECONNRESET
    	at TCP.onStreamRead (internal/stream_base_commons.js:183:27)
    [2020-03-20 09:01:21.304] [renderer3] [error] read ECONNRESET: Error: read ECONNRESET
    	at TCP.onStreamRead (internal/stream_base_commons.js:183:27)
    [2020-03-20 09:01:21.505] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
    [2020-03-20 09:01:21.506] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] waiting for 5 seconds before reconnecting...
    [2020-03-20 09:01:26.516] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] resolving connection...
    [2020-03-20 09:01:26.516] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] connecting to 127.0.0.1:7430...
    [2020-03-20 09:01:26.534] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] reconnected!
    [2020-03-20 09:01:46.327] [renderer3] [error] read ECONNRESET: Error: read ECONNRESET
    	at TCP.onStreamRead (internal/stream_base_commons.js:183:27)
    [2020-03-20 09:01:46.543] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
    [2020-03-20 09:01:46.544] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] waiting for 5 seconds before reconnecting...
    [2020-03-20 09:01:51.545] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] resolving connection...
    [2020-03-20 09:01:51.546] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] connecting to 127.0.0.1:7430...
    [2020-03-20 09:01:51.562] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] reconnected!
    [2020-03-20 09:02:11.421] [renderer3] [error] read ECONNRESET: Error: read ECONNRESET
    	at TCP.onStreamRead (internal/stream_base_commons.js:183:27)
    [2020-03-20 09:02:11.566] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
    [2020-03-20 09:02:11.566] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] waiting for 5 seconds before reconnecting...
    [2020-03-20 09:02:16.568] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] resolving connection...
    [2020-03-20 09:02:16.568] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] connecting to 127.0.0.1:7430...
    [2020-03-20 09:02:16.580] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] reconnected!
    [2020-03-20 09:02:36.471] [renderer3] [error] read ECONNRESET: Error: read ECONNRESET
    	at TCP.onStreamRead (internal/stream_base_commons.js:183:27)
    [2020-03-20 09:02:36.594] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
    [2020-03-20 09:02:36.595] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] waiting for 5 seconds before reconnecting...
    [2020-03-20 09:02:41.595] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] resolving connection...
    [2020-03-20 09:02:41.595] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] connecting to 127.0.0.1:7430...
    [2020-03-20 09:02:41.614] [renderer3] [info] [remote-connection][ExtensionHost][349cd…][reconnect] reconnected!
    [2020-03-20 09:03:01.494] [renderer3] [error] read ECONNRESET: Error: read ECONNRESET
    	at TCP.onStreamRead (internal/stream_base_commons.js:183:27)
    
  4. roblourens commented on Mar 22, 2020

    @roblourens
    Member

    Thanks. This is strange, looks like you are in a constant loop of reconnection so some features, will probably not work properly. You probably see a popup saying that vscode is reconnecting too?

  5. added
    reconnecting
    on Mar 22, 2020
  6. vhood commented on Mar 23, 2020

    @vhood
    Author

    No, I have no one popup and I don't know why.
    But this extension works well with my local clean virtual machine (CentOS 8), where was popups and I've added ServerAliveInterval 1200 to ssh config and now that popups doesn't bother me. For our main remote server and corporation local server (10.0.210.123 were logs from) this option doesn't help, the terminal is just "Starting..." at all time, popups I've never seen there.

  7. jorymorrison commented on Apr 21, 2020

    @jorymorrison

    roblourens I ran into this as well. Suddenly my SSH connections would not connect. Only remedy was to use remove terminal.integrated.shell.windows from my settings.json. It was presumably set after connecting to a WSL remote target some days ago. Otherwise, the SSH connection is established but the session times out because no shell is opened.

    Note I am using 0.49.0 because .50 and up will not load my configuration file per #2529

  8. wjorda commented on Apr 21, 2020

    @wjorda

    ^ same symptoms as jorymorrison on Mac. I deleted terminal.integrated.shell.linux on mine and was able to connect again

  9. ander2at commented on Apr 23, 2020

    @ander2at

    I commented out terminal.integrated.shell.windows on my windows machine and it worked. See jorymorrison solution. I am using 0.51.0

  10. jorymorrison commented on May 5, 2020

    @jorymorrison

    Something keeps setting: terminal.integrated.shell.* in my settings.json, which breaks my ability to SSH.

    Any insight into what causes this to be set in my settings.json?

  11. BarretRen commented on Jun 12, 2020

    @BarretRen

    I have the same issue with Viktor Khramov (@vhood), have anyone resolved the issue or do you have any workaround solution?

  12. jorymorrison commented on Jun 12, 2020

    @jorymorrison
  13. BarretRen commented on Jun 13, 2020

    @BarretRen

    Yea, but it’s still not work. My shell path is “/usr/bin/zsh” on my remote server. Is it related with this issue? i noticed that the default path of vscode is “/bin/bash”.

  14. added
    ssh
    on Oct 13, 2020
  15. roblourens commented on Nov 5, 2020

    @roblourens
    Member

    Sorry for the slow response. There have been lots of changes the past several months. Let me know if anyone is still having an issue.

  16. roblourens commented on Nov 5, 2020

    @roblourens
    Member

    Actually, consider this a dupe of #2313

  17. added
    *duplicate
    on Nov 5, 2020
  18. locked and limited conversation to collaborators on Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

*duplicateinfo-neededreconnectingssh

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions