[Building Sakai] Sakai LDAP search

Steve Swinsburg steve.swinsburg at gmail.com
Thu Aug 2 13:32:08 PDT 2012


Hi Jaco,

Use a command line client and try to run an ldapsearch with the same parameters. You could also hook up a debugger and add some breakpoints and step through that method.
The very next line of code after that last debug statement is making the connection to the LDAP server though so I'd suspect it is on the LDAP side.

cheers,
Steve


On 02/08/2012, at 11:53 PM, Jaco Gillman <jaco at opencollab.co.za> wrote:

> Hi Steve
> 
> I have enabled logging for ldap provider. See my console output below. 
> 
> I have marked in red were I did what and added comments:
> 
> 
> (2012-08-02 11:33:04,493 http-127.0.0.1-8080-2_org.apache.wicket.RequestListenerInterface) - INFO: registered listener interface [
> RequestListenerInterface name=INewBrowserWindowListener, method=public abstract void org.apache.wicket.markup.html.INewBrowserWind
> owListener.onNewBrowserWindow()]
> @Did a search for jscoble
> (2012-08-02 11:33:24,046 http-127.0.0.1-8080-6_edu.amc.sakai.user.JLDAPDirectoryProvider) - DEBUG: searchDirectory(): [filter = (|
> (cn=jscoble*)(mail=jscoble*)(givenName=jscoble*)(sn=jscoble*))][reusing conn = false]
> (2012-08-02 11:33:24,047 http-127.0.0.1-8080-6_edu.amc.sakai.user.PoolingLdapConnectionManager) - DEBUG: getConnection(): attempti
> ng to borrow connection from pool
> (2012-08-02 11:33:24,047 http-127.0.0.1-8080-6_edu.amc.sakai.user.PooledLDAPConnectionFactory) - DEBUG: activateObject()
> (2012-08-02 11:33:24,048 http-127.0.0.1-8080-6_edu.amc.sakai.user.PooledLDAPConnectionFactory) - DEBUG: activateObject(): assigned
>  connection constraints
> (2012-08-02 11:33:24,049 http-127.0.0.1-8080-6_edu.amc.sakai.user.PooledLDAPConnectionFactory) - DEBUG: activateObject(): set conn
> ection active flag
> (2012-08-02 11:33:24,050 http-127.0.0.1-8080-6_edu.amc.sakai.user.PooledLDAPConnectionFactory) - DEBUG: validateObject()
> (2012-08-02 11:33:24,050 http-127.0.0.1-8080-6_edu.amc.sakai.user.PooledLDAPConnectionFactory) - DEBUG: validateObject(): received
>  PooledLDAPConnection object to validate
> (2012-08-02 11:33:24,050 http-127.0.0.1-8080-6_edu.amc.sakai.user.PooledLDAPConnectionFactory) - DEBUG: validateObject(): beginnin
> g connection liveness testing
> (2012-08-02 11:33:24,050 http-127.0.0.1-8080-6_edu.amc.sakai.user.NativeLdapConnectionLivenessValidator) - DEBUG: isConnectionAliv
> e(): attempting native liveness test
> (2012-08-02 11:33:24,051 http-127.0.0.1-8080-6_edu.amc.sakai.user.NativeLdapConnectionLivenessValidator) - DEBUG: isConnectionAliv
> e(): native liveness test result [true]
> (2012-08-02 11:33:24,051 http-127.0.0.1-8080-6_edu.amc.sakai.user.PooledLDAPConnectionFactory) - DEBUG: validateObject(): connecti
> on appears to be valid, returning true
> (2012-08-02 11:33:24,052 http-127.0.0.1-8080-6_edu.amc.sakai.user.PoolingLdapConnectionManager) - DEBUG: getConnection(): successf
> ully to borrowed connection from pool
> (2012-08-02 11:33:24,052 http-127.0.0.1-8080-6_edu.amc.sakai.user.JLDAPDirectoryProvider) - DEBUG: searchDirectory(): [baseDN = o=
> UWC][filter = (|(cn=jscoble*)(mail=jscoble*)(givenName=jscoble*)(sn=jscoble*))][return attribs = [cn, dn, givenName, sn, mail, mem
> berOf]][max results = 0]][search scope = 2]
> @Here my console has no output for almost 9 mins, (from 2012-08-02 11:33:24 to 2012-08-02 11:41:18)
> (2012-08-02 11:41:18,863 http-127.0.0.1-8080-6_edu.amc.sakai.user.JLDAPDirectoryProvider) - DEBUG: mapLdapEntryOntoUserData() [dn
> = cn=jscoble,ou=ITS,ou=SERVICES,o=UWC]
> (2012-08-02 11:41:18,864 http-127.0.0.1-8080-6_edu.amc.sakai.user.SimpleLdapAttributeMapper) - DEBUG: mapLdapEntryOntoUserData():
> mapping entry [dn = cn=jscoble,ou=ITS,ou=SERVICES,o=UWC]
> (2012-08-02 11:41:18,864 http-127.0.0.1-8080-6_edu.amc.sakai.user.SimpleLdapAttributeMapper) - DEBUG: mapLdapAttributeOntoUserData
> () preparing to map: [logical attr name = firstName][physical attr name = givenName][value = James]
> (2012-08-02 11:41:18,864 http-127.0.0.1-8080-6_edu.amc.sakai.user.SimpleLdapAttributeMapper) - DEBUG: mapLdapAttributeOntoUserData
> () mapping attribute to User.firstName: [logical attr name = firstName][physical attr name = givenName][value = James]
> (2012-08-02 11:41:18,864 http-127.0.0.1-8080-6_edu.amc.sakai.user.SimpleLdapAttributeMapper) - DEBUG: mapLdapAttributeOntoUserData
> () preparing to map: [logical attr name = lastName][physical attr name = sn][value = Scoble]
> (2012-08-02 11:41:18,865 http-127.0.0.1-8080-6_edu.amc.sakai.user.SimpleLdapAttributeMapper) - DEBUG: mapLdapAttributeOntoUserData
> () mapping attribute to User.lastName: [logical attr name = lastName][physical attr name = sn][value = Scoble]
> (2012-08-02 11:41:18,865 http-127.0.0.1-8080-6_edu.amc.sakai.user.SimpleLdapAttributeMapper) - DEBUG: mapLdapAttributeOntoUserData
> () preparing to map: [logical attr name = login][physical attr name = cn][value = jscoble]
> (2012-08-02 11:41:18,865 http-127.0.0.1-8080-6_edu.amc.sakai.user.SimpleLdapAttributeMapper) - DEBUG: mapLdapAttributeOntoUserData
> () mapping attribute to User.eid: [logical attr name = login][physical attr name = cn][value = jscoble]
> (2012-08-02 11:41:18,865 http-127.0.0.1-8080-6_edu.amc.sakai.user.SimpleLdapAttributeMapper) - DEBUG: mapLdapAttributeOntoUserData
> () preparing to map: [logical attr name = email][physical attr name = mail][value = jscoble at uwc.ac.za]
> (2012-08-02 11:41:18,866 http-127.0.0.1-8080-6_edu.amc.sakai.user.SimpleLdapAttributeMapper) - DEBUG: mapLdapAttributeOntoUserData
> () mapping attribute to User.email: [logical attr name = email][physical attr name = mail][value = jscoble at uwc.ac.za]
> (2012-08-02 11:41:18,866 http-127.0.0.1-8080-6_edu.amc.sakai.user.SimpleLdapAttributeMapper) - DEBUG: usePreferredFirstName() usin
> g firstName.
> (2012-08-02 11:41:18,867 http-127.0.0.1-8080-6_edu.amc.sakai.user.StringUserTypeMapper) - DEBUG: mapLdapEntryToSakaiUserType(): re
> turning user type [] for [entry DN = cn=jscoble,ou=ITS,ou=SERVICES,o=UWC]
> (2012-08-02 11:41:18,868 http-127.0.0.1-8080-6_edu.amc.sakai.user.JLDAPDirectoryProvider) - DEBUG: cacheUserData(): [user record =
>  edu.amc.sakai.user.LdapUserData at 52b63086[
>   eid=jscoble
>   firstName=James
>   preferredFirstName=<null>
>   lastName=Scoble
>   email=jscoble at uwc.ac.za
>   type=
>   properties={udp.dn=cn=jscoble,ou=ITS,ou=SERVICES,o=UWC}
> ]]
> (2012-08-02 11:41:18,869 http-127.0.0.1-8080-6_edu.amc.sakai.user.JLDAPDirectoryProvider) - DEBUG: searchDirectory(): returning co
> nnection to connection manager
> (2012-08-02 11:41:18,869 http-127.0.0.1-8080-6_edu.amc.sakai.user.PoolingLdapConnectionManager) - DEBUG: returnConnection(): attem
> pting to return connection to the pool
> (2012-08-02 11:41:18,870 http-127.0.0.1-8080-6_edu.amc.sakai.user.PooledLDAPConnectionFactory) - DEBUG: passivateObject()
> (2012-08-02 11:41:18,871 http-127.0.0.1-8080-6_edu.amc.sakai.user.PooledLDAPConnectionFactory) - DEBUG: passivateObject(): unset c
> onnection active flag
> (2012-08-02 11:41:18,872 http-127.0.0.1-8080-6_edu.amc.sakai.user.PoolingLdapConnectionManager) - DEBUG: returnConnection(): succe
> ssfully returned connection to pool
> (2012-08-02 11:41:18,874 http-127.0.0.1-8080-6_edu.amc.sakai.user.JLDAPDirectoryProvider) - DEBUG: mapUserDataOntoUserEdit() [cach
> e record = edu.amc.sakai.user.LdapUserData at 52b63086[
>   eid=jscoble
>   firstName=James
>   preferredFirstName=<null>
>   lastName=Scoble
>   email=jscoble at uwc.ac.za
>   type=
>   properties={udp.dn=cn=jscoble,ou=ITS,ou=SERVICES,o=UWC}
> ]]
> (2012-08-02 11:41:18,875 http-127.0.0.1-8080-6_edu.amc.sakai.user.SimpleLdapAttributeMapper) - DEBUG: mapUserDataOntoUserEdit(): [
> cache record = edu.amc.sakai.user.LdapUserData at 52b63086[
>   eid=jscoble
>   firstName=James
>   preferredFirstName=<null>
>   lastName=Scoble
>   email=jscoble at uwc.ac.za
>   type=
>   properties={udp.dn=cn=jscoble,ou=ITS,ou=SERVICES,o=UWC}
> ]]
> (2012-08-02 11:41:18,894 http-127.0.0.1-8080-6_edu.amc.sakai.user.JLDAPDirectoryProvider) - DEBUG: getUserByEid(): [eid = jscoble]
> 
> (2012-08-02 11:41:18,894 http-127.0.0.1-8080-6_edu.amc.sakai.user.JLDAPDirectoryProvider) - DEBUG: getCachedUserEntry(): [eid = js
> coble]
> (2012-08-02 11:41:18,895 http-127.0.0.1-8080-6_edu.amc.sakai.user.JLDAPDirectoryProvider) - DEBUG: getCachedUserEntry(): cache acc
> ess [found entry = true][entry expired = false]
> (2012-08-02 11:41:18,899 http-127.0.0.1-8080-6_edu.amc.sakai.user.JLDAPDirectoryProvider) - DEBUG: getUserByEid(): found cached us
> er [eid = jscoble]
> (2012-08-02 11:41:18,900 http-127.0.0.1-8080-6_edu.amc.sakai.user.JLDAPDirectoryProvider) - DEBUG: mapUserDataOntoUserEdit() [cach
> e record = edu.amc.sakai.user.LdapUserData at 52b63086[
>   eid=jscoble
>   firstName=James
>   preferredFirstName=<null>
>   lastName=Scoble
>   email=jscoble at uwc.ac.za
>   type=
>   properties={udp.dn=cn=jscoble,ou=ITS,ou=SERVICES,o=UWC}
> ]]
> (2012-08-02 11:41:18,901 http-127.0.0.1-8080-6_edu.amc.sakai.user.SimpleLdapAttributeMapper) - DEBUG: mapUserDataOntoUserEdit(): [
> cache record = edu.amc.sakai.user.LdapUserData at 52b63086[
>   eid=jscoble
>   firstName=James
>   preferredFirstName=<null>
>   lastName=Scoble
>   email=jscoble at uwc.ac.za
>   type=
>   properties={udp.dn=cn=jscoble,ou=ITS,ou=SERVICES,o=UWC}
> ]]
> 
> 
> 
> 
> 
> 
> Regards,
> 
> 
> Jaco Gillman
> Java Developer
> opencollab
> Tel: +27 21 970 4017  |  Fax: +27 21 914 3098
> Email: jaco at opencollab.co.za  |  Skype: gillmanjc
> Web: www.opencollab.co.za
> 
> 
> 
> 
> 
> 
> 
> 
> On 1 August 2012 15:59, Steve Swinsburg <steve.swinsburg at gmail.com> wrote:
> Can you enable debug level logging for the jldap provider and monitor it?
> 
> Cheers,
> Steve
> 
> Sent from my iPad
> 
> On 01/08/2012, at 22:31, Jaco Gillman <jaco at opencollab.co.za> wrote:
> 
>> Hi Aaron
>> 
>> I have installed Sakai 2.8.2, which should be fine I believe.
>> 
>> 
>> 
>> Regards,
>> 
>> 
>> Jaco Gillman
>> Java Developer
>> opencollab
>> Tel: +27 21 970 4017  |  Fax: +27 21 914 3098
>> Email: jaco at opencollab.co.za  |  Skype: gillmanjc
>> Web: www.opencollab.co.za
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> On 1 August 2012 14:27, Aaron Zeckoski <azeckoski at unicon.net> wrote:
>> What version of Sakai?
>> 
>> The user membership tool in Sakai 2.7 has some serious performance
>> issues. If you are planning to make any serious use of it then you
>> probably will want to upgrade to Sakai 2.8.
>> 
>> There are also some other LDAP fixes in 2.9 though I don't think they
>> would improve the things you are talking about.
>> 
>> -AZ
>> 
>> 
>> On Wed, Aug 1, 2012 at 6:54 AM, Jaco Gillman <jaco at opencollab.co.za> wrote:
>> > Hi All
>> >
>> > We have an Sakai implementation which makes use of an LDAP instance for
>> > authentication. I am also using Apache Directory Studio as an client to
>> > connect to the same LDAP instance. Everything in Apache Studio is working
>> > fine, but doing user searches in Sakai (ie doing user connection searches
>> > and user membership searches) takes forever, but does return users found
>> > eventually.
>> >
>> > I attached the jldap-beans.xml file and removed the following properties for
>> > obvious reasons:
>> > ldapHost, ldapPort, keystoreLocation, keystorePassword
>> >
>> > Any idea why these searches take so long in Sakai?
>> >
>> > Regards,
>> >
>> > Jaco Gillman
>> >
>> > Java Developer
>> >
>> > opencollab
>> >
>> > Tel: +27 21 970 4017  |  Fax: +27 21 914 3098
>> >
>> > Email: jaco at opencollab.co.za  |  Skype: gillmanjc
>> >
>> > Web: www.opencollab.co.za
>> >
>> >
>> >
>> > _______________________________________________
>> > sakai-dev mailing list
>> > sakai-dev at collab.sakaiproject.org
>> > http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>> >
>> > TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org
>> > with a subject of "unsubscribe"
>> 
>> 
>> 
>> --
>> Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile
>> 
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>> 
>> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120803/0a3893e7/attachment.html 


More information about the sakai-dev mailing list