Justin Taft - Home / Posts

Using Emac’s Cider with Docker

If running cider-connect-cljs returns the following error:

[nREPL] Establishing direct connection to 127.0.0.1:9999 …
 [nREPL] Direct connection to 127.0.0.1:9999 established
 [nREPL] Connection closed unexpectedly (connection broken by remote peer)
 nrepl-send-sync-request: Sync nREPL request timed out (op clone id 1)

It means the port is open, but nrepl is failing to respond.

Ensure nREPL is listening on the right port and address. Where your project is running, do netstat -nl. If nrepl is bound to 127.0.0.1 in a docker container, update it to 0.0.0.0.

 :nrepl {:host "0.0.0.0" :port 9999 :middleware[]}

Leave a Reply

Your email address will not be published. Required fields are marked *