Greetings. I am attempting to connect from aquamacs emacs + slime on my Mac to a remote lisp on Ubuntu 10.10. These machines are both on my LAN.
On the Mac I am using ccl 1.6 64-bit, with the slime/swank provided by aquamacs as of yesterday. This is described on the aquamacs site as Aquamacs-slime-2010-12-28.pkg.tgz.
On Ubuntu 10.10 I am using ccl 1.7 32-bit, with yesterday's FAIRLY-STABLE slime/swank.
I followed the instructions in the slime manual to connect locally on both machines. That is, I can start ccl in a terminal, fire up a swank server, and then connect from emacs/aquamacs by means of M-x slime-connect to the server on the same machine.
On Ubuntu, I have an ssh server running. I can log in from the Mac to Ubuntu over ssh with no problems.
In a terminal on my Mac I do the incantation suggested in the slime manual p.26, i.e.
ssh -L4005:127.0.0.1:4005 david@10.0.1.6
The result of keying in the above is that I get a prompt for a password, and an apparently successful connection to the Ubuntu machine. It does open up a "visible" ssh session, i.e. I see an ubuntu prompt in my Mac terminal. It looks just like a regular ssh login; I don't know if that is what is expected.
However, when I then do M-x slime-connect in aquamacs and connect to 127.0.0.1 port 4005 I get this message in aquamacs:
Lisp connection closed unexpectedly: connection broken by remote peer.
And in the ssh terminal session on the Mac to Ubuntu I see this:
channel 3: open failed: connect failed: Connection refused
I know *nothing* about ssh, or for that matter networking generally. For example, I have no idea why we need to "fool" emacs into thinking it is talking to 127.0.0.1. However, this appears to me to be an ssh problem, as a wild guess.
Any suggestions? Does the failure to connect have anything to do with ccl/swank/slime, or do I have some ssh pondering to do?
If I should be attaching some kind of log or other info that I do not know about, please let me know.
Best,
- Phil -
* Philippe Sismondi [2010-12-29 06:09] writes:
Greetings. I am attempting to connect from aquamacs emacs + slime on my Mac to a remote lisp on Ubuntu 10.10. These machines are both on my LAN.
On the Mac I am using ccl 1.6 64-bit, with the slime/swank provided by aquamacs as of yesterday. This is described on the aquamacs site as Aquamacs-slime-2010-12-28.pkg.tgz.
On Ubuntu 10.10 I am using ccl 1.7 32-bit, with yesterday's FAIRLY-STABLE slime/swank.
Some day I have to update the FAIRLY-STABLE tag. Please use HEAD in the meantime.
I followed the instructions in the slime manual to connect locally on both machines. That is, I can start ccl in a terminal, fire up a swank server, and then connect from emacs/aquamacs by means of M-x slime-connect to the server on the same machine.
On Ubuntu, I have an ssh server running. I can log in from the Mac to Ubuntu over ssh with no problems.
In a terminal on my Mac I do the incantation suggested in the slime manual p.26, i.e.
ssh -L4005:127.0.0.1:4005 david@10.0.1.6
The result of keying in the above is that I get a prompt for a password, and an apparently successful connection to the Ubuntu machine. It does open up a "visible" ssh session, i.e. I see an ubuntu prompt in my Mac terminal. It looks just like a regular ssh login; I don't know if that is what is expected.
Yes, this is expected. You can see a little more what's going with the -v flag: ssh -v -L4005:127.0.0.1:4005 david@10.0.1.6
Also typing "~#" resp. "~?" is useful for debugging.
However, when I then do M-x slime-connect in aquamacs and connect to 127.0.0.1 port 4005 I get this message in aquamacs:
Lisp connection closed unexpectedly: connection broken by remote peer.
And in the ssh terminal session on the Mac to Ubuntu I see this:
channel 3: open failed: connect failed: Connection refused
This usually means that Swank is not listening on the remote machine (Ubuntu).
On Linux, the command: netstat -tlp will list the open ports and there should be a line like:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 localhost:4005 *:* LISTEN 12522/ccl
If netstat is not available you can also use: telnet 127.0.0.1 4005 to see if you can connect.
I know *nothing* about ssh, or for that matter networking generally. For example, I have no idea why we need to "fool" emacs into thinking it is talking to 127.0.0.1.
This is just a security measure. Swank only listens for connections from the local machine an not from the whole internet. You could change that but the ssh approach works pretty well usually.
However, this appears to me to be an ssh problem, as a wild guess.
Any suggestions? Does the failure to connect have anything to do with ccl/ swank/slime, or do I have some ssh pondering to do?
More likely an ssh problem.
If I should be attaching some kind of log or other info that I do not know about, please let me know.
If you can't figure out the problem, show us the output of ssh -v and netstat.
Helmut
On 2010-12-29, at 3:17 AM, Helmut Eller wrote:
- Philippe Sismondi [2010-12-29 06:09] writes:
Greetings. I am attempting to connect from aquamacs emacs + slime on my Mac to a remote lisp on Ubuntu 10.10. These machines are both on my LAN.
On the Mac I am using ccl 1.6 64-bit, with the slime/swank provided by aquamacs as of yesterday. This is described on the aquamacs site as Aquamacs-slime-2010-12-28.pkg.tgz.
On Ubuntu 10.10 I am using ccl 1.7 32-bit, with yesterday's FAIRLY-STABLE slime/swank.
Some day I have to update the FAIRLY-STABLE tag. Please use HEAD in the meantime.
Thanks for the assistance, Helmut. I have made some progress on this.
The Ubuntu side is clearly listening, but it produces a bunch of errors when I connect from aquamacs on the Mac. I think the problem now may be a slime version mismatch between the local and server machines.
Now, when I do moM-x slime-connect on the aquamacs side, it reported a version mismatch between slime and swank. On the aquamacs side the version is 20-12-10. On the Ubuntu swank server side the version was 2007-08-16. (At this point after several hours of fiddling around I have no idea where I got that old 2007 version of slime/swank.)
I copied the Mac / aquamacs version of slime directly over to the Ubuntu side to try to make the two versions match. After doing so I encountered a problem in Ubuntu: no *slime-repl* buffer in emacs.
The 2010-12-10 version of slime from aquamacs, as well as the current HEAD and FAIRLY-STABLE versions of slime from cvs all exhibit the same problem in Ubuntu emacs, namely that slime is fired up BUT no *slime-repl* appears. The only buffers that get created are *slime-events* and *inferior-lisp*.
Is this a known problem? The emacs version on Ubuntu us gnu emacs 23.1.50.1.
So I think I need matching (or at least compatible) versions of slime/swank on both machines, but also one the works properly in general, i.e. creates the *slime-repl*.
Let me know if I should attach anything from the slime startup in Ubuntu emacs, or other info.
Best,
- Phil -
On 2010-12-29, at 11:49 AM, Philippe Sismondi wrote:
On 2010-12-29, at 3:17 AM, Helmut Eller wrote:
- Philippe Sismondi [2010-12-29 06:09] writes:
Greetings. I am attempting to connect from aquamacs emacs + slime on my Mac to a remote lisp on Ubuntu 10.10. These machines are both on my LAN.
On the Mac I am using ccl 1.6 64-bit, with the slime/swank provided by aquamacs as of yesterday. This is described on the aquamacs site as Aquamacs-slime-2010-12-28.pkg.tgz.
On Ubuntu 10.10 I am using ccl 1.7 32-bit, with yesterday's FAIRLY-STABLE slime/swank.
Some day I have to update the FAIRLY-STABLE tag. Please use HEAD in the meantime.
Thanks for the assistance, Helmut. I have made some progress on this.
<snip....>
The 2010-12-10 version of slime from aquamacs, as well as the current HEAD and FAIRLY-STABLE versions of slime from cvs all exhibit the same problem in Ubuntu emacs, namely that slime is fired up BUT no *slime-repl* appears. The only buffers that get created are *slime-events* and *inferior-lisp*.
Is this a known problem? The emacs version on Ubuntu us gnu emacs 23.1.50.1.
So I think I need matching (or at least compatible) versions of slime/swank on both machines, but also one the works properly in general, i.e. creates the *slime-repl*.
I have found a work-around to my problems that is quite satisfactory for my purposes.
The remote connect from aquamacs on my Mac to a swank server on Ubuntu works beautifully so long as the version of slime/swank is the same on both (2010-12-10 from the aquamacs distribution).
However, that version of slime does not work locally with emacs on Ubuntu. It exhibits the problem described in my earlier email, i.e. no *slime-repl* buffer.
The obvious solution is that I use the matching up-to-date slime version on both ends for the remote connection, but start emacs locally on Ubuntu with an older version of slime that works for Ubuntu emacs.
I can get along with this just fine. The only puzzling thing is why the recent versions of slime do not work properly on Ubuntu 10.10. That is perhaps for another thread, though, since my remote connection problems are solved.
Thanks for the help, Helmut.
I totally love slime. I have tried LispWorks, which I think is very good indeed. But for me, emacs+slime and ccl or sbcl are winning combinations.
Best,
- Philippe -
On Wed, 29 Dec 2010 15:56:46 -0500 Philippe Sismondi psismondi@arqux.com wrote:
I can get along with this just fine. The only puzzling thing is why the recent versions of slime do not work properly on Ubuntu 10.10. That is perhaps for another thread, though, since my remote connection problems are solved.
It is possible that a default global emacs configuration, or your ~/.emacs, configures/starts slime in a way which used to work with an older slime but which must be adapted for a new slime. Also, if you updated slime, it might be good to delete/move the old FASL files (usually in ~/.slime/fasl/) so that it rebuilds from scratch.
On 2010-12-29, at 4:35 PM, Matthew Mondor wrote:
On Wed, 29 Dec 2010 15:56:46 -0500 Philippe Sismondi psismondi@arqux.com wrote:
I can get along with this just fine. The only puzzling thing is why the recent versions of slime do not work properly on Ubuntu 10.10. That is perhaps for another thread, though, since my remote connection problems are solved.
It is possible that a default global emacs configuration, or your ~/.emacs, configures/starts slime in a way which used to work with an older slime but which must be adapted for a new slime. Also, if you updated slime, it might be good to delete/move the old FASL files (usually in ~/.slime/fasl/) so that it rebuilds from scratch
Thanks, Matthew.
I have routinely been deleting the contents of the .slime folder.
This is my .emacs file for the setup in which slime misbehaves:
(setq inferior-lisp-program "ccl") ;(add-to-list 'load-path "~/library/lisp/slime/") (add-to-list 'load-path "~/.local/share/common-lisp/source/slime") (require 'slime) (slime-setup)
The version in ~/.local/share/common-lisp/source/slime is the one that DOES NOT work properly with emacs locally in Ubuntu. The version of swank in that same directory DOES work to set up a swank server to which I connect in OS X, and is the same version as is present on OS X. You may recognize the directory as the default directory for asdf2 systems.
It is clear from the contents of the *inferior-lisp* buffer in Ubuntu emacs that this is the version of slime that is getting loaded.
Is there some other slime-specific or emacs configuration that could have an effect here? Would output from *inferiour-lisp* or *slime-events* tell us anything?
Best,
- Phil -