问题
I'm using LDAP to authenticate to our database, via the net ldap gem under active ldap. It works great from my local system, and when I run it in a console, but when I roll my app out to production, eventually it starts throwing this error:
invalid response-type in search: 24
vendor/bundle/ruby/1.9.1/gems/net-ldap-0.2.2/lib/net/ldap.rb:1418:in `block in search
Has anyone seen this error before? It seems like its simply the connection getting stale in some fashion - I have multiple web heads, and it will fail on one but not the others, and a simple restart of the app makes it go away -- temporarily. Then it comes back. Any ideas? I can't even figure out what response-type 24 is.
回答1:
So, interestingly (And this isn't a TOTAL solution), if I switch net-ldap out with ruby-ldap this problem disappears. I have no idea why.
来源:https://stackoverflow.com/questions/9621930/net-ldap-gem-in-ruby-invalid-response-type-in-search-24