Fork me on GitHub
#docker
<
2022-02-23
>
zendevil.eth12:02:07

I’m running a clojure container with lein run in docker compose, and I have jvm-opts like so :jvm-opts ["-Dclojure.server.repl={:port,5555,:accept,clojure.core.server/repl}"] in project.clj. I’m trying to connec to the socket repl in atom using chlorine. But when I specify localhost and port 5555 I get the following:

REPL not connected
Connection refused. Ensure that you have a Socket REPL started on this host/port
How do I fix this error?

xsc13:02:21

Check out this answer: https://stackoverflow.com/questions/36813690/connection-refused-on-docker-container It might have to do more with Docker than Clojure, so make sure you try the things described there first. 🙂

Carsten Behring13:02:41

It could indeed be that the "host" need to be set to "0.0.0.0" so

lein repl :start :host 0.0.0.0 :port 12345

Carsten Behring13:02:17

Maybe :

:jvm-opts ["-Dclojure.server.repl={:port,5555,:address "0.0.0.0" ,:accept,clojure.core.server/repl}"]

zendevil.eth12:02:19

getting a similar error when trying to connect with clover on vscode

zendevil.eth12:02:47

REPL not connected: Unknown error while connecting to the REPL: -61

zendevil.eth12:02:08

doesn’t seem to work on nvim either