What are port requirements for remote lisp?

Pascal Bourguignon pjb at informatimago.com
Tue Mar 31 01:34:30 UTC 2020



> On 31 Mar 2020, at 03:16, Mirko Vukovic <mirko.vukovic at gmail.com> wrote:
> 
> Hello,
> 
> My setup is Sly on Spacemacs with Windows 10 running remote lisp on Linux over a corporate network. I have not found a Sly mailing list, and I hope I can get an answer here.
> 
> Emacs is running Sly on Spacemacs on Windows 10. Lisp is running on a Linux server. But Sly does not connect to the listening Lisp. Corporate network security policies have changed. I can ask for IT to accommodate me, but first I need to know what to ask for.


> So far, I have opened a tunnel, and started a listening lisp (details below). 
> 
> In Emacs I get:
> 
> sly-connect RET RET RET
> [sly] Connecting to Slynk on port 4005..
> helm-M-x-execute-command: make client process failed: Connection timed out, :name, sly-9, :buffer, nil, :host, hal9000, :service, 4005, :nowait, nil, :tls-parameters, nil
>  
> The session transcript:
> > ssh -L4005:localhost:4005 mirko at hal9000
> 
> [mirko at hal9000 .roswell]$ ros -L ccl-bin run --load start-slynk-server.lisp
> 
>  Added SLYNK path to ASDF:*CENTRAL-REGISTRY*
> SLYNK's ASDF loader finished.
>  Loaded ASDF system
> ;; Slynk started at port: 4005.
> 
>  Created SLYNK server on port 4005
>  Set *USE-DEDICATED-OUTPUT-STREAM* to NIL
> Clozure Common Lisp Version 1.11.5/v1.11.5  (LinuxX8664)
> 
> For more information about CCL, please see http://ccl.clozure.com <http://ccl.clozure.com/>.
> 
> CCL is free software.  It is distributed under the terms of the Apache
> Licence, Version 2.0.
> ?
> 
> My question is as follows:
> Do I need bi-directional traffic on 4005?

I don’t know if sly has changed anything, but with slime, you can use the port you want. 4005 is only the default port for slime.
And yes, the traffic is bi-directional, but since you will wrap it in a ssh tunnel, even if it wasn’t bi-directionnal, the protocols used by ssh are bi-directional.


> Do I need bi-directional traffic on 22? (after recent changes I cannot ssh or scp into my Windows machine)

Of course. Definitely.


> What tools can I use to try to narrow down the cause of the problem? For instance, can I send a command to the lisp image, and see its effects on the lisp side?

You may use WireShark as the definite tool to watch what transits on the network, as long as you have the rights to do it, and the system or drivers allow it.

Apparently the port 22 to your linux box is open since you can connect to it with ssh.
On the other hand, it’s possible that the port 4005 is blocked.  You may ask your IT to open it, or whether there is a port or range already open that you could use instead of 4005.

If you want to test it, you could for example disable the web server on your linux box, and use the port 80, since it’s very probable that this port open. You can check it with your web browser http://hal9000 <http://hal9000/> (if you have a web server running on your linux box).

Then you will be able to use:  ssh -L4005:localhost:80 mirko at hal9000
to establish the tunnel.  If this works, you will have confirmed that the problem is that the port 4005 is blocked, and will be able to ask confidently that they open it.

-- 
__Pascal J. Bourguignon__




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20200331/156f54ce/attachment.htm>


More information about the slime-devel mailing list