Skip to content

Jetbrains Gateway hangs forever when trying to establish SSH connection to remote worker #12590

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

Closed
Orrison opened this issue Mar 14, 2024 · 9 comments
Labels
need-help Assign this label prompts an engineer to check the issue. Only humans may set this.

Comments

@Orrison
Copy link

Orrison commented Mar 14, 2024

Attempting to connect to a workspace and select the IDE and project hangs forever when trying to establish SSH connection to the remote worker.

Using the Coder client, I am able to SSH into the workspace, which seems to be running fine.

The workspace is running a docker template.

JetBrains Gateway 2023.3.4
Build #GW-233.14475.30, built on February 13, 2024
Runtime version: 17.0.10+1-b1087.17 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.4
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 10
Metal Rendering is ON
Registry:
ide.experimental.ui=true
Non-Bundled Plugins:
com.coder.gateway (2.10.0)

@coder-labeler coder-labeler bot added the bug label Mar 14, 2024
@Orrison
Copy link
Author

Orrison commented Mar 14, 2024

It actually seems to be any SSH connection. Manually, via VSCode, or PHPStorm.

This seems to be there error:

[12:22:08.868] Spawned 22809
[12:22:08.973] > local-server-1> Running ssh connection command: ssh -v -T -D 57017 -o ConnectTimeout=1800 coder-vscode--Orrison--chocolate-lemur-75 bash
[12:22:08.975] > local-server-1> Spawned ssh, pid=22825
[12:22:08.979] stderr> OpenSSH_9.6p1, LibreSSL 3.3.6
[12:22:10.881] stderr> kex_exchange_identification: banner line contains invalid characters
[12:22:10.881] stderr> banner exchange: Connection to UNKNOWN port 65535: invalid format
[12:22:10.882] > local-server-1> ssh child died, shutting down
[12:22:10.886] Local server exit: 0
[12:22:10.886] Received install output: local-server-1> Running ssh connection command: ssh -v -T -D 57017 -o ConnectTimeout=1800 coder-vscode--Orrison--chocolate-lemur-75 bash
local-server-1> Spawned ssh, pid=22825
OpenSSH_9.6p1, LibreSSL 3.3.6
kex_exchange_identification: banner line contains invalid characters
banner exchange: Connection to UNKNOWN port 65535: invalid format
local-server-1> ssh child died, shutting down

[12:22:10.886] Failed to parse remote port from server output

A colleague is NOT seeing the same error and the difference seems to be he is using Mac OS 13`` OpenSSH_9.0p1, LibreSSL 3.3.6, while I am on Mac OS 14.4 (23E214) OpenSSH_9.6p1, LibreSSL 3.3.6

@Orrison
Copy link
Author

Orrison commented Mar 14, 2024

When trying to just ssh:

debug1: Local version string SSH-2.0-OpenSSH_9.6
debug1: kex_exchange_identification: banner line 0: \033[5 qSSH-2.0-Go
kex_exchange_identification: banner line contains invalid characters
banner exchange: Connection to UNKNOWN port 65535: invalid format

@matifali matifali added the need-help Assign this label prompts an engineer to check the issue. Only humans may set this. label Mar 14, 2024
@spikecurtis
Copy link
Contributor

What version of Coder are you running? I think this dupes #11530 You might just need to upgrade.

@Orrison
Copy link
Author

Orrison commented Mar 15, 2024

v2.9.0+3215464

@spikecurtis
Copy link
Contributor

Is that the version of the Coder CLI client, or the server?

@Orrison
Copy link
Author

Orrison commented Mar 22, 2024

Is that the version of the Coder CLI client, or the server?

Both

@spikecurtis
Copy link
Contributor

I upgraded macOS to 14.4 and confirmed I'm on the same SSH version (OpenSSH_9.6p1, LibreSSL 3.3.6), and I don't reproduce this.

debug1: kex_exchange_identification: banner line 0: \033[5 qSSH-2.0-Go

means that there is some extra stuff being injected into the stream that SSH is trying to interpret. Specifically \033[5 q is a terminal control sequence and sets the "blinking bar" cursor shape. I'm not sure where that is coming from. After that it looks fine.

We'll need to figure out what's different about your environment.

What happens if you attempt to connect with coder ssh <workspace> rather than ssh coder.<workspace>?

What terminal emulator & shell are you using?

Can you share your environment variables (env)?

@stirby
Copy link
Collaborator

stirby commented Apr 26, 2024

@Orrison - closing this for now. If you can provide some of the requested info above we'll reopen and continue discussion.

@stirby stirby closed this as completed Apr 26, 2024
@Orrison
Copy link
Author

Orrison commented Apr 29, 2024

@Orrison - closing this for now. If you can provide some of the requested info above we'll reopen and continue discussion.

It's no problem at all. Sorry for the delay in responding. No one else on my team has this issue, so I assume it is something going on with my SSH setup locally.

I get a new system soon and will test it to see if I have the same issue and, if so, what further details I can provide.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-help Assign this label prompts an engineer to check the issue. Only humans may set this.
Projects
None yet
Development

No branches or pull requests

4 participants