Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] grouper loader as service

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] grouper loader as service


Chronological Thread 
  • From: Jeff McCullough <>
  • To: Chris Hyzer <>
  • Cc: "" <>, CalNet Administration <>
  • Subject: Re: [grouper-users] grouper loader as service
  • Date: Wed, 11 Apr 2012 13:10:42 -0700

I admit the code should give the same result for either, but it isn't what I
see.

This is the log listing for an LDAP_SIMPLE configuration:

2012-04-11 13:02:45,524: [DefaultQuartzScheduler_Worker-3] DEBUG
LdapSession.callbackLdapSession(177) - - pre-checkout: ldap id: ucbLdap,
pool active: 0, available: 1
2012-04-11 13:02:45,524: [DefaultQuartzScheduler_Worker-3] DEBUG
LdapSession.callbackLdapSession(183) - - post-checkout: ldap id: ucbLdap,
pool active: 1, available: 0
2012-04-11 13:02:45,639: [DefaultQuartzScheduler_Worker-3] DEBUG
LdapSession$1.callback(274) - - Found 88 results for serverId: ucbLdap,
searchDn: null, filter:
'(&(objectclass=person)(!(berkeleyedutestidflag=true))(!(berkeleyeduempexdate=*))(departmentnumber=JKASD))',
returning attribute: uid, some results: ArrayList size: 88: [0]: 223

For an LDAP_GROUPS_FROM_ATTRIBUTES configuration I only see the first two
debug lines. The third line below is a deleted user being replaced.

2012-04-11 13:04:30,469: [DefaultQuartzScheduler_Worker-9] DEBUG
LdapSession.callbackLdapSession(177) - - pre-checkout: ldap id: ucbLdap,
pool active: 0, available: 1
2012-04-11 13:04:30,469: [DefaultQuartzScheduler_Worker-9] DEBUG
LdapSession.callbackLdapSession(183) - - post-checkout: ldap id: ucbLdap,
pool active: 1, available: 0
2012-04-11 13:04:40,209: [DefaultQuartzScheduler_Worker-9] INFO
EventLog.info(141) - -
[40cef69645f24f45b3392329698916a5,'GrouperSystem','application'] add member:
group='test:AffiliateStatus:groups:EMPLOYEE-TYPE-STAFF' list='members'
subject='545702'/'person'/'LDAP' (200ms)

Jeff

On Apr 11, 2012, at 12:45 PM, Chris Hyzer wrote:

> Hmm, is it this log message from LdapSession?
>
> if (LOG.isDebugEnabled()) {
> LOG.debug("Found " + result.size() + " results for serverId: " +
> ldapServerId + ", searchDn: " + searchDn
> + ", filter: '" + filter + "', returning attribute: "
> + attributeName + ", some results: " +
> GrouperUtil.toStringForLog(result, 100) );
> }
>
> Can you remind me an example of the log message you would like to see?
>
> Thanks,
> Chris
>
> -----Original Message-----
> From: Jeff McCullough
> [mailto:]
>
> Sent: Wednesday, April 11, 2012 3:09 PM
> To: Chris Hyzer
> Cc:
> ;
> CalNet Administration
> Subject: Re: [grouper-users] grouper loader as service
>
> Hi Chris,
>
> Yes, that fixed the error. The two methods (at least LDAP_SIMPLE and
> LDAP_GROUPS_FROM_ATTRIBUTES) don't seem to have the same logging under
> debug though. SIMPLE shows its queries, but LGFA does not.
>
> Cheers,
> Jeff
>
> On Apr 8, 2012, at 8:42 AM, Chris Hyzer wrote:
>
>> Whoops, there is a small bug that I just fixed. Can you either patch your
>> source and build the grouper.jar again or download this grouper.jar (2.1.1
>> snapshot) to use in your loader?
>>
>> http://www.internet2.edu/grouper/release/2.1.1/grouper.jar
>>
>> https://bugs.internet2.edu/jira/browse/GRP-770
>>
>> Let me know if it works.
>>
>> Thanks,
>> Chris
>>
>>
>>
>> -----Original Message-----
>> From:
>>
>>
>> [mailto:]
>> On Behalf Of Jeff McCullough
>> Sent: Friday, April 06, 2012 9:36 PM
>> To:
>>
>> Cc: CalNet Administration
>> Subject: [grouper-users] grouper loader as service
>>
>>
>> I've successfully used both the ldap loader types:
>>
>> LDAP_GROUPS_FROM_ATTRIBUTES
>> LDAP_SIMPLE
>>
>> I can run both the scripts below successfully from gsh. When I use gsh.sh
>> -loader, the LDAP_SIMPLE group runs as expected. The other one fails with
>> this error the below error. What am I missing?
>>
>> Thanks,
>> Jeff
>>
>> ------------------
>> grouper_error.log snippet
>> -----------------
>> 2012-04-06 18:27:00,055: [DefaultQuartzScheduler_Worker-4] ERROR
>> GrouperLoaderJob.runJob(387) - - Error on job:
>> LDAP_GROUPS_FROM_ATTRIBUTES__test:Departments:myLdapGroupFromAttributes__2324252375624390a09e671fb01c5710
>> java.lang.RuntimeException: Cant find the ldap connection named: 'null' in
>> the grouper-loader.properties. Should have entry: ldap.null.url,
>> Problem with ldap conection: null,
>> Error querying ldap server id: null, searchDn: null, filter: 'null',
>> returning subject attribute: null
>> at
>> edu.internet2.middleware.grouper.app.loader.GrouperLoaderConfig.retrieveLdapProfile(GrouperLoaderConfig.java:288)
>> at
>> edu.internet2.middleware.grouper.ldap.LdapSession.blockingLdapPool(LdapSession.java:54)
>> at
>> edu.internet2.middleware.grouper.ldap.LdapSession.callbackLdapSession(LdapSession.java:174)
>> at
>> edu.internet2.middleware.grouper.app.loader.db.GrouperLoaderResultset.initForLdapGroupsFromAttributes(GrouperLoaderResultset.java:656)
>> at
>> edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$8.runJob(GrouperLoaderType.java:893)
>> at
>> edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.runJob(GrouperLoaderJob.java:379)
>> at
>> edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.execute(GrouperLoaderJob.java:281)
>> at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
>> at
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
>> 2012-04-06 18:27:00,068: [DefaultQuartzScheduler_Worker-4] ERROR
>> GrouperLoaderJob.execute(284) - - Error running up job
>> java.lang.RuntimeException: Cant find the ldap connection named: 'null' in
>> the grouper-loader.properties. Should have entry: ldap.null.url,
>> Problem with ldap conection: null,
>> Error querying ldap server id: null, searchDn: null, filter: 'null',
>> returning subject attribute: null
>> at
>> edu.internet2.middleware.grouper.app.loader.GrouperLoaderConfig.retrieveLdapProfile(GrouperLoaderConfig.java:288)
>> at
>> edu.internet2.middleware.grouper.ldap.LdapSession.blockingLdapPool(LdapSession.java:54)
>> at
>> edu.internet2.middleware.grouper.ldap.LdapSession.callbackLdapSession(LdapSession.java:174)
>> at
>> edu.internet2.middleware.grouper.app.loader.db.GrouperLoaderResultset.initForLdapGroupsFromAttributes(GrouperLoaderResultset.java:656)
>> at
>> edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$8.runJob(GrouperLoaderType.java:893)
>> at
>> edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.runJob(GrouperLoaderJob.java:379)
>> at
>> edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.execute(GrouperLoaderJob.java:281)
>> at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
>> at
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
>> -------------------
>>
>> ------------------
>> LDAP_GROUPS_FROM_ATTRIBUTES.gsh
>> ------------------
>> grouperSession = GrouperSession.startRootSession();
>> group = new \
>> GroupSave(grouperSession).assignName("test:Departments:myLdapGroupFromAttributes").assignCreateParentStemsIfNotExist(true).save();
>> attributeAssign =
>> group.getAttributeDelegate().assignAttribute(LoaderLdapUtils.grouperLoaderLdapAttributeDefName()).getAttributeAssign();attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapTypeName(),
>> "LDAP_GROUPS_FROM_ATTRIBUTES");
>> attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapFilterName(),
>> "(&(objectclass=person)
>> \(!(berkeleyedutestidflag=true))(!(berkeleyeduempexdate=*))(departmentnumber=JICCS))");
>> attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapQuartzCronName(),
>> "0 0/3 * * * ?");
>> attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapServerIdName(),
>> "ucbLdap");
>> attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSourceIdName(),
>> "LDAP");
>> attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectAttributeName(),
>> "uid");
>> attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapGroupAttributeName(),
>> "departmentnumber");
>> attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectIdTypeName(),
>> "subjectIdentifier");
>> group = GroupFinder.findByName(grouperSession,
>> "test:Departments:myLdapGroupFromAttributes");
>> loaderRunOneJob(group);
>>
>>
>>
>> ------------------------------
>> LDAP_SIMPLE.gsh
>> ------------------------------
>>
>> grouperSession = GrouperSession.startRootSession();
>> group = new
>> GroupSave(grouperSession).assignName("someStem:myLdapGroup").assignCreateParentStemsIfNotExist(true).save();
>> attributeAssign =
>> group.getAttributeDelegate().assignAttribute(LoaderLdapUtils.grouperLoaderLdapAttributeDefName()).getAttributeAssign();
>> attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapTypeName(),
>> "LDAP_SIMPLE");
>> attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapFilterName(),
>> "(&(objectclass=person) \
>> (!(berkeleyedutestidflag=true))(!(berkeleyeduempexdate=*))(departmentnumber=JICCS))");
>> attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapQuartzCronName(),
>> "45 0/3 * * * ?");
>> attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapServerIdName(),
>> "ucbLdap");
>> attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSourceIdName(),
>> "LDAP");
>> attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectAttributeName(),
>> "uid");
>> attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectIdTypeName(),
>> "subjectIdentifier");
>> group = GroupFinder.findByName(grouperSession, "someStem:myLdapGroup");
>> loaderRunOneJob(group);
>> ~
>




Archive powered by MHonArc 2.6.16.

Top of Page