Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

Removing and reinstalling A Service Causes DB Verification To Produce Warnings in ambari

Contributor

When you restart ambari server you will see warning.

This is for ambari 2.6.1 version

2018-05-31 13:52:47,897 WARN - You have config(s): hive-interactive-site-version1526669268436,spark2-thrift-sparkconf-version1523470551917,hive-env-version1523468253282,ranger-hive-security-version1523468253282,hive-interactive-site-version1523468253282,hive-site-version1523470551910,hive-env-version1523470551912,webhcat-site-version1523476281613,spark2-defaults-version1523546169843,ranger-hive-security-version1523541830065,webhcat-site-version1523468253282,hive-interactive-env-version1526669268434,oozie-site-version1523476282031,ranger-hive-security-version1523470551914,hive-site-version1523475239563,livy2-conf-version1523470551917,oozie-site-version1523470551917,hive-env-version1524144296621,ranger-hive-policymgr-ssl-version1523470551915,oozie-site-version1523548496113,hive-env-version1523475386015,hive-interactive-site-version1526679191562,tez-interactive-site-version1523468253282,hive-interactive-env-version1526679191561,ranger-hive-audit-version1523473225964,oozie-env-version1523470551917,hive-site-version1523544593764,oozie-site-version1523631139320,hive-site-version1526676861358,hive-site-version1523476281402,oozie-env-version1523548262140,hive-interactive-site-version1526676861357,ranger-hive-audit-version1523468253282,ranger-hive-audit-version1523470551913,spark2-defaults-version1523470551917,spark2-defaults-version1523476281670,hive-interactive-site-version1526672227348,hive-site-version1523468253282,hive-interactive-env-version1523468253282,hive-env-version1524243680992,tez-interactive-site-version1526669268437,oozie-site-version1523554724976,tez-interactive-site-version1526674777606,ranger-hive-plugin-properties-version1523468253282,hive-interactive-env-version1526672227349,hive-atlas-application.properties-version1523468253282,hive-site-version1526670928225,hive-site-version1523475386016,ranger-hive-policymgr-ssl-version1523468253282,hive-interactive-site-version1523476282107,hiveserver2-site-version1523468253282 that is(are) not mapped (in serviceconfigmapping table) to any service!

1 ACCEPTED SOLUTION

Contributor

For old version of ambari:https://issues.apache.org/jira/browse/AMBARI-20875

For 2.6.1:

ambari-server start --auto-fix-database

1.- backup ambari

2.- run this querys

###### SELECT cc.config_id, cc.type_name, cc.version_tag FROM ambari.clusterconfig cc, ambari.clusterconfig ccm WHERE cc.config_id NOT IN (SELECT scm.config_id FROM ambari.serviceconfigmapping scm) AND cc.type_name != 'cluster-env' AND cc.type_name = ccm.type_name AND cc.version_tag = ccm.version_tag;

CREATE TEMPORARY TABLE orphaned_configs AS (SELECT cc.config_id FROM ambari.clusterconfig cc WHERE cc.config_id NOT IN (SELECT scm.config_id FROM ambari.serviceconfigmapping scm) AND cc.type_name != 'cluster-env');

delete FROM ambari.clusterconfig WHERE config_id IN (SELECT config_id from orphaned_configs); ######

View solution in original post

3 REPLIES 3

Contributor

For old version of ambari:https://issues.apache.org/jira/browse/AMBARI-20875

For 2.6.1:

ambari-server start --auto-fix-database

1.- backup ambari

2.- run this querys

###### SELECT cc.config_id, cc.type_name, cc.version_tag FROM ambari.clusterconfig cc, ambari.clusterconfig ccm WHERE cc.config_id NOT IN (SELECT scm.config_id FROM ambari.serviceconfigmapping scm) AND cc.type_name != 'cluster-env' AND cc.type_name = ccm.type_name AND cc.version_tag = ccm.version_tag;

CREATE TEMPORARY TABLE orphaned_configs AS (SELECT cc.config_id FROM ambari.clusterconfig cc WHERE cc.config_id NOT IN (SELECT scm.config_id FROM ambari.serviceconfigmapping scm) AND cc.type_name != 'cluster-env');

delete FROM ambari.clusterconfig WHERE config_id IN (SELECT config_id from orphaned_configs); ######

@Sudheer Velagapudi

How did you remove the service from Ambari? Did you used UI/API to do that? looks like there are stale Hive, oozie, ranger configs are there.

You can try cleaning up those services by following https://community.hortonworks.com/articles/79546/how-to-cleanup-service-from-ambari-database.html

Contributor

I used ambari to uninstall and reinstall those services.