[MacPorts] #29794: emacs-app @23.3_0 Problem using tramp in emacs.app: "ControlPath too long"
#29794: emacs-app @23.3_0 Problem using tramp in emacs.app: "ControlPath too long" -------------------------------+-------------------------------------------- Reporter: gorzarg@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: emacs-app -------------------------------+-------------------------------------------- OS: 10.6.7 Xcode: Version 3.2.6 (1761) Using tramp in emacs.app results in the error "ControlPath too long" after typing in the remote machine's password. For example, in emacs: 1) "C-x C-f" to find a file 2) Type "/user@remotemachine:somefile.txt" 3) Asks for password, (type the correct one in). 4) Results in this error: user@remotemachine's password: ControlPath too long Process *tramp/scpc remotemachine* exited abnormally with code 255 In the *Messages* buffer, it says the tramp is doing the command: Tramp: Sending command `exec ssh -o ControlPath=/var/folders/...a_really_long_dir_name.../-Tmp-/tramp.442LsW.%r@%h:%p -o ControlMaster=yes -e none remotemachine' So I think the ControlPath is just too long for ssh. Note: I don't think this is a problem with tramp itself, because I compared the tramp files in /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/net/ with the ones on a linux machine where tramp works, and they're pretty much the same. Any suggestions or fixes? -- Ticket URL: <https://trac.macports.org/ticket/29794> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29794: emacs-app @23.3_0 Problem using tramp in emacs.app: "ControlPath too long" -------------------------------+-------------------------------------------- Reporter: gorzarg@… | Owner: css@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: emacs-app -------------------------------+-------------------------------------------- Changes (by jmr@…): * owner: macports-tickets@… => css@… * cc: gorzarg@… (removed) Comment: Please remember to cc the maintainer. You do not need to be in cc when you are the reporter. -- Ticket URL: <https://trac.macports.org/ticket/29794#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29794: emacs-app @23.3_0 Problem using tramp in emacs.app: "ControlPath too long" -------------------------------+-------------------------------------------- Reporter: gorzarg@… | Owner: css@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: emacs-app -------------------------------+-------------------------------------------- Comment(by dmercer@…): Replying to [ticket:29794 gorzarg@…]:
Any suggestions or fixes?
I saw this today (MacOS 10.6.7 + Aquamacs 23.3.1). I don't have a permanent fix, but this workaround works for me. Tramp is using the TMPDIR environment to build a path for the ssh control socket. On my system, TMPDIR is set to something that looks like: /var/folders/Ww/WwhMzsgCFW0-C433VCMqNE+++TI/-Tmp-/ which results in a path ssh thinks is too long. You can force Aquamacs to use a standard TMPDIR by starting it from the terminal like so: $ TMPDIR=/tmp open /Applications/Aquamacs.app -- Ticket URL: <https://trac.macports.org/ticket/29794#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29794: emacs-app @23.3_0 Problem using tramp in emacs.app: "ControlPath too long" -------------------------------+-------------------------------------------- Reporter: gorzarg@… | Owner: css@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: emacs-app -------------------------------+-------------------------------------------- Comment(by css@…): So is this an issue with the port or a more general platform configuration issue? -- Ticket URL: <https://trac.macports.org/ticket/29794#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29794: emacs-app @23.3_0 Problem using tramp in emacs.app: "ControlPath too long" -------------------------------+-------------------------------------------- Reporter: gorzarg@… | Owner: css@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: emacs-app -------------------------------+-------------------------------------------- Comment(by gorzarg@…): Replying to [comment:4 css@…]:
So is this an issue with the port or a more general platform configuration issue?
Not sure. However, dmercer's workaround works. So, I dug around in the tramp files, and I think I have a fix: 1) Open up /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/net /tramp-compat.el.gz in emacs with root access (e.g. sudo emacs tramp- compat.el.gz). 2) In tramp-compat.el.gz, delete lines 212-224. 3) Add the following text: (file-name-as-directory "/tmp")) to line 212. 4) Control-x-s to save the file. 5) Meta-x, byte-compile-file, then enter in tramp-compat.el.gz and press enter. 6) Meta-x, byte-compile-file, then enter in tramp.el.gz and press enter. 7) Adjust permissions of byte-compiled files so other people can use them: sudo chmod go+r tramp.elc tramp-compat.elc. Tramp should work now without having to set the $TMPDIR env variable. Basically, I'm just modifying the tramp-compat-temporary-file-directory function in tramp-compat.el.gz to just set the temporary directory as "/tmp." Maybe for the next release of this port, this change (or something similar) could be incorporated so I don't have to manually do this every time I update Emacs.app? -- Ticket URL: <https://trac.macports.org/ticket/29794#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29794: emacs-app @23.3_0 Problem using tramp in emacs.app: "ControlPath too long" -------------------------------+-------------------------------------------- Reporter: gorzarg@… | Owner: css@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: emacs-app -------------------------------+-------------------------------------------- Comment(by yaroslavvb@…): I got same error and gorzag's solution seems to work. The only snag was with the the byte compilation part using official Emacs for MacOS build (23.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.35)) -- tramp.el gives error on (require 'tramp-compat) -- "Cannot open load file: tramp-compat". I got around this by deleting tramp.elc and tramp- compat.elc, unzipping tramp and tramp-compat, and doing gorzarg's modification in tramp-compat.el. -- Ticket URL: <https://trac.macports.org/ticket/29794#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29794: emacs-app @23.3_0 Problem using tramp in emacs.app: "ControlPath too long" -------------------------------+-------------------------------------------- Reporter: gorzarg@… | Owner: css@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: emacs-app -------------------------------+-------------------------------------------- Comment(by gorzarg@…): You used the default Mac OS emacs (i.e. /usr/bin/emacs)? I used emacs.app (from MacPorts) to do the byte-compilations, and it worked okay. I also have (auto-compression-mode t) in my .emacs file to edit compressed files on the fly (you can also do M-x auto-compression-mode). Hope that helps any other users with problems with tramp. Replying to [comment:6 yaroslavvb@…]:
I got same error and gorzag's solution seems to work.
The only snag was with the the byte compilation part using official Emacs for MacOS build (23.3.1 (x86_64-apple-darwin, NS apple- appkit-1038.35)) -- tramp.el gives error on (require 'tramp-compat) -- "Cannot open load file: tramp-compat". I got around this by deleting tramp.elc and tramp-compat.elc, unzipping tramp and tramp-compat, and doing gorzarg's modification in tramp-compat.el.
-- Ticket URL: <https://trac.macports.org/ticket/29794#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29794: emacs-app @23.3_0 Problem using tramp in emacs.app: "ControlPath too long" -------------------------------+-------------------------------------------- Reporter: gorzarg@… | Owner: css@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: emacs-app -------------------------------+-------------------------------------------- Comment(by yaroslavvb@…): I think perhaps the error in byte-compilation was due to archiving. Once I unarchived tramp-compat.el.gz, I can byte-compile it -- Ticket URL: <https://trac.macports.org/ticket/29794#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29794: emacs-app @23.3_0 Problem using tramp in emacs.app: "ControlPath too long" -------------------------------+-------------------------------------------- Reporter: gorzarg@… | Owner: css@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: emacs-app -------------------------------+-------------------------------------------- Changes (by jmr@…): * cc: hum@… (added) -- Ticket URL: <https://trac.macports.org/ticket/29794#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29794: emacs-app @23.3_0 Problem using tramp in emacs.app: "ControlPath too long" --------------------------------+------------------------------------------- Reporter: gorzarg@… | Owner: css@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: worksforme | Keywords: Port: emacs-app | --------------------------------+------------------------------------------- Changes (by hum@…): * status: new => closed * resolution: => worksforme Comment: I do not get the same error with the latest emacs-app @24.1. I am closing this ticket, but please reopen it if you find any trouble. -- Ticket URL: <https://trac.macports.org/ticket/29794#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29794: emacs-app @23.3_0 Problem using tramp in emacs.app: "ControlPath too long" ------------------------+---------------------- Reporter: gorzarg@… | Owner: css@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: | Keywords: Port: emacs-app | ------------------------+---------------------- Changes (by buckmeisterq@…): * status: closed => reopened * resolution: worksforme => Comment: I've got GNU Emacs 24.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2012-08-27 on bob.porkrind.org and it still has the issue. I've tried both workarounds of setting TMPDIR=/tmp and modifying/byte-compiling the tramp-compat.el.gz, but I still get: CentOS release 5.8 (Final) Kernel 2.6.18-194.32.1.el5 on an x86_64 ControlPath too long (followed by a hat-M, like a CTRL-M from windows line ending?) Any way that I can provide more details to help diagnose/reproduce/workaround this problem? I would really like to use tramp on the mac but it is unusable due to this error. I'm trying to do things like open "~/bin/file_name.sh" on a host named "aa-master". It seems like the control path for that would be really, really short. My username is only six chars, and this is my obfuscated but character- count-equivalent ssh config (note that I've tried with and without ControlPath being set): Host aa-master HostName aa-hudson-master-vm.ottffssente.com User ottffs IdentitiesOnly yes IdentityFile ~/.ssh/id_rsa ControlPath /c/c-%r -- Ticket URL: <https://trac.macports.org/ticket/29794#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29794: emacs-app @23.3_0 Problem using tramp in emacs.app: "ControlPath too long" ------------------------+---------------------- Reporter: gorzarg@… | Owner: css@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: | Keywords: Port: emacs-app | ------------------------+---------------------- Comment (by cabo@…): Replying to [comment:11 buckmeisterq@…]:
HostName aa-hudson-master-vm.ottffssente.com
From someone who also lives in la-la-la-can-i-make-my-domain-name-longer- land: Workaround: use the IP address. (I know, I know.) -- Ticket URL: <https://trac.macports.org/ticket/29794#comment:12> MacPorts <http://www.macports.org/> Ports system for OS X
#29794: emacs-app @23.3_0 Problem using tramp in emacs.app: "ControlPath too long" ------------------------+---------------------- Reporter: gorzarg@… | Owner: css@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: | Keywords: Port: emacs-app | ------------------------+---------------------- Comment (by espenhw@…): Replying to [comment:5 gorzarg@…]:
Replying to [comment:4 css@…]:
So is this an issue with the port or a more general platform configuration issue?
Not sure. However, dmercer's workaround works. So, I dug around in the tramp files, and I think I have a fix:
1) Open up /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/net /tramp-compat.el.gz in emacs with root access (e.g. sudo emacs tramp- compat.el.gz). 2) In tramp-compat.el.gz, delete lines 212-224. 3) Add the following text: (file-name-as-directory "/tmp")) to line 212. 4) Control-x-s to save the file. 5) Meta-x, byte-compile-file, then enter in tramp-compat.el.gz and press enter. 6) Meta-x, byte-compile-file, then enter in tramp.el.gz and press enter. 7) Adjust permissions of byte-compiled files so other people can use them: sudo chmod go+r tramp.elc tramp-compat.elc.
Or better, add the following to your .emacs: {{{#!el (put 'temporary-file-directory 'standard-value '((file-name-as-directory "/tmp"))) }}} -- Ticket URL: <https://trac.macports.org/ticket/29794#comment:13> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts