(Answer) (Category) OpenLDAP Faq-O-Matic : (Category) OpenLDAP Software FAQ : (Category) Installation : (Category) Platform Hints : (Category) Hewlett Packard HP-UX : (Answer) "Can't contact LDAP server (81)"
When built on HP-UX 11i, only hostnames that are defined in /etc/hosts work. Even though the host is configured to use DNS, you'll be unable to resolve any remote hostnames. The result from the ldap clients is the above error message.

Turning up the debug levels will show this message:

ldap_connect_to_host: getaddrinfo failed: host nor service provided, or not known

The problem is that the HP-UX 11i libc provides the getaddrinfo() function, but it isn't fully implemented. The OpenLDAP configure script looks for getaddrinfo() and uses it in preference to the traditional gethostbyname() function because getaddrinfo() is supposed to support both IPv4 and the new IPv6. However, unless you've installed the IPv6 patch from HP, this function is broken. The quick workaround is to set the environment variable

ac_cv_func_getaddrinfo=no

and rerun configure, to force OpenLDAP to ignore this function and use the standard gethostbyname() function instead. If you want to install the IPv6 patch from HP, read the release notes first, which includes the URL where the software patch is located.

Note that this problem won't appear on HP-UX 11.00 because that version doesn't provide getaddrinfo() at all.
hyc@openldap.org

[Append to This Answer]
Previous: (Answer) undeclared h_errno errors
Next: (Answer) /usr/ccs/bin/ld: Unrecognized argument: +init
This document is: http://www.openldap.org/faq/index.cgi?file=778
[Search] [Appearance]
This is a Faq-O-Matic 2.721.test.
© Copyright 1998-2013, OpenLDAP Foundation, info@OpenLDAP.org