Clojure - 连接问题重新运行Cider-jack-in [英] Clojure - connection issue re-running cider-jack-in

查看:285
本文介绍了Clojure - 连接问题重新运行Cider-jack-in的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始在Emacs 24下使用CIDER。我的工作流程涉及通过Tramp到远程服务器,然后执行 cider-jack-in ,运行 nREPL 连接到该服务器上的Clojure的服务器。如果我在一个新的Emacs实例运行它一切正常。但如果由于某种原因连接断开或我休眠系统,我无法重新启动REPL。我收到以下消息:

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

我怀疑它与前一个实例仍然占用的连接端口有关,特别是因为新的连接尝试是在相同的端口号。有没有简单的方法释放以前使用的端口一起和/或强制CIDER尝试在不同的端口?也许你有其他建议使用CIDER远程工作。任何帮助非常感激。

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- ,您应该使用 cider 命令连接到正在运行的实例,或者在启动新实例之前停止上一个。

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.

这篇关于Clojure - 连接问题重新运行Cider-jack-in的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆