Reputation: 81
I recently set up a new FreeBSD machine and cannot seem to connect via Emacs Tramp. It stays stuck at "Tramp: Found remote shell prompt on 'broken.example.com'". (hostnames changed for anonymity)
I upped the debugging to 10 as I've seen suggested and it is getting stuck at this command.
stty icanon erase ^H cols 32767
It continually executes this command in a loop. The complete log can be downloaded at http://depht.com/temp/emacs-tramp-broken.example.com.txt
'stty -a' from broken.example.com.
speed 9600 baud; 65 rows; 32767 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl tab0 -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
-dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^@; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^H; erase2 = ^T; intr = ^C; kill = ^U;
lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;
I have a slightly older OpenBSD machine that this same Emacs Tramp client works well with, working.example.com. The log of a connection to this machine is at http://depht.com/temp/emacs-tramp-working.example.com.txt
'stty -a' from working.example.com
speed 9600 baud; 65 rows; 166 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
-extproc -xcase
iflags: -istrip icrnl -inlcr -igncr -iuclc ixon -ixoff ixany imaxbel
-ignbrk brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl -onocr -onlret -olcuc oxtabs -onoeot
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -mdmbuf
cchars: discard = ^O; dsusp = ^@; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^H; intr = ^C; kill = ^U; lnext = ^V;
min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
stop = ^S; susp = ^Z; time = 0; werase = ^W;
I have messed with stty settings on broken.example.com to mimic those of working.example.com, but with no success. I don't really understand all of the stty settings. A possible avenue of attack is 'stty pendin', which the man page of stty says is related icanon. However, I am unable to set -pendin on broken.example.com. 'stty -pendin' executed via either login script or after login manually does not result in '-pendin' getting set.
At this point I am completely lost, and any help would be very appreciated. Thank you in advance!!
Upvotes: 3
Views: 954
Reputation: 1656
Reading your trace files, there are several problems.
You get the message
ControlPath "/var/folders/y8/zyh_szbx38s64w6_3_6nlhtm0000gp/T/[email protected]:1345.RPyknjfNbHeeMjoQ" too long for Unix domain socket
Likely, your local machine runs OS X and you've trapped error http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19702 . This is solved already in Emacs 24.5 (you ought to run 24.4), and Tramp doesn't seem to be hindered by this.
stty icanon erase ^H cols 32767
remotely. The command itself is not a problem, but your remote host returns escape sequences Tramp does not understand. Which shell is run remotely, when Tramp calls /bin/sh
? Whatever it is, you must disable any fancy decoration from that shell, like prompt settings, or screen cleanup, or whatever. See the Tramp manual for proposals how to do this. Disable temporarily the evaluation of ~/.profile
or whatever the shell read during intialization.Upvotes: 3