Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
biswajit sarkar
LDAP binding problem
December 26, 2012 3:12 AM
Answer

biswajit sarkar

Rank: Regular Member

Posts: 166

Join Date: October 17, 2011

Recent Posts

I am using liferay 6.1 GA2 for my development.
Previously I used liferay 6.0.6 for my dev environment .
In 6.0.6 i easily configure ldap but in GA2 in getting exception.

To configure LDAP with liferay in follow below steps....(I try to configure using ldaps)
I am using linux environment

1. I am using Novell Edir...1st I export the ldap certificate and save it in my system.
2.The to import that certificate in my JDK(jdk 1.7 , its not open jdk) i run the following command

"keytool -import -trustcacerts -keystore /some/path/jdk1.5.0_11/jre/lib/security/cacerts -storepass changeit -noprompt -alias MyRootCA -file /some/path/MyRootCA.cer"

3.then configure "catalina.sh" for JRE_HOME
"JRE_HOME=/home/vistrit/Application/jdk1.7.0_09/jre/"

4.then start the liferay tomcat server and login to liferay.
then go to "Portal Setting"-->Authentication-->LDAP-->Add Ldap server

and put all fields

then try to test the connection and its failed.But previously this settings worked well in 6.0.6.

In "catalina.out" in find out following exception also

10:52:13,408 DEBUG [liferay/scheduler_dispatch-21][PortalLDAPUtil:44] -- listing properties --
java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
java.naming.provider.url=ldaps://************:636
com.sun.jndi.ldap.connect.timeout=500
java.naming.security.principal=cn=admin,ou=services,o=system
com.sun.jndi.ldap.connect.pool=true
java.naming.security.credentials=P@ssw0rd
java.naming.referral=follow
com.sun.jndi.ldap.read.timeout=15000

10:52:14,611 WARN [liferay/scheduler_dispatch-21][PortalLDAPUtil:116] Failed to bind to the LDAP server
10:52:14,612 DEBUG [liferay/scheduler_dispatch-21][PortalLDAPUtil:120] javax.naming.CommunicationException: 10.******:636 [Root exception is java.net.SocketTimeoutException: Read timed out]
javax.naming.CommunicationException: 10.***********:636 [Root exception is java.net.SocketTimeoutException: Read timed out]
at com.sun.jndi.ldap.Connection.<init>(Connection.java:209)
at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:116)
at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1582)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2678)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:296)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:134)
at com.liferay.portal.security.ldap.PortalLDAPUtil.getContext(PortalLDAPUtil.java:112)
at com.liferay.portal.security.ldap.PortalLDAPUtil.getContext(PortalLDAPUtil.java:81)
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAP(PortalLDAPImporterImpl.java:167)
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAP(PortalLDAPImporterImpl.java:135)
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAP(PortalLDAPImporterImpl.java:95)
at com.liferay.portal.security.ldap.PortalLDAPImporterUtil.importFromLDAP(PortalLDAPImporterUtil.java:39)
at com.liferay.portlet.admin.messaging.LDAPImportMessageListener.doReceive(LDAPImportMessageListener.java:28)
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
at sun.reflect.GeneratedMethodAccessor363.invoke(Unknown Source)
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:73)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:63)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:114)
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)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:863)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1203)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1230)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1214)
at com.sun.jndi.ldap.Connection.createSocket(Connection.java:364)
at com.sun.jndi.ldap.Connection.<init>(Connection.java:186)
... 31 more
Attachments: stop_or_start_servers_in_same_server_using_bamboo1.xcf (107.2k)
biswajit sarkar
RE: LDAP binding problem
December 26, 2012 3:14 AM
Answer

biswajit sarkar

Rank: Regular Member

Posts: 166

Join Date: October 17, 2011

Recent Posts

anyone aware/know about this problem please help

or did I miss something in my steps....
In liferay 6.0.6 this steps worked well
Amit Doshi
RE: LDAP binding problem
December 26, 2012 4:09 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 544

Join Date: December 29, 2010

Recent Posts

biswajit sarkar:
anyone aware/know about this problem please help

or did I miss something in my steps....
In liferay 6.0.6 this steps worked well


Make sure that ldap server is up and running. It seems that there is some wrong mapping done from your end of ldap with liferay.

Share your ldap screenshot what you have done and also details of ldap server.

Thanks & Regards,
Amit Doshi
biswajit sarkar
RE: LDAP binding problem
December 26, 2012 5:21 AM
Answer

biswajit sarkar

Rank: Regular Member

Posts: 166

Join Date: October 17, 2011

Recent Posts

hey Amit I attached 2 screenshots....
one using 389 port which is working anotherone is 636 which secured port.

In liferay 6.0.6 this configuration seems worked.

please help
Attachment

Attachment

Attachments: ldap.png (208.4k), ldaps.png (211.8k)
Subhasis Roy
RE: LDAP binding problem
December 27, 2012 1:53 AM
Answer

Subhasis Roy

Rank: Regular Member

Posts: 234

Join Date: January 19, 2012

Recent Posts

biswajit sarkar:
hey Amit I attached 2 screenshots....
one using 389 port which is working anotherone is 636 which secured port.

In liferay 6.0.6 this configuration seems worked.

please help



Can you change the port to 10389 and try the same.
check the following link:
http://support.microsoft.com/kb/321051
http://www.liferay.com/documentation/liferay-portal/6.0/administration/-/ai/global-server-settin-4
Amit Doshi
RE: LDAP binding problem
December 27, 2012 2:57 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 544

Join Date: December 29, 2010

Recent Posts

Subhasis Roy:
biswajit sarkar:
hey Amit I attached 2 screenshots....
one using 389 port which is working anotherone is 636 which secured port.

In liferay 6.0.6 this configuration seems worked.

please help



Can you change the port to 10389 and try the same.
check the following link:
http://support.microsoft.com/kb/321051
http://www.liferay.com/documentation/liferay-portal/6.0/administration/-/ai/global-server-settin-4


Yes Subhasis. I think you are right.

I missed that part. Actually in both the screenshot both are pointing to the different port.
In first screen shot it shows 389 and in the second screenshot it shows 636.

Change to port to either 389 or 10389. Check it which port works for you.

Thanks & Regards,
Amit Doshi