From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.help Subject: Re: Tramp timeout for currently unreachable connections? Date: Thu, 12 Sep 2024 23:05:22 +0530 Message-ID: <871q1o6ahx.fsf@gmail.com> References: <87ed5p54dx.fsf@gmail.com> <877cbhj5dg.fsf@gmx.de> <87plp8lwo2.fsf@gmail.com> <87frq4iy6t.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31203"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Robert Pluim , help-gnu-emacs@gnu.org To: Michael Albinus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 12 19:36:08 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sonjk-0007xs-1f for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 12 Sep 2024 19:36:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sonjF-0005Hz-Uw; Thu, 12 Sep 2024 13:35:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sonjE-0005Hq-V6 for help-gnu-emacs@gnu.org; Thu, 12 Sep 2024 13:35:36 -0400 Original-Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sonjD-0004wp-FJ for help-gnu-emacs@gnu.org; Thu, 12 Sep 2024 13:35:36 -0400 Original-Received: by mail-pl1-x641.google.com with SMTP id d9443c01a7336-2054e22ce3fso13965805ad.2 for ; Thu, 12 Sep 2024 10:35:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726162534; x=1726767334; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=myuJI5aTLa2NBPggwLyIziwrmrmo01Ewl95Ma3E0FT4=; b=UtXIoKG26shVysnZrRr/UrfrMBzpEom9viMA+a0fV6NFlF+gXSdCjHZpy9kUi22hkJ fk21+xvXWpoAJDUe+4ifMYMTgNchoWs+kC3+F7URbUaAUuAlpKSb6p7te28SbHRBtW3g LiHxmYDe5ZNzy5ODPii273ghZyoHey8Ulwmo+FrBRL1qA7gwU1I0VaAmExn6HzfwDOz3 QBpicx753GpJudqQXTFJbJWV2NMwylQkzraN46qgOcZB9OCZXOs5TDNw4gG4aZRWnveB 8L72G8zZzXXDxbSbFDBQt0FWfH9m1qZ3tA0yY2NL6HYB6ZGcOjfHxregQ86NV3XvRvE6 qIKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726162534; x=1726767334; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=myuJI5aTLa2NBPggwLyIziwrmrmo01Ewl95Ma3E0FT4=; b=cWYJlZHZ2kEup/Q9mEEvVw7Y2FH1OUz5XIw7pRBxVC9s+FtLFoNpKFiIpFMwpsvT2L 0t17jKw4vyEwFl1yd8IjszfEP32P6ADjNvJ56hMQMwNaSzbNVXFoDIZXzaZ5zWGeF2Kr OMVi/XZ4itFL629zQlp3xBR8e55ugnGbyTjlLzKM+g40ByHu+zuvRUG9Q5L4wdD/b/sU DgK8mNPSLthsIGGsELr0e3XEttTxUx2iTDqM/VdV3khAqnmge/3XgKJQzGCLyKEpMC2B kxdjsf1ZjCwN6Bnuxtg+utuLkGOST1G3O+swmKpPLh32n/rXVkx0weXYhh6COpH5gOfV ofeA== X-Forwarded-Encrypted: i=1; AJvYcCXFFEGO1ZSshjuCyCddi5cjDqqTr/m4B11y0y8gaUk6Zn/lkZ2CZOPeOkjACGsrUCX1ltZvrX9PcbF3t+00lQ==@gnu.org X-Gm-Message-State: AOJu0YxKdMnxsCAFcMZx8z4cUjMSZ/C01LiPZmwCP+yVj1cPEPNSEnEN 43mT1ffKBnuIhdG2QicRuUXonCx9OkF0TqpudR2R2zgr2ExpF6F1 X-Google-Smtp-Source: AGHT+IG+CpnHmoZtWQ+yBl4r3PtvNmH8C0KyuqAWCWCv1XqJ631z8irLKB+NyzOplSP2RtCpZUDzIQ== X-Received: by 2002:a17:90b:17c4:b0:2d8:a744:a820 with SMTP id 98e67ed59e1d1-2dba007f371mr3693634a91.36.1726162533878; Thu, 12 Sep 2024 10:35:33 -0700 (PDT) Original-Received: from localhost ([1.7.159.70]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2db0413688bsm10838401a91.4.2024.09.12.10.35.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 10:35:33 -0700 (PDT) In-Reply-To: <87frq4iy6t.fsf@gmx.de> (Michael Albinus's message of "Thu, 12 Sep 2024 19:22:50 +0200") Received-SPF: pass client-ip=2607:f8b0:4864:20::641; envelope-from=visuweshm@gmail.com; helo=mail-pl1-x641.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147967 Archived-At: [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=9A= =E0=AF=86=E0=AE=AA=E0=AF=8D=E0=AE=9F=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0= =AF=8D 12, 2024] Michael Albinus wrote: > Robert Pluim writes: > > Hi Robert, > >>>>>>> On Thu, 12 Sep 2024 16:47:39 +0200, Michael Albinus said: >> >> Michael> Visuwesh writes: >> >> Hello all, >> >> Michael> Hi Visuwesh, >> >> >> I know that non-essential=3Dt prevents Tramp from establishing new >> >> connections but is there a way to make Tramp use a very short tim= eout >> >> when trying to connect to a previously established connection tha= t is >> >> now unreachable? What I mean is: if I am connected to a remote h= ost via >> >> a ssh connection /ssh:user@remote: and my internet connection goe= s down, >> >> I do not want Tramp trying to fetch remote resources forever. >> >> Michael> Use 'M-x tramp-cleanup-connection'. Play with user option `= tramp-connection-timeout'. >> >> Idle thought: would enabling 'ServerAliveInterval' help at all here? >> (my Tramp connections travel from one side of my desk to the other, so >> I can=CA=BCt tell =E2=98=BA=EF=B8=8F) > > Yes, even the Tramp manual speaks about: > > 4.19.2 Detection of session hangouts > ------------------------------------ > > =E2=80=98ssh=E2=80=99 sessions on the local host hang when the network is= down. TRAMP > cannot safely detect such hangs. OpenSSH can be configured to kill > such hangs with the following settings in =E2=80=98~/.ssh/config=E2=80=99: > > Host * > ServerAliveInterval 5 > ServerAliveCountMax 2 > > But who reads manuals ... Ahh!! It seems I completely misunderstood these two variables in my initial reading of ssh_config(5) when I was initially reading through the Tramp manual. Thank you for pointing this out again. >> Robert > > Best regards, Michael.