clojure-jack-in 启动出错
出错信息如下:
Connecting to Swank on port 65280.. [2 times]error in process filter: open-network-stream: make client process failed: Connection refused, :name, SLIME Lisp, :buffer, nil, :host, localhost, :service, 65280, :nowait, nil
error in process filter: make client process failed: Connection refused, :name, SLIME Lisp, :buffer, nil, :host, localhost, :service, 65280, :nowait, nil
解决办法如下:
My hostname was
set to "localhost" which is why the underlying dns lookup was returning the actual interface,
not the loopback. Here's the fix:
localhost:~ amitava$ sudo scutil --set HostName amitava.local amitava:~ amitava$ scutil --get HostName amitava.local amitava:~ amitava$ clj Clojure 1.3.0 user=> (import 'java.net.InetAddress) java.net.InetAddress user=> (InetAddress/getByName "localhost") #<Inet4Address localhost/127.0.0.1> user=>
详细见:
https://github.com/technomancy/swank-clojure/issues/68
本文解决了一个 Clojure Jack-in 启动时遇到的连接错误问题,该问题由于主机名设置为 'localhost' 导致 DNS 解析返回实际网络接口而非回环地址。通过将主机名更改为具体的主机名(如 amitava.local),解决了连接被拒绝的问题。
233

被折叠的 条评论
为什么被折叠?



