[ https://issues.apache.org/jira/browse/AMBARI-23480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Levas updated AMBARI-23480: ---------------------------------- Reporter: Priyank Shah (was: Attila Magyar) > Error encountered while disabling Kerberos on HDF 3.2 using Ambari 2.7.0.0 > -------------------------------------------------------------------------- > > Key: AMBARI-23480 > URL: https://issues.apache.org/jira/browse/AMBARI-23480 > Project: Ambari > Issue Type: Improvement > Components: ambari-server > Affects Versions: 2.7.0 > Reporter: Priyank Shah > Assignee: Attila Magyar > Priority: Major > Fix For: 2.7.0 > > > Ambari version is 2.7.0.0-182 > 1. I installed HDF 3.2 on an openstack using mpack > 2. Enabled Kerberos which went okay and services were all restarted > 3. Disabling Kerberos throws following exception > {code} > 21 Mar 2018 23:10:08,794 ERROR [Server Action Executor Worker 266] > AmbariJpaLocalTxnInterceptor:180 - [DETAILED ERROR] Rollback reason: > Local Exception Stack: > Exception [EclipseLink-4002] (Eclipse Persistence Services - > 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException > Internal Exception: org.postgresql.util.PSQLException: ERROR: update or > delete on table "kerberos_principal" violates foreign key constraint > "fk_kkp_principal_name" on table "kerberos_keytab_principal" > Detail: Key > (principal_name)=(amshbase/priyank-3-2-2.openstacklo...@example.com) is still > referenced from table "kerberos_keytab_principal". > Error Code: 0 > Call: DELETE FROM kerberos_principal WHERE (principal_name = ?) > bind => [1 parameter bound] > at > org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340) > at > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processExceptionForCommError(DatabaseAccessor.java:1620) > at > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:900) > at > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:964) > at > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:633) > at > org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatch(ParameterizedSQLBatchWritingMechanism.java:149) > at > org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatchedStatements(ParameterizedSQLBatchWritingMechanism.java:134) > at > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.writesCompleted(DatabaseAccessor.java:1845) > at > org.eclipse.persistence.internal.sessions.AbstractSession.writesCompleted(AbstractSession.java:4300) > at > org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.writesCompleted(UnitOfWorkImpl.java:5592) > at > org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.acquireWriteLocks(UnitOfWorkImpl.java:1646) > at > org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransactionAfterWriteChanges(UnitOfWorkImpl.java:1614) > at > org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:285) > at > org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1169) > at > org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:134) > at > org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:153) > at > com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77) > at > com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55) > at > org.apache.ambari.server.orm.dao.KerberosPrincipalDAO$$EnhancerByGuice$$fe23de42.remove(<generated>) > at > org.apache.ambari.server.serveraction.kerberos.DestroyPrincipalsServerAction.processIdentity(DestroyPrincipalsServerAction.java:143) > at > org.apache.ambari.server.serveraction.kerberos.KerberosServerAction.processIdentities(KerberosServerAction.java:435) > at > org.apache.ambari.server.serveraction.kerberos.DestroyPrincipalsServerAction.execute(DestroyPrincipalsServerAction.java:88) > at > org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.execute(ServerActionExecutor.java:550) > at > org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.run(ServerActionExecutor.java:466) > at java.lang.Thread.run(Thread.java:745) > Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on > table "kerberos_principal" violates foreign key constraint > "fk_kkp_principal_name" on table "kerberos_keytab_principal" > Detail: Key > (principal_name)=(amshbase/priyank-3-2-2.openstacklo...@example.com) is still > referenced from table "kerberos_keytab_principal". > at > org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161) > at > org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890) > at > org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) > at > org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559) > at > org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) > at > org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363) > at > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:892) > ... 22 more > 21 Mar 2018 23:10:08,795 ERROR [Server Action Executor Worker 266] > AmbariJpaLocalTxnInterceptor:188 - [DETAILED ERROR] Internal exception (1) : > org.postgresql.util.PSQLException: ERROR: update or delete on table > "kerberos_principal" violates foreign key constraint "fk_kkp_principal_name" > on table "kerberos_keytab_principal" > Detail: Key > (principal_name)=(amshbase/priyank-3-2-2.openstacklo...@example.com) is still > referenced from table "kerberos_keytab_principal". > at > org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161) > at > org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890) > at > org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) > at > org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559) > at > org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) > at > org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363) > at > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:892) > at > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:964) > at > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:633) > at > org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatch(ParameterizedSQLBatchWritingMechanism.java:149) > at > org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatchedStatements(ParameterizedSQLBatchWritingMechanism.java:134) > at > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.writesCompleted(DatabaseAccessor.java:1845) > at > org.eclipse.persistence.internal.sessions.AbstractSession.writesCompleted(AbstractSession.java:4300) > at > org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.writesCompleted(UnitOfWorkImpl.java:5592) > at > org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.acquireWriteLocks(UnitOfWorkImpl.java:1646) > at > org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransactionAfterWriteChanges(UnitOfWorkImpl.java:1614) > at > org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:285) > at > org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1169) > at > org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:134) > at > org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:153) > at > com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77) > at > com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55) > at > org.apache.ambari.server.orm.dao.KerberosPrincipalDAO$$EnhancerByGuice$$fe23de42.remove(<generated>) > at > org.apache.ambari.server.serveraction.kerberos.DestroyPrincipalsServerAction.processIdentity(DestroyPrincipalsServerAction.java:143) > at > org.apache.ambari.server.serveraction.kerberos.KerberosServerAction.processIdentities(KerberosServerAction.java:435) > at > org.apache.ambari.server.serveraction.kerberos.DestroyPrincipalsServerAction.execute(DestroyPrincipalsServerAction.java:88) > at > org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.execute(ServerActionExecutor.java:550) > at > org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.run(ServerActionExecutor.java:466) > at java.lang.Thread.run(Thread.java:745) > 21 Mar 2018 23:10:08,795 WARN [Server Action Executor Worker 266] > DestroyPrincipalsServerAction:173 - Failed to remove identity for > amshbase/priyank-3-2-2.openstacklo...@example.com from the Ambari database - > Exception [EclipseLink-4002] (Eclipse Persistence Services - > 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException > Internal Exception: org.postgresql.util.PSQLException: ERROR: update or > delete on table "kerberos_principal" violates foreign key constraint > "fk_kkp_principal_name" on table "kerberos_keytab_principal" > Detail: Key > (principal_name)=(amshbase/priyank-3-2-2.openstacklo...@example.com) is still > referenced from table "kerberos_keytab_principal". > Error Code: 0 > Call: DELETE FROM kerberos_principal WHERE (principal_name = ?) > bind => [1 parameter bound] > 21 Mar 2018 23:10:08,795 INFO [Server Action Executor Worker 266] > DestroyPrincipalsServerAction:117 - Destroying identity, > nimbus/priyank-3-2-1.openstacklo...@example.com > 21 Mar 2018 23:10:08,824 INFO [Server Action Executor Worker 266] > DestroyPrincipalsServerAction:117 - Destroying identity, > ambari-qa-...@example.com > 21 Mar 2018 23:10:08,864 INFO [Server Action Executor Worker 266] > KerberosServerAction:456 - Processing identities completed. > {code} > This happens when the same principal is stored in multiple keytabs. -- This message was sent by Atlassian JIRA (v7.6.3#76005)