Skip to Content.
Sympa Menu

grouper-users - [grouper-users] Fwd: GROUPER_HOME clarfication and gsh.groovy not finding loaderRunOneJob(jobname);

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] Fwd: GROUPER_HOME clarfication and gsh.groovy not finding loaderRunOneJob(jobname);


Chronological Thread 
  • From: Jeffrey Williams <>
  • To:
  • Subject: [grouper-users] Fwd: GROUPER_HOME clarfication and gsh.groovy not finding loaderRunOneJob(jobname);
  • Date: Mon, 10 Jul 2017 09:08:51 -0400
  • Ironport-phdr: 9a23:fI7QzRKNw1hb7R3jSNmcpTZWNBhigK39O0sv0rFitYgXLPvxwZ3uMQTl6Ol3ixeRBMOAtKIC1rKempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBWB6kG1uDEIHQjnOBAwO//4AJX6jsKr2vq09oGJJQhEmWmTe7R3eTe7owvLu9hevopmLqc4zwCB9nlGZOVSwWJhDU+VlBm668utqs0wux9Msu4sopYTGZ7xeL41GORV


Hi All,

Would anyone know what would make loaderRunOneJob available in gsh, but not in gsh.groovy?

A little background:

I've been working on updating our 2.2.0 environment with the TIER Grouper 2.3.0 container using the April 2017 TIER Grouper Deployment Guide and ran into an issue setting up groovygsh4grouper.  It seemed straightforward, but I ran into a discrepancy in how GROUPER_HOME should be defined.  While not explicit in the guide, it seems that the author wants it to be set to: 

export GROUPER_HOME = /opt/grouper/X.Y.Z

However, when I run the following, I receive this error:

 $GROUPER_HOME/grouper.apiBinary-2.3.0/bin/gsh.groovy
The GROUPER_HOME environment variable is not defined correctly
or could not be determined
This script must be located in <GROUPER_HOME> or <GROUPER_HOME>/bin

That looks like it's expecting GROUPER_HOME to be set to something more like:

export GROUPER_HOME = /opt/grouper/X.Y.Z/grouper.apiBinary-X.Y-Z

...and when I do that and adjust my commands accordingly, gsh.groovy starts with seemingly no issue and runs the test commands in the guide handily.  I did the following symlinks in the hopes it'll make config porting over upgrades less manual: 

bash-4.2# ls -all /opt/grouper
total 4
drwxr-xr-x.  3 root root   45 Jun 23 21:05 .
drwxr-xr-x. 10 root root  119 May 18 15:14 ..
drwxr-xr-x. 13 root root 4096 Jun 23 21:08 2.3.0
lrwxrwxrwx.  1 root root   31 Jun 23 21:05 home -> latest/grouper.apiBinary-2.3.0/
lrwxrwxrwx.  1 root root    5 Jun 23 19:52 latest -> 2.3.0

export GROUPER_HOME = /opt/grouper/home

I didn't see a setting in bin/.groovy/groovysh.profile to adjust its expectations on how GROUPER_HOME is defined to put it more in line with the guide.

Recently, I wanted to test a loader job using gsh.groovy and received the following:

#also, the steps for testing the new loader job using gsh.groovy left out the initial startRootSession();  Probably second nature to those more familiar with gsh, but for a first-timer, it sent me to the main docs to see what I was missing
groovy:000> grouperSession = GrouperSession.startRootSession();
===> 38319284921b4c508e939fcf43d24ca4,'GrouperSystem','application'
groovy:000> job = GroupFinder.findByName(grouperSession, "loader:thisLoaderGroupName");
===> Group[name=loader:thisLoaderGroupName,uuid=9195e687db2048ef837284781155ebd1]
groovy:000> lo
long    log
groovy:000> loaderRunOneJob(job);
ERROR groovy.lang.MissingMethodException:
No signature of method: groovysh_evaluate.loaderRunOneJob() is applicable for argument types: (edu.internet2.middleware.grouper.Group) values: [Group[name=loader:thisLoaderGroupName,uuid=9195e687db2048ef837284781155ebd1]]

I can drop into classic gsh and was able to run the loader to completion:

gsh 0% grouperSession = GrouperSession.startRootSession();
edu.internet2.middleware.grouper.GrouperSession: 994c0c91b6f446e2a4fe39a949823832,'GrouperSystem','application'
gsh 1% job = GroupFinder.findByName(grouperSession, "loader:thisLoaderGroupName");
group: name='loader:thisLoaderGroupName' displayName='loader:thisLoaderGroupName' uuid='9195e687db2048ef837284781155ebd1'
gsh 4% loaderRunOneJob(job);

...***...

loader ran with subject problems, inserted 1 memberships, deleted 0 memberships, total membership count: 5325, unresolvable subjects: 3734

I'm sure if how I've set GROUPER_HOME has impacted loader commands in gsh.groovy or not.  Does anyone have any insight into what I may be running into here?

Thanks!


--
Jeffrey Williams, SQL Server 2012 MCSA, Windows Server 2012 MCSA
Identity Management Specialist
Identity Architecture, ITS
University of North Carolina at Greensboro
256-TECH (256-8324)



Archive powered by MHonArc 2.6.19.

Top of Page