From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#27009: 25.1; Tramp stuck on wrong host Date: Mon, 22 May 2017 14:03:19 +0200 Message-ID: <87lgppxfnc.fsf@detlef> References: <5c849bc3ef1078e5244a8fabc5677551.squirrel@leaf.websitewelcome.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1495454672 19180 195.159.176.226 (22 May 2017 12:04:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 May 2017 12:04:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 27009@debbugs.gnu.org To: "Devon Sean McCullough" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 22 14:04:28 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCm4Y-0004s7-Rh for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 May 2017 14:04:26 +0200 Original-Received: from localhost ([::1]:42152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCm4e-0004mg-7j for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 May 2017 08:04:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCm4D-0004dP-SW for bug-gnu-emacs@gnu.org; Mon, 22 May 2017 08:04:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCm4A-00030F-PM for bug-gnu-emacs@gnu.org; Mon, 22 May 2017 08:04:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57412) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCm4A-000307-MI for bug-gnu-emacs@gnu.org; Mon, 22 May 2017 08:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dCm4A-00078D-Bm for bug-gnu-emacs@gnu.org; Mon, 22 May 2017 08:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 May 2017 12:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27009 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27009-submit@debbugs.gnu.org id=B27009.149545462227383 (code B ref 27009); Mon, 22 May 2017 12:04:02 +0000 Original-Received: (at 27009) by debbugs.gnu.org; 22 May 2017 12:03:42 +0000 Original-Received: from localhost ([127.0.0.1]:60089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCm3p-00077b-Sm for submit@debbugs.gnu.org; Mon, 22 May 2017 08:03:42 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:54223) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCm3o-00077P-OW for 27009@debbugs.gnu.org; Mon, 22 May 2017 08:03:41 -0400 Original-Received: from detlef.gmx.de ([212.86.47.172]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MFMIO-1d9UoX2zHo-00EJvj; Mon, 22 May 2017 14:03:21 +0200 In-Reply-To: <5c849bc3ef1078e5244a8fabc5677551.squirrel@leaf.websitewelcome.com> (Devon Sean McCullough's message of "Sun, 21 May 2017 05:12:07 -0500") X-Provags-ID: V03:K0:9w8LqIv8bziJS9FDr7t4HbVa9bcK9dGZ4cWVSLiiMuEV9ucCEBw 151gBFVE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edence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:132728 Archived-At: "Devon Sean McCullough" writes: Hi Davon, > Tramp connects to the wrong host -- the user may not notice, leading to > devastating damage. Tramp is almost agnostic to port numbers. It uses them for the command raised for connecting, but everywhere else it ignores them. This happens especially in managing internal data, like the name of the connection buffer or access to cached values. As a result, two remote file names are handled as identical if they differ only in their port numbers. See also the todo entry in tramp.el: ;; * Use also port to distinguish connections. This is needed for ;; different hosts sitting behind a single router (distinguished by ;; different port numbers). (Tzvi Edelman) I know, this is not satisfying. If time permits, I'll work on this next time. Unfortunately, there's no trivial fix. As a workaround, use different host names. In your example, you could use something like (let ((one "/scp:localhost#11111:") (two "/scp:localhost.#22222:")) Name resolution for "localhost" and "localhost." will return the same IP address. But from the Tramp pov, the host names are different strings. Best regards, Michael.