Skip to content

calva/vscode wrongly assumes nrepl started at ::1 (ipv6) #2310

Open
@birdspider

Description

@birdspider

not sure if its my system/system-update but:

description

calva jack-in fails to connect (ECONNREFUSED).

I think because vscode chooses/returns localhost as ipv6 ::1 (maybe in addition to 127.0.0.1).

However, nrepl.cmdline seems not to be started with ipv6 bindings (see below)

calva repl log:

; Starting Jack-in Terminal: pushd [snip]; clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,"1.0.0"},cider/cider-nrepl {:mvn/version,"0.37.1"}}}' -M -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ; popd
; Using host:port localhost:42907 ...
; Hooking up nREPL sessions ...
; nREPL connection failed: Error: connect ECONNREFUSED ::1:42907
; Failed connecting.

I do not know what changed - that makes vscode/calva use ::1 - it's not required for me/my case.

manual setup works

see param -b, with 0.0.0.0 it should bind to any local address, hence connecting when starting like this, works:

clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,"1.0.0"},cider/cider-nrepl {:mvn/version,"0.37.1"}}}' -M -m nrepl.cmdline -b "0.0.0.0" --middleware "[cider.nrepl/cider-middleware]" 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions