简体   繁体   English

Clojure-连接问题重新运行苹果酒-千斤顶

[英]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. 我最近开始在Emacs 24下使用CIDER。我的工作流程包括通过Tramp转到远程服务器,然后执行cider-jack-in以在该服务器上运行连接到Clojure的nREPL服务器。 It all works fine if I run it in a fresh instance of Emacs. 如果我在Emacs的新实例中运行它,则一切正常。 But if for some reason the connection is broken or I hibernate the system, I am unable to relaunch the REPL. 但是,如果由于某种原因连接中断或我使系统进入休眠状态,则无法重新启动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? 是否有一种简单的方法可以完全释放以前使用的端口和/或强制CIDER尝试使用其他端口? Maybe you have other suggestions for using CIDER for remote work. 也许您还有其他建议使用CIDER进行远程工作。 Any help greatly appreciated. 任何帮助,不胜感激。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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