IPA / Red Hat Directory Server fails to start with error "Local Network address is in use"

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Identity Management (IPA) 2
  • Red Hat Identity Management (IPA) 3
  • Red Hat Directory Server 9

Issue

  • Red Hat Directory Server fails to start with the following error displayed in its error log:

    createprlistensockets - PR_Bind() on All Interfaces port 636 failed: Netscape Portable Runtime error -5982 (Local Network address is in use.)

    As a result of the above error, the IPA server will also not start.

Resolution

The possible solutions are:

  • Remove openldap-servers
  • Add the following to the /etc/init.d/dirsrv init script
  # Release reserved port
    [ -x /sbin/portrelease ] && /sbin/portrelease slapd &>/dev/null || :

Note: This issue is specifc to versions of RHEL that use SysV init scripts (such as RHEL 6). Systems that use systemd (such as RHEL 7) can utilize its port conflict resolution capability to avoid this issue.

Root Cause

System is running RHEL6, which includes the openldap-servers package. openldap-servers was recently updated from 2.4.23-20 to 2.4.23-26. As part of this update, it added support for the portreserve service by including the file /etc/portreserve/slapd in its manifest, and also added a portrelease command in its init.d script. This allows openldap-server to tell portreserve to release port 636. The /etc/portreserve/slapd file tells portreserve to reserve the LDAPS (636) port.

Diagnostic Steps

Check for the following error in the Directory Server error log:

createprlistensockets - PR_Bind() on All Interfaces port 636 failed: Netscape Portable Runtime error -5982 (Local Network address is in use.)

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.