Skip to content

Content unavailable. Try to restart the connection. #94

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
renebarak opened this issue Apr 23, 2025 · 1 comment · Fixed by #95
Closed

Content unavailable. Try to restart the connection. #94

renebarak opened this issue Apr 23, 2025 · 1 comment · Fixed by #95
Assignees

Comments

@renebarak
Copy link

I have JetBrains Toolbox app installed. I have also installed Coder plugin and Gateway + PyCharm. I am able to successfully connect to Coder and see my workspaces but I receive the following error when clicking on the workspace:

I have also followed the instructions in README to construct URI directly in the browser but that results in the same error.

This is my constructed URI if that helps:

jetbrains://gateway/com.coder.toolbox?url=https://coder.xxxxxxxx.com&token=xxxxxxxx&workspace=black-capybara-72&agent=main&ide_product_code=PY&ide_build_number=251.23774.444&folder=/home/coder
@fioan89
Copy link
Collaborator

fioan89 commented Apr 23, 2025

Summary for the initial investigation:

  • @bpmct reported a similar issue (same stacktrace) last week:
2.6.1.40902 39918 2025-04-23 13:05:58.440 ERROR cher-worker-5 ractEnvironmentConnection Plugin com.coder.toolbox > Exception during deployment in environment: (com.coder.toolbox) black-capybara-72.main: com.jetbrains.toolbox.gateway.error.ConnectionError$UnresolvedHostname: Unresolved hostname
at com.jetbrains.toolbox.gateway.error.ConnectionError$Companion.fromSshValidationFailure(ConnectionError.kt:235)
at com.jetbrains.toolbox.gateway.deploy.ssh.SshToolboxAgentDeployer.errorFromProvider(SshToolboxAgentDeployer.kt:563)
at com.jetbrains.toolbox.gateway.deploy.ssh.SshToolboxAgentDeployer.access$errorFromProvider(SshToolboxAgentDeployer.kt:52)
at com.jetbrains.toolbox.gateway.deploy.ssh.SshToolboxAgentDeployer$startAgent$deployEverything$3.invokeSuspend(SshToolboxAgentDeployer.kt:313)
  • up until today me and @matifali could not reproduce the issue on dev.coder.com . Today however all ssh connections fail with:
2.6.1.40902 60309 2025-04-23 11:35:44.973 INFO  cher-worker-2 OpenSshAskpassRunner      Executing command ssh -G -p 22 [email protected]
2.6.1.40902 60309 2025-04-23 11:35:44.996 DEBUG cher-worker-5 SshToolboxAgentDeployer   Plugin com.coder.toolbox > doom.dev STDERR: debug1: Executing proxy command: exec "/Users/f0ssel/Library/Application Support/coder-toolbox/dev.coder.com/coder-darwin-arm64" --global-config "/Users/f0ssel/Library/Application Support/coder-toolbox/dev.coder.com/config" --url https://dev.coder.com/ ssh --stdio --disable-autostart --usage-app=disable --ssh-host-prefix coder-jetbrains-toolbox-dev.coder.com-bg-- coder-jetbrains-toolbox-dev.coder.com-bg--doom.dev
2.6.1.40902 60309 2025-04-23 11:35:45.267 DEBUG her-worker-10 SshToolboxAgentDeployer   Plugin com.coder.toolbox > doom.dev STDERR: Encountered an error running "coder ssh", see "coder ssh --help" for more information
2.6.1.40902 60309 2025-04-23 11:35:45.268 DEBUG her-worker-10 SshToolboxAgentDeployer   Plugin com.coder.toolbox > doom.dev STDERR: error: "user" must be an existing uuid or username.
2.6.1.40902 60309 2025-04-23 11:35:45.268 DEBUG her-worker-10 SshToolboxAgentDeployer   Plugin com.coder.toolbox > doom.dev STDERR: queried user="doom"
  • if we use an older cli version in the proxy command, like v2.21.0+9b6067c the issue no longer reproduces
  • the version reported by @renebarak is v2.18.2+d15c470. We don't have the trace logs to confirm it is the same cause (i.e proxy command using a garbled username) so we can only speculate here.
2.6.1.40902 39918 2025-04-23 09:56:46.934 INFO  her-worker-10 CoderCLIManager           Plugin com.coder.toolbox > `/Users/rbarak/Library/Application Support/coder-toolbox/coder.prod.schonfeld.com/coder-darwin-arm64 version --output json`: {
  "version": "v2.18.2+d15c470",
  "build_time": "2025-01-07T21:05:04Z",
  "external_url": "https://github.com/coder/coder/commit/d15c4702b031cba3a92c88d9c82699b721d9d9bd",
  "slim": true,
  "agpl": false,
  "boring_crypto": false
}
  • I don't have the logs to prove it but on the 22 of April I made multiple ssh connections via Coder Toolbox, I even connected to a couple of IDEs. My ssh configuration stayed the same, no changes to it.
  • the issue reproduces with and without wildcard config enabled.
  • if we use the coder-user/workspace-name.agent-name format the issue NO longer reproduces
Host coder-jetbrains-toolbox-bobiverse-riker.dev--dev.coder.com
  ProxyCommand "/Users/ifaur/Library/Application Support/coder-toolbox/dev.coder.com/coder-darwin-arm64" --global-config "/Users/ifaur/Library/Application Support/coder-toolbox/dev.coder.com/config" --url https://dev.coder.com/ ssh --stdio --disable-autostart --usage-app=jetbrains faur/bobiverse-riker.dev
  • Coder Gateway is not affected apparently
2025-04-23 22:21:08,723 [ 184568]   INFO - #c.i.s.ProxyCommand - ProxyCommand for coder-jetbrains-dev.coder.com-bg--faur--bobiverse-bob.dev:22: "/Users/ifaur/Library/Application Support/coder-gateway/dev.coder.com/coder-darwin-arm64" --global-config "/Users/ifaur/Library/Application Support/coder-gateway/dev.coder.com/config" --url https://dev.coder.com/ ssh --stdio --disable-autostart --usage-app=disable --ssh-host-prefix coder-jetbrains-dev.coder.com-bg-- coder-jetbrains-dev.coder.com-bg--faur--bobiverse-bob.dev
2025-04-23 22:21:08,727 [ 184572]   INFO - #c.i.s.ProxyCommand - Started ProxyCommand for coder-jetbrains-dev.coder.com-bg--faur--bobiverse-bob.dev:22: Process[pid=61482, exitValue="not exited"]
2025-04-23 22:21:08,728 [ 184573]   INFO - #c.i.s.i.s.sshj - Client identity string: SSH-2.0-IntelliJ__Gateway_GW-241.20005__SSHJ_0.38.1_SNAPSHOT
2025-04-23 22:21:11,415 [ 187260]   INFO - #c.i.s.i.s.sshj - Server identity string: SSH-2.0-Go
2025-04-23 22:21:11,687 [ 187532]   INFO - #c.i.s.i.s.sshj - Authentication log: SSH connection to [email protected]:22
 * With altered connection settings:
  - authMethods: PublicKey(privateKeys=[/Users/ifaur/.ssh/id_rsa, /Users/ifaur/.ssh/id_ecdsa, /Users/ifaur/.ssh/id_ecdsa_sk, /Users/ifaur/.ssh/id_ed25519, /Users/ifaur/.ssh/id_ed25519_sk, /Users/ifaur/.ssh/id_xmss, /Users/ifaur/.ssh/id_dsa], agent=ALL), Password, KeyboardInteractive
  - ciphers: [[email protected], [email protected], [email protected], aes128-ctr, aes192-ctr, aes256-ctr]
  - connectTimeout: PT0S
  - environmentVariables: [Inherit(glob=LANG), Inherit(glob=LC_*), Certain(name=CODER_SSH_SESSION_TYPE, value=JetBrains)]
  - hostKeyAlgorithms: [[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, [email protected], [email protected], rsa-sha2-512, rsa-sha2-256]
  - hostKeyVerifier: OpenSSH-like host key verifier (knownHostsFile=[/dev/null, /private/etc/ssh/ssh_known_hosts, /private/etc/ssh/ssh_known_hosts2], strictHostKeyChecking=NO, hashKnownHosts=false)
  - kexAlgorithms: [ecdh-sha2-nistp256, sntrup761x25519-sha512, [email protected], mlkem768x25519-sha256, curve25519-sha256, [email protected], ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group-exchange-sha256, diffie-hellman-group16-sha512, diffie-hellman-group18-sha512, diffie-hellman-group14-sha256]
  - macs: [[email protected], hmac-sha2-256, [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], hmac-sha2-512, hmac-sha1]
  - proxyConfig: Command(command="/Users/ifaur/Library/Application Support/coder-gateway/dev.coder.com/coder-darwin-arm64" --global-config "/Users/ifaur/Library/Application Support/coder-gateway/dev.coder.com/config" --url https://dev.coder.com/ ssh --stdio --disable-autostart --usage-app=disable --ssh-host-prefix coder-jetbrains-dev.coder.com-bg-- coder-jetbrains-dev.coder.com-bg--faur--bobiverse-bob.dev)
  - user: coder
 * With auth agent ssh-agent[/private/tmp/com.apple.launchd.SwGImj7QXz/Listeners]
 * Connected: Socket[addr=null,port=0,localport=0]
 * Starting authentication
  => none (success)

@fioan89 fioan89 self-assigned this Apr 23, 2025
@fioan89 fioan89 pinned this issue Apr 23, 2025
fioan89 added a commit that referenced this issue Apr 23, 2025
- latest Coder versions won't accept the SSH connection if proxy command does not include the workspace owner name
- for wildcard configuration the ssh config stays the same but the actual hostname provided to the Toolbox
  will include the workspace owner name
- resolves #94
fioan89 added a commit that referenced this issue Apr 24, 2025
- latest Coder versions won't accept the SSH connections if proxy
command does not include the workspace owner name
- for wildcard configuration the ssh config stays the same but the
actual hostname provided to the Toolbox
  will include the workspace owner name

For wildcard config:
- the ssh config hostname follows the
`coder-jetbrains-toolbox-dev.coder.com--*` pattern
- the proxy command will have a similar host prefix
- the hostname provided to Toolbox follows the
`coder-jetbrains-toolbox-dev.coder.com--${ws.ownerName}--${ws.name}.${agent.name}`
pattern


For non wildcard config:
- the ssh config hostname follows the
`coder-jetbrains-toolbox--${ws.ownerName}--${ws.name}.${agent.name}--dev.coder.com`
pattern
- the proxy command will have the username and hostname in the
${ws.ownerName}/${ws.name}.${agent.name} format
- the hostname provided to Toolbox follows the
`coder-jetbrains-toolbox-dev.coder.com--${ws.ownerName}--${ws.name}.${agent.name}`
pattern

- resolves #94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants