LDAP startup and ldapsearch take a long time to complete.

Document ID : KB000020114
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

LDAP starts up via the slapd binary and the LDAP stderr file can show a delay of around 12 minutes. This can occur when setup of the slapd.conf file has left the hostname empty in the hosturls parameter. For example... hosturls ldap://:389. In this instance the host name would default to localhost. When running an ldapsearch request and not specifying a host in this situation can cause a 4 to 5 minute delay. Both thesedelays are caused by localhost not being resolved to an IP address.

Solution:

The following things can be done to resolve this.

  1. Modify the /etc/hosts file on the IBM Unix file system to add an entry: 127.0.0.1 localhost

  2. If this is still slow on LDAP startup, change the slapd.conf file to include the hostname.

    i.e. instead of hosturls ldap://:389, it should be hosturls ldap://hostname:389.

  3. If this is still slow on an LDAPSEARCH, make sure either the -h or -H option is specified, otherwise localhost is used.