all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: glen <cnglen@126.com>
Cc: help-gnu-emacs@gnu.org, tramp-devel@gnu.org
Subject: Re: emacs tramp hangs
Date: Sat, 17 Jun 2017 11:43:14 +0200	[thread overview]
Message-ID: <87efujdk5p.fsf@detlef> (raw)
In-Reply-To: <17eb70c0.d667.15cb1208980.Coremail.cnglen@126.com> (glen's message of "Fri, 16 Jun 2017 21:38:38 +0800 (CST)")

[-- Attachment #1: Type: text/plain, Size: 1989 bytes --]

glen <cnglen@126.com> 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\a
> 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:~\a[?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.


[-- Attachment #2: Type: text/plain, Size: 144 bytes --]

_______________________________________________
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel

      reply	other threads:[~2017-06-17  9:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-16 13:38 emacs tramp hangs glen
2017-06-17  9:43 ` Michael Albinus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87efujdk5p.fsf@detlef \
    --to=michael.albinus@gmx.de \
    --cc=cnglen@126.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=tramp-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.