Hello, i`ve installed wsl and put my clojure program inside it. Problem is i cannot access nrepl from windows, but i can access API, open website etc. Anyone dealt with problem like that? I tried opening nrepl with emacs and cursive. Inside wsl nrepl port can be reached by curl
@kostyantinsemer wsl or wsl2?
wsl2, sorry
@kostyantinsemer I'm not entirely sure, but I have some info here: https://blog.michielborkent.nl/2020/07/26/remote-wsl2-clojure/ I use the script suggested in this issue for all things ports and firewall: https://github.com/microsoft/WSL/issues/4150#issuecomment-504209723
Thanks, ill look into using emacs from within wsl itself
@kostyantinsemer @bozhidar also wrote a blog post on this
@kostyantinsemer I'm running Emacs on WSL2 as well, so it's pretty straightforward for me.
I'm assuming that if you can't access nREPL outside of the container it's probably getting bound to localhost instead of the public address of the VM.
Thanks, ill look into that. Yeah i did lookup with netstat, repl is sitting at designated port
You might need to tell nREPL to bind to 0.0.0.0 instead of the default 127.0.0.1? I seem to remember someone running into something like that... (I don't use lein
or nREPL so I may be off-base).
Thanks, that was the case.