Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-4315

changeLogTempToChangeLog daemon error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 2.6.17
    • 2.6.8
    • None
    • None
    • production

    Description

      Grouper CHANGE_LOG_changeLogTempToChangeLog daemon process failed because of a PIT group issue. Two groups in our production environment were removed from a managed group via the Grouper UI. A loader job deleted those groups from a readers group and the changelog failed. Below is the error we got 

      edu.internet2.middleware.grouper.internal.dao.GrouperDAOException: Problem in HibernateSession: HibernateSession (9e6e46c): notNew, notReadonly, READ_WRITE_NEW, activeTransaction, session (2417333),Exception in uniqueResult: (class edu.internet2.middleware.grouper.pit.PITGroupSet), ByHqlStatic, query: 'select pitGroupSet from PITGroupSet as pitGroupSet where parentId = :parentId and memberId = :memberId and depth = :depth and activeDb = 'T'', cacheable: false, cacheRegion: edu.internet2.middleware.grouper.internal.dao.hib3.Hib3PITGroupSetDAO.FindImmediateChildByParentAndMemberPITGroup, tx type: null, tx type: nullBind var[0]: 'Param (class java.lang.String): 'parentId'->'0000139e6fff4354a0be32c3bef7fbee', Bind var[1]: 'Param (class java.lang.String): 'memberId'->'7387a3d264fc4f65807f2a6cd8e0828c'Bind var[2]: 'Param (class java.lang.Integer): 'depth'->'2', ,Exception in save: edu.internet2.middleware.grouper.pit.PITGroupSet, edu.internet2.middleware.grouper.hibernate.ByObject@7b4250e4,Problem in HibernateSession: HibernateSession (176930c1): notNew, notReadonly, READ_WRITE_NEW, activeTransaction, session (2417333),Exception in saveOrUpdate: edu.internet2.middleware.grouper.pit.PITGroupSet, ByObjectStatic, query: ', cacheable: null, cacheRegion: null, entityName: null, tx type: null,Exception in save: edu.internet2.middleware.grouper.pit.PITMembership, edu.internet2.middleware.grouper.hibernate.ByObject@7bd88d71,Problem in HibernateSession: HibernateSession (31a69b1a): notNew, notReadonly, READ_WRITE_NEW, activeTransaction, session (2417333),Exception in saveOrUpdate: edu.internet2.middleware.grouper.pit.PITMembership, ByObjectStatic, query: ', cacheable: null, cacheRegion: null, entityName: null, tx type: null,Problem in HibernateSession: HibernateSession (73a1d89a): new, notReadonly, READ_WRITE_NEW, notActiveTransaction, session (2417333) at edu.internet2.middleware.grouper.hibernate.HibernateSession._internal_hibernateSessionCatch(HibernateSession.java:588) 
      at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:710) 
      at edu.internet2.middleware.grouper.hibernate.ByHqlStatic.uniqueResult(ByHqlStatic.java:356) 
      at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3PITGroupSetDAO.findActiveImmediateChildByParentAndMemberPITGroup(Hib3PITGroupSetDAO.java:402) 
      at edu.internet2.middleware.grouper.pit.PITGroupSet.onPostUpdate(PITGroupSet.java:1151) at edu.internet2.middleware.grouper.hibernate.ByObject.saveOrUpdate(ByObject.java:487) 
      at edu.internet2.middleware.grouper.hibernate.ByObjectStatic$5.callback(ByObjectStatic.java:376) 
      at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:700) 
      at edu.internet2.middleware.grouper.hibernate.ByObjectStatic.saveOrUpdate(ByObjectStatic.java:363) 
      at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3PITGroupSetDAO.saveOrUpdate(Hib3PITGroupSetDAO.java:55) 
      at edu.internet2.middleware.grouper.pit.PITGroupSet.saveOrUpdate(PITGroupSet.java:353) 
      at edu.internet2.middleware.grouper.pit.PITMembership.onPostUpdate(PITMembership.java:1037) 
      at edu.internet2.middleware.grouper.hibernate.ByObject.saveOrUpdate(ByObject.java:487) 
      at edu.internet2.middleware.grouper.hibernate.ByObjectStatic$5.callback(ByObjectStatic.java:376) 
      at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:700) 
      at edu.internet2.middleware.grouper.hibernate.ByObjectStatic.saveOrUpdate(ByObjectStatic.java:363) 
      at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3PITMembershipDAO.saveOrUpdate(Hib3PITMembershipDAO.java:48) 
      at edu.internet2.middleware.grouper.pit.PITMembership.update(PITMembership.java:380) 
      at edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity.processMembershipDelete(ChangeLogTempToEntity.java:1120) 
      at edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity.access$100(ChangeLogTempToEntity.java:71) 
      at
       

      When we run the query below using the parent and member id we get two rows back which shows that there is a break in the chain and one of the source IDs do not exist in grouper_group_set table.

      select    * from    grouper_pit_group_set
      where    parent_id = '0000139e6fff4354a0be32c3bef7fbee'    and member_id = '7387a3d264fc4f65807f2a6cd8e0828c'    
      and depth = '2'    and active = 'T'; 

       

      The temporary fix for this issue to get the changelog working again was to find all rows in pit_group_set table that do not exist in grouper_group_set table for the member_id that was causing the error and set the active row to 'F' and end_time to current time in the pit_groups_set table. Below is the query we used

      // 
      select
      	count(gpgs.source_id)
      from
      	iamgrouper.grouper_pit_group_set gpgs
      where
          1 = 1
      	and gpgs.member_id = '0000139e6fff4354a0be32c3bef7fbee'
          and gpgs.source_id not in (
           select 
                id
           from 
                iamgrouper.grouper_group_set ggs
           where 
                1 = 1 
            and ggs.id in (
                select
      	           source_id
                from
      	           iamgrouper.grouper_pit_group_set
                where
                     1 = 1
      	       and member_id = '0000139e6fff4354a0be32c3bef7fbee'
                 )
            )
       ; 

      Attachments

        Activity

          People

            shilen.patel@at.internet2.edu Shilen Patel (duke.edu)
            alpha.sanneh.2@at.internet2.edu Alpha Sanneh
            David Portman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: