BrB listens fine on MRI ruby but socket immediately closed on jruby

23 views
Skip to first unread message

JP Slavinsky

unread,
Apr 5, 2012, 3:54:57 PM4/5/12
to ruby...@googlegroups.com
Howdy -

BrB looks like a great tool and I'm excited to use it.  I can get BrB to work just fine when I'm using the standard ruby interpreter ("ruby"/MRI). When I start up the service, I see that the service is listening on the socket I specified:

ruby      29263  jps    8u  IPv4 0x12669ee8      0t0  TCP localhost:6005 (LISTEN)

However, in my application I really need to start up the service inside a jruby process.  When I do this, the verbose logging output (e.g.  [BrB] Start service on brb://localhost:6005, [BrB] Service started on brb://localhost:6005) comes out like I'd expect, but the socket is immediately in a CLOSED state:

java      34272  jps   33u  IPv4 0x1d3fdb58      0t0  TCP localhost:6005 (CLOSED)

Has anyone had this issue, and if so any ideas on a solution?

Incidentally, I did already use https://github.com/jruby/jruby/wiki/FAQs to get around the fact that jruby wants to use ipv6 by default for localhost sockets.

Thanks, JP

JP Slavinsky

unread,
Apr 5, 2012, 4:57:13 PM4/5/12
to ruby...@googlegroups.com
Nevermind - I was doing something tricky with my gems and looks like I was not pulling in the java version of the eventmachine gem, and I know there are some java peculiarities with Ruby and sockets so that was probably the problem.

Guillaume Luccisano

unread,
Apr 10, 2012, 12:30:41 PM4/10/12
to ruby...@googlegroups.com
Hey JP,

Glad you find the solution by yourself.
And it's great to know that there is people using BrB out there!
It's awesome!

Hope you will build something great on it ;)

2012/4/5 JP Slavinsky <jpslavins...@gmail.com>

Vito Botta

unread,
Apr 11, 2012, 4:13:59 PM4/11/12
to ruby...@googlegroups.com
Hey Guillaume,

was reading this emails since I am still subscribed to the group, and I'd like to renew my thanks as well - I've been running a licensing system that makes use of BrB to handle ~700 clients constantly connected to the licensing server.
It's been working very well for me so far, so I thought you'd be happy to hear this :)

Merci
Vito

Guillaume Luccisano

unread,
Apr 12, 2012, 1:09:05 AM4/12/12
to ruby...@googlegroups.com
Ahaha, thanks Vito,
It's awesome to hear that!

Best,

2012/4/11 Vito Botta <ma...@vitobotta.com>
Reply all
Reply to author
Forward
0 new messages