Support Questions

Find answers, ask questions, and share your expertise

Ambari server fails to start after upgrading from 2.3 to 2.5, HDP is 2.6

avatar
Contributor

1) Error injecting constructor, org.apache.ambari.server.StackAccessException: Stack data, stackName=HDP, stackVersion=2.3, serviceName=ZEPPELIN at org.apache.ambari.server.state.ServiceImpl.<init>(ServiceImpl.java:150) while locating org.apache.ambari.server.state.Service annotated with interface com.google.inject.assistedinject.Assisted at org.apache.ambari.server.state.cluster.ClusterImpl.<init>(ClusterImpl.java:341) while locating org.apache.ambari.server.state.Cluster annotated with interface com.google.inject.assistedinject.Assisted at org.apache.ambari.server.state.cluster.ClustersImpl.loadClustersAndHosts(ClustersImpl.java:186) at org.apache.ambari.server.state.cluster.ClustersImpl.class(ClustersImpl.java:102) while locating org.apache.ambari.server.state.cluster.ClustersImpl while locating org.apache.ambari.server.state.Clusters for parameter 0 at org.apache.ambari.server.agent.HeartBeatHandler.<init>(HeartBeatHandler.java:161) at org.apache.ambari.server.agent.HeartBeatHandler.class(HeartBeatHandler.java:122) while locating org.apache.ambari.server.agent.HeartBeatHandler 1 error at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987) at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013) at org.apache.ambari.server.controller.AmbariServer.performStaticInjection(AmbariServer.java:885) at org.apache.ambari.server.controller.AmbariServer.run(AmbariServer.java:301) at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:1011) Caused by: org.apache.ambari.server.StackAccessException: Stack data, stackName=HDP, stackVersion=2.3, serviceName=ZEPPELIN at org.apache.ambari.server.api.services.AmbariMetaInfo.getService(AmbariMetaInfo.java:536) at org.apache.ambari.server.state.ServiceImpl.<init>(ServiceImpl.java:183) at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40) at com.google.inject.internal.ProxyFactory$ProxyConstructor.newInstance(ProxyFactory.java:260) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254) at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031) at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974) at com.google.inject.assistedinject.FactoryProvider2.invoke(FactoryProvider2.java:632) at com.sun.proxy.$Proxy15.createExisting(Unknown Source) at org.apache.ambari.server.state.cluster.ClusterImpl.loadServices(ClusterImpl.java:461) at org.apache.ambari.server.state.cluster.ClusterImpl.<init>(ClusterImpl.java:352) at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40) :

1 ACCEPTED SOLUTION

avatar
Master Mentor

@kotesh banoth

Looks like you were earlier using OLD "Tech Preview" Zeppelin.

.

Please try to delete it completely and then start server again. You can delete the Zeppelin from Ambari Database.

Step0). Stop Ambari Server. Take Zeppelin Notebook/interpreter backup.

# ambari-server stop

Step1). First Take a Latest DB Dump. (before making any DB change we should take a DB dump).

Step2). Delete the Zepelin service complete from ambari DB using the following DB Queries:

delete from hostcomponentstate where service_name = 'ZEPPELIN'; 
delete from hostcomponentdesiredstate where service_name = 'ZEPPELIN'; 
delete from servicecomponentdesiredstate where service_name = 'ZEPPELIN'; 
delete from servicedesiredstate where service_name = 'ZEPPELIN'; 
delete from alert_current where history_id in (select alert_id from alert_history where service_name = 'ZEPPELIN'); 
delete from alert_notice where history_id in (select alert_id from alert_history where service_name = 'ZEPPELIN'); 
delete from alert_history where service_name = 'ZEPPELIN'; 
delete from alert_grouping where definition_id in (select definition_id from alert_definition where service_name = 'ZEPPELIN'); 
delete from alert_history where alert_definition_id in (select definition_id from alert_definition where service_name = 'ZEPPELIN'); 
delete from alert_current where definition_id in (select definition_id from alert_definition where service_name = 'ZEPPELIN');
delete from alert_definition where service_name = 'ZEPPELIN'; 
delete from alert_group_target where group_id in ( select group_id from alert_group where service_name = 'ZEPPELIN'); 
delete from alert_group where service_name = 'ZEPPELIN'; 
delete from serviceconfighosts where service_config_id in (select service_config_id from serviceconfig where service_name = 'ZEPPELIN'); 
delete from serviceconfigmapping where service_config_id in (select service_config_id from serviceconfig where service_name = 'ZEPPELIN'); 
delete from serviceconfig where service_name = 'ZEPPELIN'; 
delete from requestresourcefilter where service_name = 'ZEPPELIN'; 
delete from requestoperationlevel where service_name = 'ZEPPELIN'; 
delete from clusterservices where service_name ='ZEPPELIN'; 
delete from clusterconfig where type_name like 'zeppelin%'; 
delete from clusterconfigmapping where type_name like 'zeppelin%'; 

Step3). Start the Ambari Server.

# ambari-server start

.

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@kotesh banoth

Looks like you were earlier using OLD "Tech Preview" Zeppelin.

.

Please try to delete it completely and then start server again. You can delete the Zeppelin from Ambari Database.

Step0). Stop Ambari Server. Take Zeppelin Notebook/interpreter backup.

# ambari-server stop

Step1). First Take a Latest DB Dump. (before making any DB change we should take a DB dump).

Step2). Delete the Zepelin service complete from ambari DB using the following DB Queries:

delete from hostcomponentstate where service_name = 'ZEPPELIN'; 
delete from hostcomponentdesiredstate where service_name = 'ZEPPELIN'; 
delete from servicecomponentdesiredstate where service_name = 'ZEPPELIN'; 
delete from servicedesiredstate where service_name = 'ZEPPELIN'; 
delete from alert_current where history_id in (select alert_id from alert_history where service_name = 'ZEPPELIN'); 
delete from alert_notice where history_id in (select alert_id from alert_history where service_name = 'ZEPPELIN'); 
delete from alert_history where service_name = 'ZEPPELIN'; 
delete from alert_grouping where definition_id in (select definition_id from alert_definition where service_name = 'ZEPPELIN'); 
delete from alert_history where alert_definition_id in (select definition_id from alert_definition where service_name = 'ZEPPELIN'); 
delete from alert_current where definition_id in (select definition_id from alert_definition where service_name = 'ZEPPELIN');
delete from alert_definition where service_name = 'ZEPPELIN'; 
delete from alert_group_target where group_id in ( select group_id from alert_group where service_name = 'ZEPPELIN'); 
delete from alert_group where service_name = 'ZEPPELIN'; 
delete from serviceconfighosts where service_config_id in (select service_config_id from serviceconfig where service_name = 'ZEPPELIN'); 
delete from serviceconfigmapping where service_config_id in (select service_config_id from serviceconfig where service_name = 'ZEPPELIN'); 
delete from serviceconfig where service_name = 'ZEPPELIN'; 
delete from requestresourcefilter where service_name = 'ZEPPELIN'; 
delete from requestoperationlevel where service_name = 'ZEPPELIN'; 
delete from clusterservices where service_name ='ZEPPELIN'; 
delete from clusterconfig where type_name like 'zeppelin%'; 
delete from clusterconfigmapping where type_name like 'zeppelin%'; 

Step3). Start the Ambari Server.

# ambari-server start

.

avatar
Contributor

Thanks so much,

steps followed:

1) psql ambari -U ambari -W -p 5432

2) pg_dump ambari -U ambari -W -p 5432 > ambari_bkup

3) Delete commands

4) ambari-server start