Getting started with SLIME and SWANK: Lisp connection closed unexpectedly: connection broken by remote peer
Asked Answered
J

4

10

I was trying to use the slime-connect function to get access to a remote server with sbcl. I followed all the steps from the slime.mov movie from Marco Baringer, but I got stuck when creating the ssh connection for slime. This is after already starting the swank server on the remote machine. I did it like this:

ssh -L 4005:127.0.0.1:4005 [email protected]

And I got this errors, on local SLIME:

Lisp connection closed unexpectedly: connection broken by remote peer

...and on the remote server:

channel 3: open failed: connect failed: Connection refused

What could possibly be wrong?

Jueta answered 16/12, 2008 at 21:15 Comment(1)
Thanks all for your answers, slime-connect was not working for me so I put this on hold and instead installed emacs on the server so I just SLIME there. But then again, classes have started so I'm not currently doing any Common Lisp development.Jueta
L
4

Have you checked that the version of SLIME and SWANK you use are the same? I've had odd things happening when I've used mismatched versions of those two halves of a SLIME session.

Lh answered 30/1, 2009 at 9:25 Comment(0)
L
2

I don't know, but you can try to connect to swank on remote machine locally.

ssh [email protected]
telnet 127.0.0.1:4005

May be there you will find errors. Also you can try localhost:4005 instead of 127.0.0.1 and check if localhost interface is properly configured.

Likable answered 21/12, 2008 at 16:44 Comment(0)
L
2

The easiest thing to miss is the tcp port the swank server listens on. I haven't been doing a lot of remote development lately, but I remember that the first times I did, I had a bit of trouble understanding how to tell swank which port to bind, or to find out which one it picked.

Would you mind expanding on how you actually started the swank server?

Lelandleler answered 5/1, 2009 at 16:54 Comment(0)
I
0

For me the problem was that the slime (v2.22) function from Emacs started with additional argument from-emacs t which swank-loader.lisp didn't support (v2.22).

What worked for me is editing of slime-v2.22/swank-loader.lisp:init to accept one new argument from-emacs which isn't used of cause in the function's body, because I don't know in what way this argument should be treated. But slime starts now fine and workable.

Also while starting slime I receive a warning about incompatible versions: slime v2.23 and swank v2.22, but as I checked with list-packages and simply by folder names -- I have slime and swank both of versions v2.22. That's a confusion for me right now.

If somebody knows details about it, please, comment.

I answered 27/1, 2019 at 11:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.