From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.tramp,gmane.emacs.help Subject: Re: emacs tramp hangs Date: Sat, 17 Jun 2017 11:43:14 +0200 Message-ID: <87efujdk5p.fsf@detlef> References: <17eb70c0.d667.15cb1208980.Coremail.cnglen@126.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0692672797765219996==" X-Trace: blaine.gmane.org 1497692618 1559 195.159.176.226 (17 Jun 2017 09:43:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 17 Jun 2017 09:43:38 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org, tramp-devel@gnu.org To: glen Original-X-From: tramp-devel-bounces+get-tramp-devel=m.gmane.org@gnu.org Sat Jun 17 11:43:34 2017 Return-path: Envelope-to: get-tramp-devel@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 1dMAGR-000062-6C for get-tramp-devel@m.gmane.org; Sat, 17 Jun 2017 11:43:31 +0200 Original-Received: from localhost ([::1]:33958 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMAGW-00015l-0v for get-tramp-devel@m.gmane.org; Sat, 17 Jun 2017 05:43:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMAGS-000131-4g for tramp-devel@gnu.org; Sat, 17 Jun 2017 05:43:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMAGO-00089i-4m for tramp-devel@gnu.org; Sat, 17 Jun 2017 05:43:32 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:62308) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMAGN-00089D-RG; Sat, 17 Jun 2017 05:43:28 -0400 Original-Received: from detlef.gmx.de ([79.140.112.100]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MU0pN-1dDXIJ0Zmr-00QgaS; Sat, 17 Jun 2017 11:43:22 +0200 In-Reply-To: <17eb70c0.d667.15cb1208980.Coremail.cnglen@126.com> (glen's message of "Fri, 16 Jun 2017 21:38:38 +0800 (CST)") X-Provags-ID: V03:K0:vm8ES3MDhb4JTRQ4UPJaGSGCpvCSF4y7hYlrTCj8F69rR+BCow+ Vg0TfBC7BakPxuye2Wl7Sn6GsJVYsmp79oAjU+9z/QlL/M/VhenlRRS+XFell18acHYFoR3 37Bwm7lY+Z05QN7lV4/8zZNd56w5T7KhTtefWjlVmXe0TGNZQplnAqsFWcm3QTgOe8eJ9bV Q56Ezi01VmExkRHdbW0JQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:K81sWuHHBr0=:ph3C9g6CY5n86icpNW+Px7 ThclCQee2C5OSXF1Ws3Ag0397gTbipYYGkD4E4gfTNqbU9ZUsTJa/CZdONXHnrJK1D71qVEqI eJhN9wqmhq2YBOgxu2ANCObbRT3MIg5DaxfHUI0XmPpJMNOi6+qsTjdlUQg3VyqRiu9duSyds zbKZJl9wm2jutvPW75T1UX0nQ4ZpagjQdpLzTA0GCc9tdQg5Cq97PMn69iiAMVrAPNKP+dHM+ XbJR2RjtLlDSGpwHYnOjoj1u/ahznQL3W0Ddmre1l6ya+JRDQb3WvS3S/rbSHCu/kI49b1Pel HjA4mO9OF4UXGdV/NhA6foKRtBj6tgA7ArC6jvdYxIuvdVH7fjWtuu5iMydw1u+3SKl9Rt3hS oOR9OZqpzRIAgRXyEHwYpJUGYWG2ytKgqvCpDvi9lIe/i+iIzieemR9zg3l6ccbNcHxGZ52Zv yjx4oS5UTh9hW7DMVAJEwp1rA6YQHAYkTnEUXzAl3dTL2kUrJ3cdf6n1/wsHvOdw6uRKi2Jre AT6uUf8UcgqR0eGF/yRRUxymBZWwiMFCkRcIOOPOix42Dds8sZXe5pmdS+5EKb5i9EJYncsiC YuuU1/O3huPb3/I/4S8cVyC7KNhcGvAWA411qOeK209qkinRZkRuOjjgPxSPGwHlexWtfQLx9 NQR2QSzPOiJ3GrxJVjVzC/AI+f6K5SQsx96i2+8abV9NIYn8rk/0qv74qzIX9rEb4uWWGtq2U xLZ8+YKiZXOjMryvRaqIM9aJA2BNXiWedloQSMRt+AMEFmwV3WIzmi+wHXbw/IlLipEmSIgr X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.18 X-BeenThere: tramp-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tramp-devel-bounces+get-tramp-devel=m.gmane.org@gnu.org Original-Sender: "Tramp-devel" Xref: news.gmane.org gmane.emacs.tramp:9125 gmane.emacs.help:113501 Archived-At: --===============0692672797765219996== Content-Type: text/plain Content-Transfer-Encoding: 8bit glen writes: Hi Jacky, > It hangs after tramp-send-command(), tramp-wait-for-output(). > It seems that the emacs-tramp can't detect the output of remote command. > > See the attached file for more details. > > Any ideas? Your shell prompt doesn't look Tramp affin, there are escape sequences: > 18:10:54.192196 tramp-send-command (6) # exec ssh -l jacky -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none 192.168.98.76 > 18:10:59.920689 tramp-process-actions (6) # > Password: > Last login: Fri Jun 16 18:08:04 2017 from 192.18.8.8 > [?1034hCopyright(c) 2005-2011, QiZhi Technologies. All Rights Reserved. > License granted to Hze Co., Ltd, from 2015-03-09 to 2037-12-31. > > > Selected group: linshi > > Selected server: 72.2.96.9 (72.2.96.9) > > Selected account: root > > ]0;root@72.2.96.9 - SHTERM > SHTERM 2.6.3-35fa58f3 > Copyright (c) 2005-2011, QiZhi Technologies. All Rights Reserved. > License granted to Hze Co., Ltd. > Valid from 2015-03-09 to 2037-12-31. > Last login: Fri Jun 16 18:08:08 2017 from 172.22.215.224 > ]0;root@WINDANCER:~[?1034h[root@WINDANCER ~]# The login has worked successfully, despite the escape sequences. > 18:10:59.923488 tramp-send-command (6) # exec env TERM='xterm' ENV='' HISTFILE=~/.tramp_history PROMPT_COMMAND='' PS1=\#\$\ PS2='' PS3='' /bin/sh > 18:12:24.347680 tramp-open-shell (5) # Opening remote shell €˜/bin/sh€™...failed This command has failed. Even no output in the buffer. I recommend to suppress the escape sequences in your shell prompt, see the Tramp manual for hints how to do this. > PS: what's meaning of regex: "[^#$\n]*%s\r?$"? It's part of the `format' clause to determine the shell prompt; %s is replaced by the value of `tramp-end-of-output'. In your case, this variable should be "#$ ". Later on, once the connection has been established, `tramp-end-of-output' is a random string like "///e90c02f62ec0d7a2f6da0b67a20f8264#$". > Jacky Wang Best regards, Michael. --===============0692672797765219996== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Tramp-devel mailing list Tramp-devel@gnu.org https://lists.gnu.org/mailman/listinfo/tramp-devel --===============0692672797765219996==--