简体   繁体   中英

Clojure - connection issue re-running cider-jack-in

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.

如果repl仍从先前的cider-jack-in ,则应使用cider命令连接到正在运行的实例,或者在启动新实例之前停止先前的实例。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM