From c8dd5fc344b441f91d9f25ce5f6f22577228d040 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 9 Feb 2024 03:01:50 +0000 Subject: [PATCH 1/3] docs: fix jetbrains reconnect faq --- docs/faqs.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/faqs.md b/docs/faqs.md index c347f75b9e838..b9cd2dfc56824 100644 --- a/docs/faqs.md +++ b/docs/faqs.md @@ -534,14 +534,16 @@ https://code.visualstudio.com/docs/remote/linux#_local-linux-prerequisites
How can I resolve disconnects when connected to Coder via JetBrains Gateway? -If you leave your JetBrains IDE open for some time while connected to Coder, you -may encounter a message similar to the below: +If your JetBrains IDE is disconnected for a long period of time due to a network +change (for example turning off a VPN), you may find that the IDE will not reconnect +once the network is re-established (for example turning a VPN back on). When this +happens a persistent message will appear similar to the below: ```console No internet connection. Changes in the document might be lost. Trying to reconnect… ``` -To resolve this, add this entry to your SSH host file on your local machine: +To resolve this, add this entry to your SSH config file on your local machine: ```console Host coder-jetbrains--* @@ -549,4 +551,6 @@ Host coder-jetbrains--* ``` Note that your SSH config file will be overwritten by the JetBrains Gateway -client if it is re-authenticated to your Coder deployment. +client when it re-authenticates to your Coder deployment. + +
From c0f0de1ec29a712aa7c65c27d27342d2afb78b06 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 9 Feb 2024 03:06:30 +0000 Subject: [PATCH 2/3] make: fmt --- docs/faqs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/faqs.md b/docs/faqs.md index b9cd2dfc56824..7cc6c09ee19a4 100644 --- a/docs/faqs.md +++ b/docs/faqs.md @@ -535,9 +535,9 @@ https://code.visualstudio.com/docs/remote/linux#_local-linux-prerequisites How can I resolve disconnects when connected to Coder via JetBrains Gateway? If your JetBrains IDE is disconnected for a long period of time due to a network -change (for example turning off a VPN), you may find that the IDE will not reconnect -once the network is re-established (for example turning a VPN back on). When this -happens a persistent message will appear similar to the below: +change (for example turning off a VPN), you may find that the IDE will not +reconnect once the network is re-established (for example turning a VPN back +on). When this happens a persistent message will appear similar to the below: ```console No internet connection. Changes in the document might be lost. Trying to reconnect… From 9543ee219a1d0cc1977162fb15f437b81dc6563e Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 9 Feb 2024 23:40:40 +0000 Subject: [PATCH 3/3] add asher feedback --- docs/faqs.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/faqs.md b/docs/faqs.md index 7cc6c09ee19a4..7b09bb516a411 100644 --- a/docs/faqs.md +++ b/docs/faqs.md @@ -550,7 +550,15 @@ Host coder-jetbrains--* ServerAliveInterval 5 ``` -Note that your SSH config file will be overwritten by the JetBrains Gateway -client when it re-authenticates to your Coder deployment. +This will make SSH check that it can contact the server every five seconds. If +it fails to do so `ServerAliveCountMax` times (3 by default for a total of 15 +seconds) then it will close the connection which forces JetBrains to recreate +the hung session. You can tweak `ServerAliveInterval` and `ServerAliveCountMax` +to increase or decrease the total timeout. + +Note that the JetBrains Gateway configuration blocks for each host in your SSH +config file will be overwritten by the JetBrains Gateway client when it +re-authenticates to your Coder deployment so you must add the above config as a +separate block and not add it to any existing ones.