Почему Tramp зависает при отправке скриптов Perl на удаленный хост?

Почему Tramp зависает при отправке скриптов Perl на удаленный хост?

Я знаю, что это не имеет прямого отношения к программированию, но я в тупике, а поскольку Emacs — мой основной инструмент программирования...

Я пытаюсь настроить Tramp для подключения к моему тестовому хосту. Я вызываю его либо с помощью, /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. Процесс умирает, потому что я убиваю его в другой оболочке, иначе emacs никогда не вернется из этого.

Я подключаюсь FreeBSD 6.2-RELEASE-p5из OSX 10.5.7, если это имеет значение, используя Tramp 2.0.58-preв сборке Carbon Emacs 22.3.1.

решение1

Возможно, strace на pid sshd на принимающей стороне (сервер FreeBSD) покажет вам, где он блокируется. Вам нужно будет отслеживать дочерние процессы с помощью -f. Если pid sshd равен 3125:

sudo strace -vfp 3125 -o sshdStraceDump.txt

Связанный контент