-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net-ldap#bind fails in jruby-9.1.0.0 (but works in jruby-9.0.5.0) #3863
Comments
Hmm, I do recall patching |
Well my one change to |
Strange...the script you provided gives me this error on 9.0.5.0:
I guess I should have confirmed that attempting to bisect :-) |
Ok, I'm not sure about the 9.0.5.0 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 9.1.1.0 and we'll try to prioritize the rework of Addrinfo and Socket. |
FWIW my |
Ok, I think I have it. Prior to 9.1 we were using Ruby 2.2 stdlib, which had different init logic for Called from 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. |
I've started a build of our nightly dist. Once complete it will be available at http://ci.jruby.org. |
Thanks @headius. Trying to confirm. I downloaded
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 |
Thanks @headius. Fix confirmed with the snapshot: Set up:
The test:
Getting "true" (or at least not an exception) is the expected result. I appreciate your rapid response. Thanks very much. |
@headius jruby 9.1.1.0-SNAPSHOT fixes the problem, but my application is still failing apparently because the .war file contains the jruby 9.1.0.0 runtime via the jruby-jars-9.1.0.0 gem. (https://rubygems.org/gems/jruby-jars/versions/9.1.0.0) There is no jruby-jars-9.1.1.0 gem yet. Anything you can suggest? Do you expect a jruby-jars-9.1.1.0 gem soon? |
The release of 9.1.1.0 will be within a week for sure. You can try to grab a snapshot from http://ci.jruby.org until then. Thanks for confirming! |
Thanks @headius! |
Environment
Expected Behavior
This is how it works under jruby-9.0.5.0:
I have many gems installed under 9.0.5.0, so haven't listed them here. For 9.1.0.0 actual (below) I installed 9.1.0.0 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.
Actual Behavior
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-9.1.0.0 on a Sun box running
5.11 11.2 sun4v spare sun4v
.The text was updated successfully, but these errors were encountered: