Does anyone know if it's possible to connect to remote nREPL when a Luminus app is deployed as a WAR on Tomcat? I haven't been able to get it working.
the nREPL should get started when the :nrepl-port
config variable is present in the environment
Thanks @yogthos the NREPL_PORT environment variable is set and I know that the app can see it (I made a route that prints the port number just to check) but when I try to connect I get an error
lein repl :connect 7001
Warning: implicit middleware found: ultra.plugin/middleware
Please declare all middleware in :middleware as implicit loading is deprecated.
Connecting to nREPL at 127.0.0.1:7001
SocketException Connection reset
java.net.SocketInputStream.read (SocketInputStream.java:210)
java.net.SocketInputStream.read (SocketInputStream.java:141)
java.io.BufferedInputStream.fill (BufferedInputStream.java:246)
java.io.BufferedInputStream.read (BufferedInputStream.java:265)
java.io.FilterInputStream.read (FilterInputStream.java:83)
java.io.PushbackInputStream.read (PushbackInputStream.java:139)
bencode.core/read-byte (core.clj:87)
bencode.core/read-byte (core.clj:-1)
bencode.core/read-token (core.clj:239)
bencode.core/read-token (core.clj:237)
bencode.core/read-bencode (core.clj:257)
bencode.core/read-bencode (core.clj:254)
Bye for now!
I think maybe Tomcat doesn't allow servlets to access ports directly, but I don't understand enough about how it works.
As another alternative, does Drawbridge work with Luminus? I tried setting it up by making a /repl route and wrapping it in the required middleware but couldn't get it working.
Luminus is amazing by the way. Would have taken me ages to piece all the libraries together. It's brilliant to have something that works right away without a ton of initial decisions to make.
hmm yeah I haven't used app servers in years myself, so it's possible that tomcat has some additional policy
drawbridge should work, but again haven't actually tried it myself
OK I'll have another go at drawbridge. Will let you know if I get it working.
👍