为什么Tramp在将Perl脚本发送到远程主机时挂起?

我知道这不是直接编程相关,但我很难过,因为Emacs是我的主要编程工具…

我试图设置stream氓连接到我的testing主机。 我使用/ssh:host:.bashrc/scp:host:.bashrc调用它,但是这两个都迟早会遇到相同的问题。

他们只得到第一次尝试发送一个Perl脚本之前的过程楔形,我被迫从客户端杀死SSH会话。

例如:

 tramp: Opening connection for username@host using scp... tramp: Waiting 60s for local shell to come up... tramp: Sending command `ssh host -l username -e none || exit' tramp: Waiting for prompts from remote shell tramp: Waiting 60s for prompt from remote shell on host host tramp: Found remote shell prompt on `host' tramp: Waiting 30s for remote `/bin/sh' to come up... tramp: Setting up remote shell environment tramp: Determining coding system tramp: Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1; export HISTFILE; export HISTSIZE' tramp: Waiting 30s for `set +o vi +o emacs' tramp: Waiting 30s for `unset MAIL MAILCHECK MAILPATH' tramp: Waiting 30s for `unset CDPATH' tramp: Setting shell prompt tramp: Remote `/bin/sh' groks tilde expansion, good tramp: Finding command to check if file exists tramp: Finding a suitable `ls' command tramp: Checking remote `/bin/ls' command for `-n' option tramp: Testing remote command `/bin/ls' for -n...okay tramp: Using remote command `/bin/ls' for getting directory listings tramp: Sending the Perl script `tramp_file_attributes'... tramp-wait-for-output: Process has died 

此跟踪使用scp方法。 ssh方法如下所示:

 tramp: Opening connection for username@host using ssh... tramp: Waiting 60s for local shell to come up... tramp: Sending command `ssh host -l username -e none || exit' tramp: Waiting for prompts from remote shell tramp: Waiting 60s for prompt from remote shell on host host tramp: Found remote shell prompt on `host' tramp: Waiting 30s for remote `/bin/sh' to come up... tramp: Setting up remote shell environment tramp: Determining coding system tramp: Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1; export HISTFILE; export HISTSIZE' tramp: Waiting 30s for `set +o vi +o emacs' tramp: Waiting 30s for `unset MAIL MAILCHECK MAILPATH' tramp: Waiting 30s for `unset CDPATH' tramp: Setting shell prompt tramp: Remote `/bin/sh' groks tilde expansion, good tramp: Finding command to check if file exists tramp: Finding a suitable `ls' command tramp: Checking remote `/bin/ls' command for `-n' option tramp: Testing remote command `/bin/ls' for -n...okay tramp: Using remote command `/bin/ls' for getting directory listings tramp: Sending the Perl `mime-encode' implementations. tramp-wait-for-output: Process has died 

正如你所看到的,发生的最后一件事是试图发送Perl脚本。 该进程正在死亡,因为我在另一个shell中杀死它,否则emacs永远不会回来。

我从OSX 10.5.7连接到FreeBSD 6.2-RELEASE-p5 ,如果有什么区别的话,在Carbon Emacs 22.3.1版本中使用Tramp 2.0.58-pre

也许在接收端(FreeBSD服务器)上的sshd pid会告诉你它在哪里locking。 你将需要使用-f来关注subprocess。 如果sshd的pid是3125:

 sudo strace -vfp 3125 -o sshdStraceDump.txt