Hi folks, I am running Version 2.1.2 of Ambari , HDP 2.3 on multinode cluster. I was facing the issues in Knox component so decided to remove the service and re-install it. So I removed issued following command and it disappeared through Ambari web portal. // valid admin
*curl -v -u admin:Ambari-AdminPassword -H "X-Requested-By:ambari" -X DELETE "http://AMBARI_HOST:8080/api/v1/clusters/SecureCluster/services/KNOX <http://AMBARI_HOST:8080/api/v1/clusters/SecureCluster/services/KNOX>"* However when I check in the /usr/hdp/2.3.2.0-2950 directory I found that knox-server and it's directories were not removed. I manually deleted this directory and re-initiated the Knox setup through Ambari. It goes up to step 6 and shows a popup saying : Internal Server error. When I check the Ambari-server logs it looks like service is already present. *Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException* *Internal Exception: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "clusterservices_pkey"* * Detail: Key (service_name, cluster_id)=(KNOX, 2) already exists.* *Error Code: 0* Call: INSERT INTO clusterservices (service_name, service_enabled, cluster_id) VALUES (?, ?, ?) bind => [3 parameters bound] Query: InsertObjectQuery(org.apache.ambari.server.orm.entities.ServiceDesiredStateEntity@fadf9954 ) at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processExceptionForCommError(DatabaseAccessor.java:1611) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:898) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:962) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:631) 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.ParameterizedSQLBatchWritingMechanism.appendCall(ParameterizedSQLBatchWritingMechanism.java:82) ....... *Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "clusterservices_pkey"* * Detail: Key (service_name, cluster_id)=(KNOX, 2) already exists.* at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890) What is the way around? Am I supposed to manually remove the Ambari related database/tables, in which scenario which db/table should we update manually? Regards, DP
