[英]`cider-jack-in' aborts with 'Protocol family unavailable'
When I run cider-jack-in
I get a SocketException
with Protocol family unavailable
as the exception message. 当我运行
cider-jack-in
我得到一个SocketException
其中Protocol family unavailable
可用作异常消息。
lein repl
runs fine on the command line. lein repl
在命令行上运行正常。
I've web-searched and found no matches containing both 'cider' and 'SocketException', which is always worrying. 我进行了网络搜索,发现没有包含'cider'和'SocketException'的匹配,这总是令人担忧。 Nothing obvious came up in a search of the github project nor in the list of possibly-related questions presented here by StackOverflow as I'm writing this.
在我写这篇文章的过程中,在搜索github项目时,以及StackOverflow在此处提供的可能相关问题列表中都没有显而易见的事情。
I get the same error whether I have a project file loaded or not. 无论是否加载了项目文件,我都会得到同样的错误。
My Emacs session tends to be extremely long-running (months) but I've checked and the problem still recurs identically after a restart. 我的Emacs会话往往是非常长时间运行(几个月),但我已经检查过,重启后问题仍然相同。
Things I thought of that might be at play but I think I can discount: 我想到的事情可能在起作用,但我想我可以打折:
AFAIK no hosts on the subnet (this host among them) have IPv6 configured on any interface. AFAIK子网上没有主机(其中的主机)在任何接口上都配置了IPv6。
This Emacs is running on the same host as a Squid proxy server, but (getenv "no_proxy")
returns a comma-delimited string that includes both localhost
and 127.0.0.0/16
, so no connection to the proxy server should be requested as part of connecting to an nrepl
server on the same host. 此Emacs与Squid代理服务器在同一主机上运行,但
(getenv "no_proxy")
返回逗号分隔的字符串,其中包含localhost
和127.0.0.0/16
,因此不应请求与代理服务器的连接作为部分连接到同一主机上的nrepl
服务器。
This host has a heavily customized /etc/hosts
file, but no IPv6 address mappings are enabled. 此主机具有大量自定义的
/etc/hosts
文件,但未启用IPv6地址映射。
In other words it should be a "pure" IPv4 host. 换句话说,它应该是一个“纯粹的”IPv4主机。
emacs-version
: 24.5.1 emacs-version
:24.5.1
cider-version
: 0.15.1-snapshot cider-version
:0.15.1快照
OS: Linux this-host 4.8.0-2-amd64 #1 SMP Debian 4.8.11-1 (2016-12-02) x86_64 GNU/Linux 操作系统:Linux本主机4.8.0-2-amd64#1 SMP Debian 4.8.11-1(2016-12-02)x86_64 GNU / Linux
Stack trace header: 堆栈跟踪头:
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Exception in thread "main" java.net.SocketException: Protocol family unavailable, compiling:(/tmp/form-init7765774181037314573.clj:1:73)
What's wrong? 怎么了?
I doubt that cider knows or cares whether your system is purely ipv4; 我怀疑苹果酒是否知道或关心你的系统是否纯粹是ipv4; it still seems to default to attempting use ipv6, shown in cider's startup messaging as
lein ... repl ... :host ::
(the ::
being ipv6 equivalent notation to localhost). 它似乎仍然默认尝试使用IPv6,苹果酒的启动消息显示为
lein ... repl ... :host ::
(该::
是的IPv6相当于符号为localhost)。 For my situation, it was simple enough to just enable ipv6 on my system, but you could instead follow suggestions in this issue to set cider-lein-parameters
to repl :headless :host localhost
. 对于我的情况,在我的系统上启用ipv6很简单,但你可以按照这个问题中的建议来设置
cider-lein-parameters
to repl :headless :host localhost
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.