1

I am trying to configure and install an ldap server following this guide. I am stuck on step 6, make test. it fails on the first test with the following message:

cd tests; make test
make[1]: Entering directory `/home/anauser/LDAP_dir/openldap-2.4.37/tests'
make[2]: Entering directory `/home/anauser/LDAP_dir/openldap-2.4.37/tests'
Initiating LDAP tests for BDB...
Cleaning up test run directory leftover from previous run.
Running ./scripts/all for bdb...
>>>>> Executing all LDAP tests for bdb
>>>>> Starting test000-rootdse for bdb...
running defines.sh
Starting slapd on TCP/IP port 9011...
Using ldapsearch to retrieve the root DSE...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
./scripts/test000-rootdse: line 66: kill: (27188) - No such process
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
>>>>> Test failed
>>>>> test000-rootdse failed for bdb
(exit 255)
make[2]: *** [bdb-yes] Error 255
make[2]: Leaving directory `/home/anauser/LDAP_dir/openldap-2.4.37/tests'
make[1]: *** [test] Error 2
make[1]: Leaving directory `/home/anauser/LDAP_dir/openldap-2.4.37/tests'
make: *** [test] Error 2

I am running on Red Hat Enterprise Linux Server release 6.3 (Santiago). I am new to linux/ldap so any help/advice would be great, thanks!

3
  • 1
    Why exactly do you want to compile it yourself? A yum install openldap would be easier.
    – etagenklo
    Nov 28, 2013 at 20:45
  • that seems to have worked but i dont see where it is installed. it says it is usually in /usr/local/etc/openldap/ but etc is empty. where could it be? Nov 29, 2013 at 9:15
  • never mind, i found it in root/etc, Thanks! Nov 29, 2013 at 9:22

1 Answer 1

1

make test is failing because of slow slapd startup, the most common cause of that is due to a problem with Cyrus SASL — specifically its default1 is to read /dev/random directly during initialisation. On Linux /dev/random is effectively throttled in order to try to guarantee good, high entropy data. You should be able to check this with strace -e trace=file -f -p $(pgrep slapd) or similar. In a non-production environment you could also temporarily replace /dev/random with /dev/urandom to confirm or deny the problem. The /dev/random path is a compile-time setting, it cannot be configured at run time.

However, RHEL (and derivatives) modify that default since around 2003/RHEL 3.x (according to the cyrus-sasl.spec from the SRPM), so that should not be the cause unless you also compiled Cyrus SASL yourself, since that too is in the guide you link to.

This is one of the reasons that some people question why (though coherent supporting arguments tend to be omitted) you are building software yourself: there are plenty of bear traps. It is however a great learning exercise, and I recommend it for that, but before you build production ready software you will need to do a lot of reading. Linux From Scratch, and the patches and build scripts/spec files from various Linux distributions are a good starting point.


  1. up to version cyrus-sasl-2.1.26; the default has changed to /dev/urandom in 2.1.27RC (as of July 2017).
1
  • 1
    Openldap in particular is well known for having bugs that are fixed in upstream but not in the old versions bundled by distributors like redhat. The first question you'll get on their mailing list is whether you compiled the latest source yourself.
    – Dan Pritts
    Aug 8, 2017 at 19:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .