Fork me on GitHub
#calva
<
2023-01-18
>
Asher Serling20:01:54

I'm trying to connect to an nrepl running on an ec2 instance, but i get an error ; No nrepl port file found. how do i solve this?

pez21:01:48

Can you share a bit more details of what you are trying to do?

Asher Serling21:01:03

i'm running a luminus project

Asher Serling21:01:24

i added an NREPL_PORT environment variable so that on start up, an nrepl server is started

Asher Serling21:01:36

i am trying to connect calva to that running nrepl server

Asher Serling21:01:00

the port nrepl is listening on is open for my local ip address

pez21:01:12

Can you connect to it using lein repl :connect <host>:<port> from the terminal?

pez21:01:01

I'm curious about the error message you get. Can you describe the steps you take to connect?

Asher Serling21:01:12

i was not able to connect with lein repl etc

Asher Serling21:01:06

The steps that I take are 1) run connect to running repl from the command pallet 2) select 'leiningen' option 3) fill in ip and port in form dialog

pez21:01:16

I see. The message that there is no nrep-port file is not an error, it's information meant to explain why there is no port pre-filled in the connect dialog. Maybe not the best message, especially when the connect fails, but anyway.

pez22:01:00

If you can't connect using lein, that means there is something wrong with how the nrepl server port is shared. Could be that the server binds it to 127.0.0.1, which is localhost/loopback and only works from the machine. Binding to 0.0.0.0 should work much better.

pez22:01:55

How are you starting the server? Leiningen or shadow-cljs command line?

pez22:01:41

Try adding :bind "0.0.0.0" to the map where you give it the nrepl port.

Asher Serling08:01:31

I shut down the instance, but next time I spin one up I'll try this