I’m trying to figure out how to search an LDAP server. I can connect and
I
see searches pass by if I sniff on the network interface. But the search
command never stops, even tough I limit it to 1 second. (Can I limit the
search to 1 result?)
This keeps running forever instead of for 1 second…
Any ideas on how to solve that? I see a right result coming over the
network
interface so the program can stop!
Right the error is in the details. I used DC in the query instead of dc.
The
server responded with some other servers to choose from, some of which
did
not exist. So the program took forever trying to query those servers…
(I don’t know whether it’s useful if I report this situation to the LDAP
module author?)
After some time the system stops:
ruby myprogram.rb
myprogram:8:in `search’: Operations error (LDAP::ResultError)
from myprogram.rb:8
But that error is nowhere explained. Is there something wrong with my
connection? The server is an Active Directory server, can that make a
difference?
Right the error is in the details. I used DC in the query instead of dc.
The server responded with some other servers to choose from, some of which
did not exist. So the program took forever trying to query those
servers…
Yesterday I tried Net::LDAP and it worked even with a capital DC in the
search base. Net::LDAP seems to have a cleaner interface so perhaps I’ll
switch the system over, performance does not seem to be an issue either.
Bart
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.