Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
net-ldap#bind fails in jruby-188.8.131.52 (but works in jruby-184.108.40.206) #3863
This is how it works under jruby-220.127.116.11:
I have many gems installed under 18.104.22.168, so haven't listed them here. For 22.214.171.124 actual (below) I installed 126.96.36.199 clean and added the minimal gems to replicate the problem.
Commands I used in irb are:
with LDAP server running at the address you provide, and admin user configured.
This code has been running fine on various 1.7.x versions of jruby over the past year or two.
I first saw the broken behaviour on jruby-188.8.131.52 on a Sun box running
Strange...the script you provided gives me this error on 184.108.40.206:
I guess I should have confirmed that attempting to bisect :-)
Ok, I'm not sure about the 220.127.116.11 failure, but I can reproduce your error pretty easily on 9.1:
Looks like we're just not handling options to Addrinfo properly. I will try to patch this quickly for 18.104.22.168 and we'll try to prioritize the rework of Addrinfo and Socket.
Ok, I think I have it.
Prior to 9.1 we were using Ruby 2.2 stdlib, which had different init logic for
def connect_internal(local_addrinfo, timeout=nil) # :yields: socket sock = Socket.new(self.pfamily, self.socktype, self.protocol) begin sock.ipv6only! if self.ipv6? sock.bind local_addrinfo if local_addrinfo if timeout case sock.connect_nonblock(self, exception: false) when 0 # success or EISCONN, other errors raise break when :wait_writable sock.wait_writable(timeout) or raise Errno::ETIMEDOUT, 'user specified timeout' end while true ...
I think this is simply our
Oh, silly me...the BadDescriptorException is probably because I don't have an LDAP server running locally.
I have pushed a fix in 015d17c. We were observing the
As for testing...there's a very complete set of specs in the rubysl-socket gem that I've been using for my branch, and there's tests for this very behavior in MRI's suite. We do not run either right now due to other issues, but we will soon. I did not write any additional tests for my commit.
@gregclar Would it be possible for you to verify this fixes your issue? I had some trouble getting a proper LDAP server running on my OS X machine.
Trying to confirm.
I executed ./mvnw
I got as far as this error to do with
I tried to run jruby anyway and I got:
Currently stuck and unable to confirm. (Not very familiar with this process, so might be doing plenty wrong.)
Sorry, the build that would have published last night failed. I fixed that up earlier today and there should be a fresh 9.1 binary snapshot (you should get the
This should be the URL for it: http://ci.jruby.org/snapshots/master/jruby-bin-9.1.0.0200.tar.gz
Otherwise, I'm about to start a fixed CI dist build (we had not updated dev version yet) that will be numbered
Fix confirmed with the snapshot:
Getting "true" (or at least not an exception) is the expected result.
I appreciate your rapid response. Thanks very much.
@headius jruby 22.214.171.124-SNAPSHOT fixes the problem, but my application is still failing apparently because the .war file contains the jruby 126.96.36.199 runtime via the jruby-jars-188.8.131.52 gem. (https://rubygems.org/gems/jruby-jars/versions/184.108.40.206)
There is no jruby-jars-220.127.116.11 gem yet. Anything you can suggest? Do you expect a jruby-jars-18.104.22.168 gem soon?