Directory service (dirsrv) is failing to start on RHEL 8 IPA server with an error - PR_Bind() on All Interfaces port 389 failed: Netscape Portable Runtime error -5982

Solution Verified - Updated -

Issue

  • Unable to start IPA services due to failure in dirsrv service:
[root@ipaserver-rh8 ~]# ipactl status
Directory Service: STOPPED
Directory Service must be running in order to obtain status of other services

[root@ipaserver-rh8 ~]# systemctl status dirsrv@EXAMPLE-LOCAL.service
● dirsrv@EXAMPLE-LOCAL.service - 389 Directory Server EXAMPLE-LOCAL.
   Loaded: loaded (/usr/lib/systemd/system/dirsrv@.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/dirsrv@.service.d
           └─custom.conf
           /etc/systemd/system/dirsrv@EXAMPLE-LOCAL.service.d
           └─ipa-env.conf
   Active: failed (Result: exit-code) since Tue 2022-08-23 16:46:26 IST; 4s ago
  Process: 19925 ExecStart=/usr/sbin/ns-slapd -D /etc/dirsrv/slapd-EXAMPLE-LOCAL -i /run/dirsrv/slapd-EXAMPLE-LOCAL.pid (code=exited, status=1/FAILURE)
  Process: 19920 ExecStartPre=/usr/libexec/dirsrv/ds_selinux_restorecon.sh /etc/dirsrv/slapd-EXAMPLE-LOCAL/dse.ldif (code=exited, status=0/SUCCESS)
  Process: 19914 ExecStartPre=/usr/libexec/dirsrv/ds_systemd_ask_password_acl /etc/dirsrv/slapd-EXAMPLE-LOCAL/dse.ldif (code=exited, status=0/SUCCESS)
 Main PID: 19925 (code=exited, status=1/FAILURE)

Aug 23 16:46:26 ipaserver-rh8.example.local systemd[1]: Starting 389 Directory Server EXAMPLE-LOCAL....
Aug 23 16:46:26 ipaserver-rh8.example.local ns-slapd[19925]: [23/Aug/2022:16:46:26.807507844 +051800] - ERR - createprlistensockets - PR_Bind() on All Inter>
Aug 23 16:46:26 ipaserver-rh8.example.local systemd[1]: dirsrv@EXAMPLE-LOCAL.service: Main process exited, code=exited, status=1/FAILURE
Aug 23 16:46:26 ipaserver-rh8.example.local systemd[1]: dirsrv@EXAMPLE-LOCAL.service: Failed with result 'exit-code'.
Aug 23 16:46:26 ipaserver-rh8.example.local systemd[1]: Failed to start 389 Directory Server EXAMPLE-LOCAL..
  • dirsrv service on IPA server is failing to start with following error in /var/log/dirsrv/slapd-INSTANCE/errors log file:
[root@ipaserver-rh8 ~]# tail -1 /var/log/dirsrv/slapd-EXAMPLE-LOCAL/errors
[23/Aug/2022:12:20:40.351027381 +051800] - ERR - createprlistensockets - PR_Bind() on All Interfaces port 389 failed: Netscape Portable Runtime error -5982 (Local Network address is in use.)  <----

Environment

  • Red Hat Enterprise Linux 8
  • Identity Management (IPA)
  • dirsrv

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content