Ambari Troubleshooting
When upgrading Ambari from one version to another, failing to uninstall management packs (mpacks) can prevent the server from starting, resulting in the following error:
For instance, if Spark3 or any mpack is not uninstalled before the Ambari server upgrade, the error related to Spark3 or that specific mpack will be displayed in the Ambari server logs, as shown below:
x
2024-05-16 10:40:47,569 ERROR [main] SchemaUpgradeHelper:478 - Exception occurred during upgrade, failed
org.apache.ambari.server.AmbariException: Trying to create a ServiceComponent not recognized in stack info, clusterName=ODP_Cerberus_V2, serviceName=SPARK3, componentName=SPARK3_CLIENT, stackInfo=ODP-3.2
at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:244)
at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:461)
Caused by: java.lang.RuntimeException: Trying to create a ServiceComponent not recognized in stack info, clusterName=ODP_Cerberus_V2, serviceName=SPARK3, componentName=SPARK3_CLIENT, stackInfo=ODP-3.2
at org.apache.ambari.server.state.ServiceComponentImpl.updateComponentInfo(ServiceComponentImpl.java:154)
at org.apache.ambari.server.state.ServiceComponentImpl.<init>(ServiceComponentImpl.java:178)
at org.apache.ambari.server.state.ServiceComponentImpl$$EnhancerByGuice$$8b9da3c2.<init>(<generated>)
at org.apache.ambari.server.state.ServiceComponentImpl$$EnhancerByGuice$$8b9da3c2$$FastClassByGuice$$9e99185e.newInstance(<generated>)
at com.google.inject.internal.ProxyFactory$ProxyConstructor.newInstance(ProxyFactory.java:265)
In order to proceed with the Ambari-server upgrade, you must delete the mpack from the backend database. For example, in MySQL, the following steps need to be performed:
> mysql
mysql> use ambari
Database changed
mysql> delete from hostcomponentstate where service_name = 'SPARK3' AND component_name='SPARK3_JOBHISTORYSERVER';
Query OK, 1 row affected (0.00 sec)
mysql> DELETE FROM hostcomponentdesiredstate where service_name = 'SPARK3' AND component_name='SPARK3_JOBHISTORYSERVER';
Query OK, 1 row affected (0.00 sec)
mysql>
mysql> DELETE FROM servicecomponent_version
WHERE component_id IN (SELECT id
FROM servicecomponentdesiredstate
WHERE service_name = 'SPARK3'
AND component_name = 'SPARK3_JOBHISTORYSERVER');
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql>
mysql> DELETE FROM servicecomponentdesiredstate
WHERE service_name = 'SPARK3'
AND component_name = 'SPARK3_JOBHISTORYSERVER';
Query OK, 1 row affected (0.00 sec)
mysql> exit
Once you have deleted the mpack, proceed with the Ambari upgrade.
Was this page helpful?