I am getting LDAP initialization failed when using mod_ldap/mod_authnz_ldap with Apache
Environment
- Red Hat Enterprise Linux
- Red Hat JBoss Web Server
Issue
-
When starting Apache, this appears in your error_log:
[info] [client 127.0.0.1] [2519] auth_ldap authenticate: user test authentication failed; URI /ldap [LDAP: ldap initialization failed][Unknown (private extension) error]
Resolution
- Install the LDAP drivers for linux via the following yum command and restart apache:
# yum install apr-util-ldap
- If seeing issue on JBoss Web Server 3.x, make sure the
apr_ldap-1.sofile exists in the$JWS_HOME/httpd/libdirectory.
# find $JWS_HOME/httpd -name 'apr_ldap*so'
Root Cause
- The LDAP drivers are not installed on the OS.
Diagnostic Steps
- Running the following command yields no results:
# yum list installed | grep apr-util-ldap
- Check if apr_ldap file is loaded
# lsof -p <HTTPD_PID> | grep apr_ldap
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.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
