-
-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error in process filter: [nREPL] Direct connection failed #1945
Comments
We'll definitely improve those messages. As for the nREPL's behaviour - seems to me that it listens on |
The real fix is within tools.nrepl, as @bbatsov has pointed out. The trick is to bind the socket to the anylocal address https://docs.oracle.com/javase/8/docs/technotes/guides/net/ipv6_guide/ |
Great! Hopefully @cemerick will have time to apply your patch and issue a new release. |
As a workaround, |
This should make it easier for people to figure out what's going on.
I've updated the connection messages. Maybe we should add this workaround to the global lein options in cider for the time being, as I doubt the nREPL patch would be merged any time soon. |
@benedekfazekas do you know if we can pass this as a command line option to |
should be possible, yes. with
so something like really busy but I might have time to give this a go over the weekend |
I was just looking into this myself and found what I needed. In I'll likely just add those to the default commands. Seems like an overkill to add defcustoms for them. |
@hanshuebner sorry for the noob question but how would one go about adding :repl-options {:host "::"} to their user profile |
This blog post has an overview of leiningen profiles. |
Thank you, this hint was super helpful. |
M-x cider-jack-in
fails to successfully connect to the leiningen subprocess in some cases. I have been seeing this issue in a long time, on various machines and with a number of cider versions. Sometimes, retrying theM-x cider-jack-in
one or a few times helped. Recently, when I was annoyed by this again, I tried to figure out what the problem could be by runningtelnet localhost <the-port-number>
and found that telnet tried to connect to::1
(ipv6 localhost), getting a "connection refused" message. When I usedtelnet 127.0.0.1 <the-port-number>
however, the connection was accepted. It seems that the nrepl server only listens on ipv4 (maybe by using an explicit127.0.0.1
address to listen on), but cider useslocalhost
as host name to connect. Thus, it depends on the local systems' interpretation and name resolution configuration what address cider tries to connect to.Bozhidar made the very good suggestion that the message could be improved to include information as to what connection actually failed. Something like
[nREPL] could not connect to localhost:12345
would already give a hin in what direction one could investigate.The connection between cider and the nrepl server should use the same host specification, I think. Thus, if nrepl listens on
127.0.0.1
by default, cider should also use127.0.0.1
and notlocalhost
to avoid mismatches caused by name resolution.The text was updated successfully, but these errors were encountered: