Bugs: Browse | Submit New | Admin

[#22571] Use of "timeout" in Server.socket appears to reliably kill Net::LDAP

Date:
2008-10-27 07:52
Priority:
3
Submitted By:
Luke Burton (hagus)
Assigned To:
Mike Perham (mperham)
Category:
memcache-client
State:
Open
Summary:
Use of "timeout" in Server.socket appears to reliably kill Net::LDAP

Detailed description
Under memcache-client-1.5.0 and ruby-net-ldap 0.4:

#!/usr/bin/ruby

require 'rubygems'
require 'net/ldap'
require 'memcache'

CACHE = MemCache.new 'localhost:11211'
puts CACHE.get('foo')

ldap = Net::LDAP.new(:host => "ldap.columbia.edu", :port => 389)
f = Net::LDAP::Filter.eq("sn", "Altshuler")
res = ldap.search(:filter => f)
puts res

This will always die with the following error:
/Library/Ruby/Gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap.rb:1104:in `bind': no bind result (Net::LDAP::LdapError)
	from /Library/Ruby/Gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap.rb:639:in `search'
	from /Users/hagus/Desktop/memcache-test.rb:14

It appears that after Server#socket has done its thing in memcache.rb, future attempts to open a socket get hosed in
some subtle fashion. Unfortunately it's 1 am and I've no time to debug further.

To resolve this, I basically just ripped out the use of "timeout" from Server#socket. I'm not sure what the
ramifications of this are, but at least I'm up and running.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2009-02-22 00:27
Sender: Mark Lussier

did you ever find out what the root cause was.. Walked into this
issue today myself

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
assigned_todrbrain2009-03-31 00:03zenspider
summaryUse of "timeout" in Server.socket appears to reliably kill Net::LDAP2009-03-31 00:03zenspider