Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Ambari upgrade 2.1.1 to 2.4 ProvisionException

SOLVED Go to solution
Highlighted

Ambari upgrade 2.1.1 to 2.4 ProvisionException

Expert Contributor

Hi,

I have a problem after upgrading Ambari from version 2.1.1 to 2.4. My HDP version is 2.3.2.0-2950. During command "ambari-server upgrade" I got the following error:

Upgrading database schema
Error output from schema upgrade command:
com.google.inject.ProvisionException: Guice provision errors:


1) null returned by binding at org.apache.ambari.server.state.ServiceComponentHostFactory.createExisting()
 but parameter 2 of org.apache.ambari.server.state.svccomphost.ServiceComponentHostImpl.<init>() is not @Nullable
  while locating org.apache.ambari.server.orm.entities.HostComponentDesiredStateEntity annotated with @com.google.inject.assistedinject.Assisted(value=)
    for parameter 2 at org.apache.ambari.server.state.svccomphost.ServiceComponentHostImpl.<init>(ServiceComponentHostImpl.java:805)
  while locating org.apache.ambari.server.state.ServiceComponentHost annotated with interface com.google.inject.assistedinject.Assisted


1 error
        at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
        at com.google.inject.assistedinject.FactoryProvider2.invoke(FactoryProvider2.java:632)
        at com.sun.proxy.$Proxy20.createExisting(Unknown Source)
        at org.apache.ambari.server.state.ServiceComponentImpl.<init>(ServiceComponentImpl.java:166)
        at org.apache.ambari.server.state.ServiceComponentImpl$$EnhancerByGuice$$e3b47c2a.<init>(<generated>)
        at org.apache.ambari.server.state.ServiceComponentImpl$$EnhancerByGuice$$e3b47c2a$$FastClassByGuice$$6e28fac3.newInstance(<generated>)
        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.$Proxy19.createExisting(Unknown Source)
        at org.apache.ambari.server.state.ServiceImpl.<init>(ServiceImpl.java:163)
        at org.apache.ambari.server.state.ServiceImpl$$EnhancerByGuice$$23f59064.<init>(<generated>)
        at org.apache.ambari.server.state.ServiceImpl$$EnhancerByGuice$$23f59064$$FastClassByGuice$$9947c704.newInstance(<generated>)
        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:1024)
        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:456)
        at org.apache.ambari.server.state.cluster.ClusterImpl.getServices(ClusterImpl.java:1044)
        at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.addNewConfigurationsFromXml(AbstractUpgradeCatalog.java:384)
        at org.apache.ambari.server.upgrade.UpgradeCatalog212.executeDMLUpdates(UpgradeCatalog212.java:157)
        at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:899)
        at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:234)
        at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:353)


Adjusting ambari-server permissions and ownership...
Ambari Server 'upgrade' completed successfully.

After that I can start ambari-server but only with option --skip-database-check which is not a good solution. I am using Postgres. The problem occurs also when I restore my db.

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Ambari upgrade 2.1.1 to 2.4 ProvisionException

@Edgar

This is kind of bug refer the link:-

https://issues.apache.org/jira/browse/AMBARI-17622

1 REPLY 1

Re: Ambari upgrade 2.1.1 to 2.4 ProvisionException

@Edgar

This is kind of bug refer the link:-

https://issues.apache.org/jira/browse/AMBARI-17622