Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] problem running grouper on copy of its database

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] problem running grouper on copy of its database


Chronological Thread 
  • From: Baron Fujimoto <>
  • To: "Hyzer, Chris" <>
  • Cc: Grouper Users <>
  • Subject: Re: [grouper-users] problem running grouper on copy of its database
  • Date: Fri, 28 Apr 2017 09:26:51 -1000
  • Ironport-phdr: 9a23:xyikQBOs1lRf4GEMPtUl6mtUPXoX/o7sNwtQ0KIMzox0K/z5psbcNUDSrc9gkEXOFd2CrakV1ayK4+u5Aj1IyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSijewZbJ/IA+5oAjSucUanIVvJ6IswRbVv3VEfPhby3l1LlyJhRb84cmw/J9n8ytOvv8q6tBNX6bncakmVLJUFDspPXw7683trhnDUBCA5mAAXWUMkxpHGBbK4RfnVZrsqCT6t+592C6HPc3qSL0/RDqv47t3RBLulSwKLCAy/n3JhcNsjaJbuBOhqAJ5w47Ie4GeKf5ycrrAcd8GWWZNW8BcXDFDDIyhdYsCF+QPM+ZGoYfgpFUOoxSxChWxC+ztxDBFnWP20bEg3ug9DQ3LxhIsEtQTu3rUttX1M6ISXPiowabS1zXDaPVW0ir95ojVcBAhoPSMXbVsccrW1EIiEBjKgU+KqYziOTOYzeQNvHKV7uV6VOKvinQrpB9srTiy38ohjJTCiIwSylDB7yp5wYA1KMW4SEFhb9+rCppQtyCAO4RoX8wiXnlktz06y70BopG7fjYFx4g7xx7Ed/yIaZSI4hP/W+qLOjd3nmxld6ynixa960igzfD8VtGq31ZQtCZKiMHMtmgV2xzT68iIUfVw/kK/1jaKzA/c9PtEIVs0laraM54u36Q/lp0JvUTYBCD2hlv5gLeNeUQk/ein8Obnbav6qZ+ALYN0kRvxMrowlcG5HO82MRAOUnCF9em9yLHu/0j0QLtJg/ItjqXUtZ/XKdgHqqGnBgJazpov5ha6AjqjztgUg2QIIEpYdB6ZjIXlIUzCLfLlAfulnligiilnyvbbNbP7GJrNNGLMkLL5cLZ99UFczA0zwMha551OC7EBJOv/Wlf+tNDEFxM4PBK4z/j6B9ln2YMeXmWPAqCdMKzMq1OH+uUvI+yUaI8UvjbyNeQl6ubwgXI4hVMQf6yk3ZUUZX+jAvhrJkqUbWbwjtgfFGoFohYyQezvhVCHTzJfeWu9U7o55j4hCYKmCYnDRpqqgLyExCq0BYdZZnpBClCKCnrod5+LWvkWZyKTI89tiCILWqW8S4M5zxGhqBf6y6Z7LurT4iAYuojj1N9o5+3Lix4y7yV4D9mG026TVWF0hXgFRzs33KBkvUx90UmP3bJ5g/xeCdxc+elJUgEkOp7A0eB2Ec79VR/cfoTBdFHzCPW3EzwrCpoaw8UPeAw1T9CpjgHR0jCCAqQe0aGTCZoytK/Qwi6iCdx6ziPs3bMmiREIX8lOMGq6geYr/QHJAIjhk0yGnqerM6kQwXiepy+40WOSsRQAA0ZLWqLfUCVaPxOOoA==

AFAIK, there *shouldn't* be any differences. Our DBA has told us that the
cloning was done via MySQL WorkBench's Data Export (self-contained file,
single transaction option). And imported via the Data Import option.
Export and import DBs are on different hosts (but should likewise be
prettymuch the same).

I will try repeating the process myself with MySQL Workbench. Maybe also
try re-exporting the resulting copy and compare the single-file .sql
export for differences.

-baron

On Fri, Apr 28, 2017 at 07:16:57PM +0000, Hyzer, Chris wrote:
>It should work.
>
>Are there any settings about case or character encoding or something that is
>different? I do the same thing with oracle all the time. And I did it with
>mysql recently when migrating demo servers.
>
>How did they clone it? Export to SQL scripts?
>
>Thanks
>Chris
>
>
>-----Original Message-----
>From:
>
>
>[mailto:]
> On Behalf Of Baron Fujimoto
>Sent: Thursday, April 27, 2017 5:02 PM
>To: Grouper Users
><>
>Subject: [grouper-users] problem running grouper on copy of its database
>
>We had this problem about a year ago, and unfortunately we never did
>manage to figure it out. We're working on our infrastructure again now,
>and so we find ourselves confronted with it again.
>
>We're running Grouper 2.2.2. I believe it's fully patched
>(grouper_v2_2_2_api_patch_11). Our DBA had cloned (exported/imported) the
>DBs from a source MySQL host to a new MySQL host. However, when we
>configure Grouper to point ot the cloned DBs, we get the following errors
>(for example when trying to run gsh):
>
>=====
>Couldnt startup grouper: Problem in HibernateSession: HibernateSession
>(5c77ba8f): notNew, notReadonly, READ_WRITE_NEW, activeTransaction, session
>(66273da0),
>Exception in save: edu.internet2.middleware.grouper.Membership,
>ByObjectStatic, query: ', cacheable: null, cacheRegion: null, entityName:
>ImmediateMembershipEntry, tx type: null,
>Problem in HibernateSession: HibernateSession (30364216): new, notReadonly,
>READ_WRITE_NEW, notActiveTransaction, session (66273da0)
>edu.internet2.middleware.grouper.internal.dao.GrouperDAOException: Problem
>in HibernateSession: HibernateSession (5c77ba8f): notNew, notReadonly,
>READ_WRITE_NEW, activeTransaction, session (66273da0),
>Exception in save: edu.internet2.middleware.grouper.Membership,
>ByObjectStatic, query: ', cacheable: null, cacheRegion: null, entityName:
>ImmediateMembershipEntry, tx type: null,
>Problem in HibernateSession: HibernateSession (30364216): new, notReadonly,
>READ_WRITE_NEW, notActiveTransaction, session (66273da0)
>...
>Caused by: org.hibernate.exception.ConstraintViolationException: Could not
>execute JDBC batch update,
>Exception in save: edu.internet2.middleware.grouper.Membership,
>edu.internet2.middleware.grouper.hibernate.ByObject@6ede46f6
>...
>Caused by: java.sql.BatchUpdateException: Duplicate entry
>'56a628646e5949bf89868455caa72adb-39e8f222fa1d434f87d40cc4f063371' for key
>'membership_uniq_idx'
>=====
>
>I'm told that when the DBs are cloned it includes all
>tables/views/constraints/foreignkeys.
>
>I didn't find any actual duplicates in either the original or copy of the
>DBs using the command,
>
>"select owner_id, member_id, field_id from grouper_memberships group by
>owner_id, member_id, field_id having count(*) > 1"
>
>Nor are there nulls as reported by,
>
>"select owner_id, member_id, field_id from grouper_memberships where
>owner_id = null or member_id = null or field_id = null;"
>
>If I search with the the value of the entry reported in the error msg, e.g.
>
>"SELECT * FROM grouper_memberships where owner_id like
>'56a628646e5949bf89868455caa72adb';"
>
>I get the same results for both the original and the copy of the DB.
>
>id,member_id,owner_id,field_id,owner_group_id,owner_stem_id,owner_attr_def_id,via_composite_id,enabled,enabled_timestamp,disabled_timestamp,mship_type,creator_id,create_time,hibernate_version_number,context_id
>7e137eca43ac4a65a2b83b7e857f29b8,39e8f222fa1d434f87d40cc4f0633717,56a628646e5949bf89868455caa72adb,5d5dce817f7e411799fc5f5e6328a28c,NULL,NULL,56a628646e5949bf89868455caa72adb,NULL,T,NULL,NULL,immediate,a166b283e3124910a9f0661eae5b2b8e,1460748581132,0,NULL
>968d28bd7585499f97bc0b291e47dc87,39e8f222fa1d434f87d40cc4f0633717,56a628646e5949bf89868455caa72adb,cda43f2141844e7aaaa79dfc0c119757,NULL,NULL,56a628646e5949bf89868455caa72adb,NULL,T,NULL,NULL,immediate,a166b283e3124910a9f0661eae5b2b8e,1460748581148,0,NULL
>28c6bdfa8132434baf008d51b22b46dd,a166b283e3124910a9f0661eae5b2b8e,56a628646e5949bf89868455caa72adb,0239be70f97243f690e1372cecd634dd,NULL,NULL,56a628646e5949bf89868455caa72adb,NULL,T,NULL,NULL,immediate,a166b283e3124910a9f0661eae5b2b8e,1460748581112,0,79c0d83dbb71409e88330a971899016c
>
>We see this problem with every Grouper DB we've copied, so I assume it
>must be something systemic. Any suggestions would be greatly appreciated.
>I'm at a loss at this point.
>
>Full logs:
>=====
>$ ./gsh
>Using GROUPER_HOME: /home/grouper/grouper/grouper.apiBinary-2.2.2/bin/..
>Using GROUPER_CONF: /home/grouper/grouper/grouper.apiBinary-2.2.2/bin/../conf
>Using JAVA: /usr/java/latest/bin/java
>using MEMORY: 64m-750m
>Grouper starting up: version: 2.2.2, build date: null, env: grouper-test
>grouper.properties read from:
>/home/grouper/grouper/grouper.apiBinary-2.2.2/conf/grouper.properties
>Grouper current directory is:
>/home/grouper/grouper/grouper.apiBinary-2.2.2/bin
>log4j.properties read from:
>/home/grouper/grouper/grouper.apiBinary-2.2.2/conf/log4j.properties
>Grouper is logging to file:
>/home/grouper/grouper/logs/grouper-api_error.log, at min level WARN for
>package: edu.internet2.middleware.grouper, based on log4j.properties
>grouper.hibernate.properties:
>/home/grouper/grouper/grouper.apiBinary-2.2.2/conf/grouper.hibernate.properties
>grouper.hibernate.properties:
>grpr_admin@jdbc:mysql://dbfoo.hawaii.edu:3306/grprfoo?CharSet=utf8&useUnicode=true&characterEncoding=utf8
>sources.xml read from:
>/home/grouper/grouper/grouper.apiBinary-2.2.2/conf/sources.xml
>sources.xml ldap source id: UH test LDAP:
>cn=*****@ldaps://ldapfoo.hawaii.edu:636
>sources.xml groupersource id: g:gsa
>sources.xml groupersource id: grouperEntities
>Couldnt startup grouper: Problem in HibernateSession: HibernateSession
>(5c77ba8f): notNew, notReadonly, READ_WRITE_NEW, activeTransaction, session
>(66273da0),
>Exception in save: edu.internet2.middleware.grouper.Membership,
>ByObjectStatic, query: ', cacheable: null, cacheRegion: null, entityName:
>ImmediateMembershipEntry, tx type: null,
>Problem in HibernateSession: HibernateSession (30364216): new, notReadonly,
>READ_WRITE_NEW, notActiveTransaction, session (66273da0)
>edu.internet2.middleware.grouper.internal.dao.GrouperDAOException: Problem
>in HibernateSession: HibernateSession (5c77ba8f): notNew, notReadonly,
>READ_WRITE_NEW, activeTransaction, session (66273da0),
>Exception in save: edu.internet2.middleware.grouper.Membership,
>ByObjectStatic, query: ', cacheable: null, cacheRegion: null, entityName:
>ImmediateMembershipEntry, tx type: null,
>Problem in HibernateSession: HibernateSession (30364216): new, notReadonly,
>READ_WRITE_NEW, notActiveTransaction, session (66273da0)
> at
> edu.internet2.middleware.grouper.hibernate.HibernateSession._internal_hibernateSessionCatch(HibernateSession.java:575)
> at
> edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:697)
> at
> edu.internet2.middleware.grouper.hibernate.ByObjectStatic.save(ByObjectStatic.java:468)
> at
> edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MembershipDAO.save(Hib3MembershipDAO.java:2053)
> at
> edu.internet2.middleware.grouper.Membership.internal_addImmediateMembership(Membership.java:2748)
> at
> edu.internet2.middleware.grouper.privs.GrouperNonDbAttrDefAdapter$1.callback(GrouperNonDbAttrDefAdapter.java:243)
> at
> edu.internet2.middleware.grouper.GrouperSession.callbackGrouperSession(GrouperSession.java:974)
> at
> edu.internet2.middleware.grouper.privs.GrouperNonDbAttrDefAdapter.grantPriv(GrouperNonDbAttrDefAdapter.java:228)
> at
> edu.internet2.middleware.grouper.privs.AttributeDefWrapper.grantPrivilege(AttributeDefWrapper.java:147)
> at
> edu.internet2.middleware.grouper.privs.AttributeDefResolverDecorator.grantPrivilege(AttributeDefResolverDecorator.java:144)
> at
> edu.internet2.middleware.grouper.privs.AttributeDefResolverDecorator.grantPrivilege(AttributeDefResolverDecorator.java:144)
> at
> edu.internet2.middleware.grouper.privs.CachingAttrDefResolver.grantPrivilege(CachingAttrDefResolver.java:179)
> at
> edu.internet2.middleware.grouper.privs.AttributeDefResolverDecorator.grantPrivilege(AttributeDefResolverDecorator.java:144)
> at
> edu.internet2.middleware.grouper.privs.ValidatingAttrDefResolver.grantPrivilege(ValidatingAttrDefResolver.java:116)
> at
> edu.internet2.middleware.grouper.attr.AttributeDefPrivilegeDelegate$2.callback(AttributeDefPrivilegeDelegate.java:453)
> at
> edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:687)
> at
> edu.internet2.middleware.grouper.attr.AttributeDefPrivilegeDelegate.internal_grantPriv(AttributeDefPrivilegeDelegate.java:441)
> at
> edu.internet2.middleware.grouper.attr.AttributeDefPrivilegeDelegate.grantPriv(AttributeDefPrivilegeDelegate.java:295)
> at
> edu.internet2.middleware.grouper.misc.GrouperCheckConfig.checkAttributes(GrouperCheckConfig.java:2242)
> at
> edu.internet2.middleware.grouper.misc.GrouperCheckConfig.checkConfig(GrouperCheckConfig.java:433)
> at
> edu.internet2.middleware.grouper.misc.GrouperStartup.startup(GrouperStartup.java:256)
> at
> edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:151)
> at
> edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:31)
>Caused by: org.hibernate.exception.ConstraintViolationException: Could not
>execute JDBC batch update,
>Exception in save: edu.internet2.middleware.grouper.Membership,
>edu.internet2.middleware.grouper.hibernate.ByObject@6ede46f6
> at
> org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
> at
> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
> at
> org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
> at
> org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
> at
> org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
> at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
> at
> edu.internet2.middleware.grouper.hibernate.ByObject.save(ByObject.java:214)
> at
> edu.internet2.middleware.grouper.hibernate.ByObjectStatic$7.callback(ByObjectStatic.java:481)
> at
> edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:687)
> ... 21 more
>Caused by: java.sql.BatchUpdateException: Duplicate entry
>'56a628646e5949bf89868455caa72adb-39e8f222fa1d434f87d40cc4f063371' for key
>'membership_uniq_idx'
> at
> com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1269)
> at
> com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:955)
> at
> com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
> at
> org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
> at
> org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
> ... 29 more
>Exception in thread "main"
>edu.internet2.middleware.grouper.internal.dao.GrouperDAOException: Problem
>in HibernateSession: HibernateSession (5c77ba8f): notNew, notReadonly,
>READ_WRITE_NEW, activeTransaction, session (66273da0),
>Exception in save: edu.internet2.middleware.grouper.Membership,
>ByObjectStatic, query: ', cacheable: null, cacheRegion: null, entityName:
>ImmediateMembershipEntry, tx type: null,
>Problem in HibernateSession: HibernateSession (30364216): new, notReadonly,
>READ_WRITE_NEW, notActiveTransaction, session (66273da0)
> at
> edu.internet2.middleware.grouper.hibernate.HibernateSession._internal_hibernateSessionCatch(HibernateSession.java:575)
> at
> edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:697)
> at
> edu.internet2.middleware.grouper.hibernate.ByObjectStatic.save(ByObjectStatic.java:468)
> at
> edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MembershipDAO.save(Hib3MembershipDAO.java:2053)
> at
> edu.internet2.middleware.grouper.Membership.internal_addImmediateMembership(Membership.java:2748)
> at
> edu.internet2.middleware.grouper.privs.GrouperNonDbAttrDefAdapter$1.callback(GrouperNonDbAttrDefAdapter.java:243)
> at
> edu.internet2.middleware.grouper.GrouperSession.callbackGrouperSession(GrouperSession.java:974)
> at
> edu.internet2.middleware.grouper.privs.GrouperNonDbAttrDefAdapter.grantPriv(GrouperNonDbAttrDefAdapter.java:228)
> at
> edu.internet2.middleware.grouper.privs.AttributeDefWrapper.grantPrivilege(AttributeDefWrapper.java:147)
> at
> edu.internet2.middleware.grouper.privs.AttributeDefResolverDecorator.grantPrivilege(AttributeDefResolverDecorator.java:144)
> at
> edu.internet2.middleware.grouper.privs.AttributeDefResolverDecorator.grantPrivilege(AttributeDefResolverDecorator.java:144)
> at
> edu.internet2.middleware.grouper.privs.CachingAttrDefResolver.grantPrivilege(CachingAttrDefResolver.java:179)
> at
> edu.internet2.middleware.grouper.privs.AttributeDefResolverDecorator.grantPrivilege(AttributeDefResolverDecorator.java:144)
> at
> edu.internet2.middleware.grouper.privs.ValidatingAttrDefResolver.grantPrivilege(ValidatingAttrDefResolver.java:116)
> at
> edu.internet2.middleware.grouper.attr.AttributeDefPrivilegeDelegate$2.callback(AttributeDefPrivilegeDelegate.java:453)
> at
> edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:687)
> at
> edu.internet2.middleware.grouper.attr.AttributeDefPrivilegeDelegate.internal_grantPriv(AttributeDefPrivilegeDelegate.java:441)
> at
> edu.internet2.middleware.grouper.attr.AttributeDefPrivilegeDelegate.grantPriv(AttributeDefPrivilegeDelegate.java:295)
> at
> edu.internet2.middleware.grouper.misc.GrouperCheckConfig.checkAttributes(GrouperCheckConfig.java:2242)
> at
> edu.internet2.middleware.grouper.misc.GrouperCheckConfig.checkConfig(GrouperCheckConfig.java:433)
> at
> edu.internet2.middleware.grouper.misc.GrouperStartup.startup(GrouperStartup.java:256)
> at
> edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:151)
> at
> edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:31)
>Caused by: org.hibernate.exception.ConstraintViolationException: Could not
>execute JDBC batch update,
>Exception in save: edu.internet2.middleware.grouper.Membership,
>edu.internet2.middleware.grouper.hibernate.ByObject@6ede46f6
> at
> org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
> at
> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
> at
> org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
> at
> org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
> at
> org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
> at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
> at
> edu.internet2.middleware.grouper.hibernate.ByObject.save(ByObject.java:214)
> at
> edu.internet2.middleware.grouper.hibernate.ByObjectStatic$7.callback(ByObjectStatic.java:481)
> at
> edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:687)
> ... 21 more
>Caused by: java.sql.BatchUpdateException: Duplicate entry
>'56a628646e5949bf89868455caa72adb-39e8f222fa1d434f87d40cc4f063371' for key
>'membership_uniq_idx'
> at
> com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1269)
> at
> com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:955)
> at
> com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
> at
> org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
> at
> org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
> ... 29 more
>
>--
>Baron Fujimoto
><>
> :: UH Information Technology Services
>minutas cantorum, minutas balorum, minutas carboratum desendus pantorum

--
Baron Fujimoto
<>
:: UH Information Technology Services
minutas cantorum, minutas balorum, minutas carboratum desendus pantorum



Archive powered by MHonArc 2.6.19.

Top of Page