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

瘦欲@ 提交于 2019-12-06 12:58:44

问题


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.


回答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.



来源:https://stackoverflow.com/questions/22908315/clojure-connection-issue-re-running-cider-jack-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!