3

So, I am using

sbcl --dynamic-space-size 1024 \
     --noinform \
     --load $HOME/quicklisp/setup.lisp \
     --eval '(ql:quickload :myapp)' \
     --eval "(sb-ext:save-lisp-and-die \"myapp\" :toplevel #'myapp::main :executable t :compression t)"

to generate myapp locally, and uploading the resulting binary to the server.

The function myapp:main executes the following (along with several other initialization things for the server) as pointed here:

(bt:make-thread (lambda () (swank:create-server :port swank-port ; consider it to be 8080
                                                :dont-close t)))

I also do the port forwarding on my local machine:

ssh -L8080:127.0.0.1:8080 user@remote

I can slime-connect to it, when myapp is run on my local machine, with me connecting to it from the same machine.


However, when I try to slime-connect to localhost, 8080 on my local machine, with myapp running on remote, I get the error as

Can't locate module: SWANK-IO-PACKAGE::SWANK-TRACE-DIALOG
   [Condition of type SIMPLE-ERROR]

Restarts:
 0: [*ABORT] Return to SLIME's top level.
 1: [ABORT] abort thread (#<THREAD "worker" RUNNING {1005B6EB73}>)
  1. If I choose [*ABORT], emacs gives me error in process filter: No catch for tag: slime-result-2-212, (error "Synchronous Lisp Evaluation aborted") (in the minibuffer), with no SLIME REPL.

  2. Choosing [ABORT] also gives the almost same error in process filter: Synchronous Lisp Evaluation aborted.

Also, if I try to evaluate something in the frame, too, I get the error in process filter: Invalid message protocol.

PS: I am using AWS, in case the details about Security Groups are relevant.

digikar
  • 576
  • 5
  • 13
  • 1
    Does the "myapp" system depends on swank? also compiling on one machine and executing it on another can be risky if your versions differ. Could you run "quickload" on the server? – coredump Sep 23 '19 at 11:42
  • 1
    Apologies for not mentioning. Yup, `:swank` is included in `asd` file. And yes, the versions are the same too. While technically, I can set up an environment on the server, I'd want to try doing without it. No, quickload (or any lisp) hasn't been set up on the remote. – digikar Sep 23 '19 at 16:58
  • 2
    Also, one solution has been found [here](https://www.reddit.com/r/lisp/comments/d80dk5/error_while_connecting_to_remote_swank/f177wqw?utm_source=share&utm_medium=web2x): run `(swank-loader:init :load-contribs t)` before dumping the core. I do wonder whether doing so has always been the case. Are there use cases for `slime-connect` in cases other than emergency? (This would be my first time putting something up on the server, so I lack the experience to comment on really how powerful/useful this facility is.) – digikar Sep 23 '19 at 17:01

0 Answers0