"LDAP response read timed out, timeout used" error is thrown in EAP 6
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 6.2.0
Issue
The Ldap queries sometimes does not get completed and the error below is thrown:
12:38:30,324 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/my_app].[default]] (http-0.0.0.0/0.0.0.0:8080-17) JBWEB000236: Servlet.service() for servlet default threw exception: org.springframework.ldap.UncategorizedLdapException: Uncategorized exception occured during LDAP processing; nested exception is javax.naming.NamingException: LDAP response read timed out, timeout used:3000ms.; remaining name 'ou=groups'
...
Caused by: javax.naming.NamingException: LDAP response read timed out, timeout used:3000ms.; remaining name 'ou=group'
at com.sun.jndi.ldap.Connection.readReply(Unknown Source) [rt.jar:1.7.0_60]
...
Resolution
- Try to increase the Read timeout in your Ldap Server and in your application.
- Modify the Ldap Query if it is necessary.
Root Cause
This error seems to be related with the Ldap search timeout, it can be caused basically if you have a very large directory or sometime when the 'Follow Referral' is enabled.
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.
