This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-23
Channels
- # announcements (4)
- # bangalore-clj (1)
- # beginners (56)
- # cider (24)
- # clojure (71)
- # clojure-dev (21)
- # clojure-nl (2)
- # clojure-russia (1)
- # clojure-spec (5)
- # clojure-uk (10)
- # clojured (8)
- # core-logic (18)
- # cursive (6)
- # data-science (15)
- # duct (1)
- # figwheel-main (4)
- # fulcro (6)
- # graphql (2)
- # luminus (4)
- # nrepl (9)
- # off-topic (10)
- # pathom (10)
- # pedestal (3)
- # re-frame (10)
- # ring-swagger (1)
- # shadow-cljs (19)
- # vim (35)
trying to connect to an nrepl inside a docker container on a remote server. in docker i expose the nrepl (port 65432
) to the host. then i ssh to the host with port forwarding:
ssh -vNL 40000:localhost:65432 my-remote-host
i verify there's a connection (at least i think this means it worked)
nc -vv localhost 40000
found 0 associations
found 1 connections:
1: flags=82<CONNECTED,PREFERRED>
outif lo0
src ::1 port 65316
dst ::1 port 40000
rank info not available
TCP aux info available
Connection to localhost port 40000 [tcp/safetynetp] succeeded!
then try to connect a repl client:
lein repl :connect localhost:40000
Warning: implicit middleware found: cider-nrepl.plugin/middleware
Please declare all middleware in :middleware as implicit loading is deprecated.
Connecting to nREPL at localhost:40000
SocketException The transport's socket appears to have lost its connection to the nR
EPL server
nrepl.transport/bencode/fn--5187/fn--5188 (transport.clj:95)
nrepl.transport/bencode/fn--5187 (transport.clj:95)
nrepl.transport/fn-transport/fn--5159 (transport.clj:42)
clojure.core/binding-conveyor-fn/fn--4676 (core.clj:1938)
java.util.concurrent.FutureTask.run (FutureTask.java:264)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1
128)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:
628)
java.lang.Thread.run (Thread.java:834)
Bye for now!
logs from ssh tunnel:
debug1: Connection to port 40000 forwarding to localhos
t port 65432 requested.
debug2: fd 8 setting TCP_NODELAY
debug1: channel 3: new [direct-tcpip]
debug2: channel 3: open confirm rwindow 2097152 rmax 32
768
debug2: channel 3: rcvd eof
debug2: channel 3: output open -> drain
debug2: channel 3: obuf empty
debug2: channel 3: chan_shutdown_write (i0 o1 sock 8 wf
d 8 efd -1 [closed])
debug2: channel 3: output drain -> closed
debug2: channel 3: read<=0 rfd 8 len 0
debug2: channel 3: read failed
debug2: channel 3: chan_shutdown_read (i0 o3 sock 8 wfd
8 efd -1 [closed])
debug2: channel 3: input open -> drain
debug2: channel 3: ibuf empty
debug2: channel 3: send eof
debug2: channel 3: input drain -> closed
debug2: channel 3: send close
debug2: channel 3: rcvd close
debug2: channel 3: is dead
debug2: channel 3: garbage collecting
debug1: channel 3: free: direct-tcpip: listening port 4
0000 for localhost port 65432, connect from 127.0.0.1 p
ort 49790 to 127.0.0.1 port 40000, nchannels 4
any ideas?macos locally. ubuntu 16.04 on the server tried 127.0.0.1 - same problem i'm starting the nrepl like:
(nrepl/start-server :port nrepl-port :bind "localhost")