[Date Prev][Date Next] [Chronological] [Thread] [Top]

ldapsearch 2.2.10: getaddrinfo failed



Hi there.

I'm trying to play with OpenLDAP v2.2.10 on my test server, but for 
some reason ldapsearch won't work.  I upgraded from 2.1.30, which 
worked fine.

Every call to ldapsearch fails with "Can't contact LDAP server".

I ran "ldapsearch -d 1" and it looks like the name resolution is 
failing:

> ldap_connect_to_host: TCP localhost:389
> ldap_connect_to_host: getaddrinfo failed: Name or service not known

This happens for any server I try and connect to, for both ldap:// 
and ldaps:// URIs.

If I specify the IP directly, ie. "ldapsearch -H ldap://127.0.0.1";, 
then it works perfectly (well, not ldaps:// of course, due to cert 
verification failure).

There doesn't appear to be any problem with name resolution on the 
box, and I explicitly added a couple of servers to /etc/hosts to see 
if it made any difference, which it didn't.

Any ideas?

Thanks very much!

Nels Lindquist <*>
----
Quidquid latine dictum sit altum viditur.

Whatever is said in Latin, sounds profound.