Clojure - connection issue re-running cider-jack-in
Asked Answered
B

1

1

I recently started using CIDER under Emacs 24. My workflow involves going to a remote server via Tramp and then executing cider-jack-in to run the nREPL server connected to Clojure on that server. It all works fine if I run it in a fresh instance of Emacs. But if for some reason the connection is broken or I hibernate the system, I am unable to relaunch the REPL. I get the following message:

Connecting to nREPL on localhost:58062...
error in process filter: open-network-stream: make client process failed: connection refused, :name, nrepl, :buffer, *nrepl-connection clojure-koans*<3>, :host, localhost, :service, 58062, :nowait, nil
error in process filter: make client process failed: connection refused, :name, nrepl, :buffer, *nrepl-connection clojure-koans*<3>, :host, localhost, :service, 58062, :nowait, nil

I suspect it has something to do with the connection port being still held up by the previous instance, especially since the new connection attempt is on the same port number. Is there a simple way to free the previously used port altogether and/or force CIDER to attempt on a different port? Maybe you have other suggestions for using CIDER for remote work. Any help greatly appreciated.

Blaseio answered 7/4, 2014 at 9:21 Comment(0)
P
1

If the repl is still running from the previous cider-jack-in, you should either use the cidercommand to connect to the running instance, or stop the previous before starting a new one.

Posy answered 7/4, 2014 at 19:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.