Bug 1155680 - Error: failed to open an LDAP connection to host 'example.org' port '389' as user 'cn=Directory Manager'. Error: unknown.
Summary: Error: failed to open an LDAP connection to host 'example.org' port '389' as ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: 389-ds-base
Version: 20
Hardware: i686
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-22 15:33 UTC by Eugene Kanter
Modified: 2020-09-13 21:14 UTC (History)
5 users (show)

Fixed In Version: 389-ds-base-1.3.2.25-1
Clone Of:
Environment:
Last Closed: 2015-04-29 18:59:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 1266 0 None None None 2020-09-13 21:14:16 UTC

Description Eugene Kanter 2014-10-22 15:33:23 UTC
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.

Comment 1 Rich Megginson 2014-10-22 15:42:28 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/47935


Note You need to log in before you can comment on or make changes to this bug.