org.apache.nifi.web.NiFiCoreException: Unable to start Flow Controller

651 views
Skip to first unread message

Ruslan Dautkhanov

unread,
Oct 8, 2018, 1:20:00 AM10/8/18
to Kylo Community
nifi-app.log contains below logs [1].. any idea what did I miss?
This is a new Kylo installation.
Version 0.9.1.1

nifi-bootstrap.log on the other side looks good.

Thanks.


[1]

2018-10-07 23:10:32,382 WARN [main] org.eclipse.jetty.webapp.WebAppContext Failed startup of context o.e.j.w.WebAppContext@2eb27091{/nifi-api,file:///opt/nifi/nifi-1.7.1/work/jetty/nifi-web-api-1.7.1.war/webapp/
,UNAVAILABLE}{./work/nar/framework/nifi-framework-nar-1.7.1.nar-unpacked/META-INF/bundled-dependencies/nifi-web-api-1.7.1.war}
org.apache.nifi.web.NiFiCoreException: Unable to start Flow Controller.
        at org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:88)
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:876)
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:532)
        at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:839)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:344)
        at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1480)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1442)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:799)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:540)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:290)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
        at org.eclipse.jetty.server.Server.start(Server.java:452)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.server.Server.doStart(Server.java:419)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:838)
        at org.apache.nifi.NiFi.<init>(NiFi.java:157)
        at org.apache.nifi.NiFi.<init>(NiFi.java:71)
        at org.apache.nifi.NiFi.main(NiFi.java:292)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowController': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Unable to create Provenance Repository
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1634)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:317)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1084)
        at org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:55)
        ... 33 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowController': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Unable to create Provenance Repository
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1634)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:317)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1084)
        at org.apache.nifi.spring.StandardFlowServiceFactoryBean.getObject(StandardFlowServiceFactoryBean.java:48)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
        ... 39 common frames omitted
Caused by: java.lang.RuntimeException: Unable to create Provenance Repository
        at org.apache.nifi.controller.FlowController.<init>(FlowController.java:511)
        at org.apache.nifi.controller.FlowController.createStandaloneInstance(FlowController.java:422)
        at org.apache.nifi.spring.FlowControllerFactoryBean.getObject(FlowControllerFactoryBean.java:77)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
        ... 46 common frames omitted
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: The specified implementation class 'com.thinkbiganalytics.nifi.provenance.repo.KyloPersistentProvenanceEventRepository' is not known to this nifi.
        at org.apache.nifi.controller.FlowController.createProvenanceRepository(FlowController.java:971)
        at org.apache.nifi.controller.FlowController.<init>(FlowController.java:508)
        ... 49 common frames omitted
Caused by: java.lang.IllegalStateException: The specified implementation class 'com.thinkbiganalytics.nifi.provenance.repo.KyloPersistentProvenanceEventRepository' is not known to this nifi.
        at org.apache.nifi.nar.NarThreadContextClassLoader.createInstance(NarThreadContextClassLoader.java:199)
        at org.apache.nifi.controller.FlowController.createProvenanceRepository(FlowController.java:969)
        ... 50 common frames omitted
2018-10-07 23:10:32,963 INFO [main] o.e.j.a.AnnotationConfiguration Scanning elapsed time=396ms
2018-10-07 23:10:32,965 INFO [main] o.e.j.C./nifi-content-viewer No Spring WebApplicationInitializer types detected on classpath

ruslans.uralovs

unread,
Oct 8, 2018, 4:47:48 AM10/8/18
to Kylo Community
Looks like Nifi configuration is not complete, i.e. Nifi tries to set up Kylo Provenance Repository but the class is not found. How were you installing and configuring Nifi? Manually or using setup-wizard.sh?

To complete the installation you can run following command which will setup the classpath for Nifi:
/opt/kylo/setup/nifi/update-nars-jars.sh <NIFI_HOME> <KYLO_SETUP_FOLDER> <NIFI_USER> <NIFI_USER_GROUP>
e.g.
/opt/kylo/setup/nifi/update-nars-jars.sh /opt/nifi /opt/kylo/setup nifi users

ruslans.uralovs

unread,
Oct 8, 2018, 4:50:00 AM10/8/18
to Kylo Community
Its possible you are missing other steps too, check following doc on how to install and configure Nifi:


Ruslan Dautkhanov

unread,
Oct 9, 2018, 2:30:54 PM10/9/18
to Kylo Community
Thank you Ruslans.

I was following manual installation with following steps for NiFi

sudo /opt/kylo/setup/nifi/install-nifi.sh 1.7.1 /opt/nifi nifi nifi
sudo /opt/kylo/setup/java/change-nifi-java-home.sh /usr/java/latest /opt/nifi/current
sudo /opt/kylo/setup/nifi/install-kylo-components.sh /opt/nifi /opt/kylo nifi nifi

and after your comments I also ran
sudo /opt/kylo/setup/nifi/update-nars-jars.sh /opt/nifi /opt/kylo/setup nifi nifi

NiFi starts up and then shuts down with same exception.


Ruslan Dautkhanov

unread,
Oct 9, 2018, 6:28:11 PM10/9/18
to Kylo Community
I think the key piece of the exception is
Caused by: java.lang.IllegalStateException: The specified implementation class 'com.thinkbiganalytics.nifi.provenance.repo.KyloPersistentProvenanceEventRepository' is not known to this nifi.
        at org.apache.nifi.nar.NarThreadContextClassLoader.createInstance(NarThreadContextClassLoader.java:199)
        at org.apache.nifi.controller.FlowController.createProvenanceRepository(FlowController.java:969)
        ... 50 common frames omitted

Is default `com.thinkbiganalytics.nifi.provenance.repo.KyloPersistentProvenanceEventRepository` valid?
Should
# Provenance Repository Properties
nifi.provenance.repository.implementation=com.thinkbiganalytics.nifi.provenance.repo.KyloPersistentProvenanceEventRepository

in /opt/nifi/current/conf/nifi.properties be updated to something else?

Or I guess this default installation looks for some nars/ jars somewhere else. How to debug this?

Deepak Mishra

unread,
Oct 11, 2018, 1:38:52 PM10/11/18
to Kylo Community
Hi,

Can you verify if all the 7 soft links are created in $NIFI_HOME/nifi<release>/lib and $NIFI_HOME/nifi<release>/lib/app location.

See if the soft links references are correctly present.

Thanks
Deepak

Gregory Hart

unread,
Oct 11, 2018, 1:42:55 PM10/11/18
to Kylo Community
Hi Ruslan,

Yes, that configuration looks correct. Please verify you have the following file:
# ls -l /opt/nifi/current/lib/kylo-nifi-provenance-repo-nar.nar
lrwxrwxrwx 1 nifi nifi 72 Jun 22 07:11 /opt/nifi/current/lib/kylo-nifi-provenance-repo-nar.nar -> /opt/nifi/data/lib/kylo-nifi-provenance-repo-v1.2-nar-0.9.1.nar

If you're still running into this issue, please restart NiFi and attach your /var/log/nifi/nifi-app.log file.
Reply all
Reply to author
Forward
0 new messages