tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

restart after disconnect


From: Tim Connors
Subject: restart after disconnect
Date: Sat, 27 Mar 2004 13:17:03 +1100 (EST)

One thing that has been bugging me for a while, is that when tramp tries
to reconnect, it get part of the way, and then just sits and hangs.

I've included part of my *debug rsyncfsh* buffer below - from part way
through the last successful command, so you can see as it tries to restart
the connection (this is latest tramp CVS under xemacs, BTW)

The restart is identical to the first time it connected (although I find
it odd that there's 2 "Opening connection for address@hidden using nil..."
comments. The only difference being the last line - it must get a timeout
(maybe using the wrong timeout value?) and then try to start again, but
not from scratch, just from the 'unser correct' strage.

$ test -e /home/office/tconnors/.followup 2>/dev/null; echo
tramp_exit_status $?
tramp_exit_status 0
$ tramp_file_attributes /home/office/tconnors/.followup nil
(nil 1 738 273 (16484 19385) (16484 19384) (16484 19385) 5098 33188 t (72
. 17617) -1)
$ chmod 0600 /home/office/tconnors/.followup 2>/dev/null; echo
tramp_exit_status $?
tramp_exit_status 0
# Opening connection for address@hidden using nil...
# Waiting for prompts from remote shell
# Waiting 60s for prompt from remote shell
# Found remote shell prompt.
# Initializing remote shell
$ echo are you awake
are you awake
sh-2.05b$ [[Remote prompt `^///229d01f110132f1770f3634b44911b82
?$' not found in 10 secs]]# Opening connection for address@hidden using
nil...
# Waiting for prompts from remote shell
# Waiting 60s for prompt from remote shell
# Found remote shell prompt.
# Initializing remote shell
$ unset correct
sh-2.05b$ $ unset autocorrect
sh-2.05b$ $ exec env 'ENV=' 'PS1=$ ' /bin/sh -i
# Waiting 30s for remote `/bin/sh -i' to come up...
sh: no job control in this shell
$ sh: no job control in this shell
$ # Setting up remote shell environment
$ stty -inlcr -echo kill '^U'
stty: standard input: Invalid argument
$ $ TERM=dumb; export TERM
$ # Determining coding system
$ echo foo ; echo bar
foo
bar
$ # Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1'
$ HISTFILE=$HOME/.tramp_history; HISTSIZE=1
$ # Waiting 30s for `set +o vi +o emacs'
$ set +o vi +o emacs
$ # Waiting 30s for `unset MAIL MAILCHECK MAILPATH'
$ unset MAIL MAILCHECK MAILPATH 1>/dev/null 2>/dev/null
$ # Waiting 30s for `unset CDPATH'
$ unset CDPATH
$ # Setting shell prompt
$ PS1='
///229d01f110132f1770f3634b44911b82
'; PS2=''; PS3=''
$ echo ~root
/root
# Remote `/bin/sh -i' groks tilde expansion, good
# Finding command to check if file exists
$ test -e / 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ test -e /\ this\ file\ does\ not\ exist\  2>/dev/null; echo
tramp_exit_status $?
tramp_exit_status 1
# Finding a suitable `ls' command
# Checking remote `/bin/ls' command for `-n' option
$ test -x /bin/ls 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
# Testing remote command `/bin/ls' for -n...
$ /bin/ls -lnd / >/dev/null 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
# Testing remote command `/bin/ls' for -n...okay
# Using remote command `/bin/ls' for getting directory listings
$ tramp_set_exit_status () {
return $1
}
$ test -e /bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ ( test -d /bin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ test -e /usr/bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ ( test -d /usr/bin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ test -e /usr/sbin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ ( test -d /usr/sbin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ test -e /usr/local/bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ ( test -d /usr/local/bin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ test -e /home/office/tconnors/bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ ( test -d /home/office/tconnors/bin 2>/dev/null; echo tramp_exit_status
$? )
tramp_exit_status 0
$ test -e /home/office/tconnors/bin/Linux 2>/dev/null; echo
tramp_exit_status $?
tramp_exit_status 0
$ ( test -d /home/office/tconnors/bin/Linux 2>/dev/null; echo
tramp_exit_status $? )
tramp_exit_status 0
$ test -e /home/tconnors/bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 1
$ test -e /home/tconnors/bin/Linux 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 1
$ test -e /usr/ucb 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 1
$ test -e /usr/bin/X11 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ ( test -d /usr/bin/X11 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$
PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin:/home/office/tconnors/bin:/home/office/tconnors/bin/Linux:/usr/bin/X11;
export PATH
$ LC_TIME=C; export LC_TIME; echo huhu
huhu
$ mesg n; echo huhu
huhu
mesg: ttyname: Invalid argument
$ biff n ; echo huhu
huhu
sh: biff: command not found
$ unalias ls; echo huhu
huhu
sh: unalias: ls: not found
$ ( test / -nt / )
$ tramp_test_nt () {
test -n "`find $1 -prune -newer $2 -print`"
}
$ tramp_uudecode () {
(echo begin 600 /tmp/tramp.$$; tail +2) | uudecode
cat /tmp/tramp.$$
rm -f /tmp/tramp.$$
}
$ while read d; do if test -x $d/perl5 -a -f $d/perl5; then echo
tramp_executable $d/perl5; break; fi; done <<'EOF'
$ /bin
$ /usr/bin
$ /usr/sbin
$ /usr/local/bin
$ /home/office/tconnors/bin
$ /home/office/tconnors/bin/Linux
$ /home/tconnors/bin
$ /home/tconnors/bin/Linux
$ /usr/ucb
$ /usr/bin/X11
$ EOF
$ while read d; do if test -x $d/perl -a -f $d/perl; then echo
tramp_executable $d/perl; break; fi; done <<'EOF'
$ /bin
$ /usr/bin
$ /usr/sbin
$ /usr/local/bin
$ /home/office/tconnors/bin
$ /home/office/tconnors/bin/Linux
$ /home/tconnors/bin
$ /home/tconnors/bin/Linux
$ /usr/ucb
$ /usr/bin/X11
$ EOF
tramp_executable /usr/bin/perl
# Sending the Perl `file-attributes' implementation.
$ tramp_file_attributes () {
/usr/bin/perl -e '($f, $n) = @ARGV;
@s = lstat($f);
if (($s[2] & 0170000) == 0120000) { $l = readlink($f); $l = "\"$l\""; }
elsif (($s[2] & 0170000) == 040000) { $l = "t"; }
else { $l = "nil" };
$u = ($n eq "nil") ? $s[4] : getpwuid($s[4]);
$g = ($n eq "nil") ? $s[5] : getgrgid($s[5]);
printf("(%s %u %s %s (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) -1)\n",
$l, $s[3], $u, $g, $s[8] >> 16 & 0xffff, $s[8] & 0xffff,
$s[9] >> 16 & 0xffff, $s[9] & 0xffff, $s[10] >> 16 & 0xffff, $s[10] &
0xffff,
$s[7], $s[2], $s[1] >> 16 & 0xffff, $s[1] & 0xffff);' $1 $2 2>/dev/null
}
tramp_executable /usr/bin/perl
$ while read d; do if test -x $d/ln -a -f $d/ln; then echo
tramp_executable $d/ln; break; fi; done <<'EOF'
$ /bin
$ /usr/bin
$ /usr/sbin
$ /usr/local/bin
$ /home/office/tconnors/bin
$ /home/office/tconnors/bin/Linux
$ /home/tconnors/bin
$ /home/tconnors/bin/Linux
$ /usr/ucb
$ /usr/bin/X11
$ EOF
tramp_executable /bin/ln
$ unset correct

-- 
TimC -- http://astronomy.swin.edu.au/staff/tconnors/
And for the important things in life:
"If you teach a child to read, he or her can pass a literacy test"
-- George "Dubya" Boosh - president of the Yoonited States.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]