Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: /usr/sbin/setup-ds-admin.pl fails with Error: failed to open an LDAP connection to host 'example.org' port '389' as user 'cn=Directory Manager'. Error: unknown. ns-slapd is running and listening on port 389. Running /usr/sbin/setup-ds-admin.pl under strace -f shows that it gets a connection refused error, while connecting to a correct example.org IP address. Problems: 1. message says "Error: unknown" instead of "Error: connection refused" 2. /usr/lib/dirsrv/perl/DSCreate.pm diligently reads ns-slapd log file and waits for 'slapd started.' message. However ns-slapd puts out 'slapd started.' message shortly before it really starts accepting connections. Workaround: add a several seconds delay after debug(1, "Your new directory server has been started.\n"); line. Version-Release number of selected component (if applicable): Probably all before and including 389-ds-base-1.3.2.23-1.fc20, since forums and mailing lists mention this error since at least 2009 with no solution offered. How reproducible: there is a sufficient chance of getting the error on Intel(R) Pentium(R) 4 CPU 3.00GHz system. Steps to Reproduce: 1. create an ldap parameters file and repeatedly run /usr/sbin/setup-ds-admin.pl --debug --silent --force --file=/path/to/ldap.txt then systemctl stop dirsrv.target and rm -rf /etc/dirsrv/slapd-name and /var/lib/dirsrv/slapd-name after each run, where name is configured ldap server name. Actual results: Error sometimes occur. Expected results: No errors should occur.
Upstream ticket: https://fedorahosted.org/389/ticket/47935