Details
-
Type:
Bug
-
Status:
Verified
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 6.0.X EE, 6.1.X EE, 6.2.0 CE M3
-
Fix Version/s: None
-
Component/s: Infrastructure, Infrastructure > LDAP
-
Labels:None
-
Environment:HideTomcat 6.0 + MySQL 5. Portal 6.0.x GIT ID: c549b70ebd5b506de593b413bf8a8cdeb4aa2a6a.
Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: d83490f875f72278c6aa1e4cf017095e0c54e1cf.
Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: fdced8a29e777f0b8be01207581e81f77b2ee4bb.ShowTomcat 6.0 + MySQL 5. Portal 6.0.x GIT ID: c549b70ebd5b506de593b413bf8a8cdeb4aa2a6a. Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: d83490f875f72278c6aa1e4cf017095e0c54e1cf. Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: fdced8a29e777f0b8be01207581e81f77b2ee4bb.
-
Fix Priority:4
-
Similar Issues:
Description
1. Include the following property in the portal-ext.properties file (The default value is 15 seconds):
ldap.connection.com.sun.jndi.ldap.read.timeout=500
2. Restart the portal and run a load test script that simply logs a user in and out repeatedly. Alternatively, configure the portal to do a LDAP import on start-up. Basically any action that will produce a large number of LDAP requests for data retrieved from LDAP.(Example: 5500 users)
3. Check the log files for any LDAP read-timeout errors.
Search user in LDAP throw error message in console:
05:13:08,835 ERROR [liferay/scheduler_dispatch-3][PortalLDAPImporterImpl:700] Unable to import user cn=qa2675,ou=users,dc=Name: null:null:{cn=cn: qa26 75} javax.naming.NamingException: LDAP response read timed out, timeout used:500ms.; remaining name 'dc=example,dc=com' at com.sun.jndi.ldap.Connection.readReply(Connection.java:448) at com.sun.jndi.ldap.LdapClient.getSearchReply(LdapClient.java:611) at com.sun.jndi.ldap.LdapClient.search(LdapClient.java:534) at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:1962) at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1824) at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1749) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:338) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:321) at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:248) at com.liferay.portal.security.ldap.PortalLDAPUtil.getUser(PortalLDAPUtil.java:488) at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importGroups(PortalLDAPImporterImpl.java:790) at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAPByUser(PortalLDAPImporterImpl.java:695) at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAP(PortalLDAPImporterImpl.java:200) at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAP(PortalLDAPImporterImpl.java:137) at com.liferay.portal.security.ldap.PortalLDAPImporterUtil.importFromLDAP(PortalLDAPImporterUtil.java:43) at com.liferay.portlet.admin.messaging.LDAPImportMessageListener.doImportOnStartup(LDAPImportMessageListener.java:38) at com.liferay.portlet.admin.messaging.LDAPImportMessageListener.doReceive(LDAPImportMessageListener.java:48) at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67) at $Proxy283.receive(Unknown Source) at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper.receive(SchedulerEventMessageListenerWrapper.java:75) at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:63) at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:68) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:671) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:582) at java.lang.Thread.run(Thread.java:662)
Issue Links
- relates
-
LPS-28638
LDAP failure to close NamingEnumeration causing thread locks
-

Happens same to our Liferay 6.1.1. We have a 60s timeout in LDAP servers, and is always failing when importing massive users.
I guess this is caused by the reuse of the same connection for every LDAP queries, so is easy to get this timeout.
I tried using LDAP connection pool, but same error arises.