docker

gonewest818 2017-09-20T20:56:38.000208Z

@staypufd I’m trying to quickly add nrepl server to that project.

staypufd 2017-09-20T21:11:48.000254Z

thanks

staypufd 2017-09-20T21:12:05.000463Z

do you happen to be running DockerMac?

staypufd 2017-09-20T21:12:09.000480Z

that’s what I’m running

staypufd 2017-09-20T21:13:09.000345Z

not that I won’t want to see yours if you don’t but I’m wondering it that may be part of it

gonewest818 2017-09-20T21:27:06.000361Z

Yes, I am using docker on a mac.

staypufd 2017-09-20T21:39:28.000157Z

@gonewest818 Great

gonewest818 2017-09-20T21:53:53.000323Z

ok, well, I’ve duplicated your ‘Exception in thread “main” java.net.SocketException: Protocol family unavailable’

staypufd 2017-09-20T22:09:34.000032Z

darn

staypufd 2017-09-20T22:09:36.000358Z

😉

staypufd 2017-09-20T22:09:46.000077Z

but at least it isn’t just me

staypufd 2017-09-20T22:09:47.000182Z

😉

gonewest818 2017-09-20T22:13:58.000020Z

are you using tools.nrepl 0.2.13? because in the changelog it says “start-server now binds to :: by default, and falls back to localhost, avoiding confusion when working in environments that have both IPv4 and IPv6 networking available. (NREPL-83)”

gonewest818 2017-09-20T22:14:26.000236Z

in alpine linux I don’t think ipv6 is enabled by default. in my case I got the socketexception to go away by doing this

gonewest818 2017-09-20T22:14:39.000134Z

(start-server :port 7000 :bind "localhost")

gonewest818 2017-09-20T22:16:56.000113Z

if that works for you, it suggests the part where they say “falls back to localhost” isn’t actually happening.

gonewest818 2017-09-20T22:20:11.000072Z

I mean, the socketexception isn’t being caught in tools.nrepl, right, so my hunch is the unhandled exception is why the fallback to “localhost” never occurs.

gonewest818 2017-09-20T22:21:23.000262Z

I suppose the other route would be to enable ipv6 in alpine, but that’s up to you. Either way, would be interested to see if this is your issue.

gonewest818 2017-09-20T22:43:37.000172Z

Correction: to actually connect to the repl I needed to (start-server :port 7000 :bind "0.0.0.0")

gonewest818 2017-09-20T23:19:33.000043Z

changes pushed to github if you want to see https://github.com/gonewest818/benchcurl