[
https://issues.apache.org/jira/browse/NIFI-3523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15883065#comment-15883065
]
ASF GitHub Bot commented on NIFI-3523:
--------------------------------------
GitHub user markap14 opened a pull request:
https://github.com/apache/nifi/pull/1542
NIFI-3523: Ensure that if we are unable to read Provenance events on …
…startup that we don't prevent NiFi from starting
Thank you for submitting a contribution to Apache NiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
- [ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number
you are trying to resolve? Pay particular attention to the hyphen "-" character.
- [ ] Has your PR been rebased against the latest commit within the target
branch (typically master)?
- [ ] Is your initial contribution a single, squashed commit?
### For code changes:
- [ ] Have you ensured that the full suite of tests is executed via mvn
-Pcontrib-check clean install at the root nifi folder?
- [ ] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file, including the main
LICENSE file under nifi-assembly?
- [ ] If applicable, have you updated the NOTICE file, including the main
NOTICE file found under nifi-assembly?
- [ ] If adding new Properties, have you added .displayName in addition to
.name (programmatic access) for each of the new properties?
### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in
which it is rendered?
### Note:
Please ensure that once the PR is submitted, you check travis-ci for build
issues and submit an update to your PR as soon as possible.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/markap14/nifi NIFI-3523
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi/pull/1542.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1542
----
commit 13397512095c6cbaedb16f118907672ee4a939e9
Author: Mark Payne <[email protected]>
Date: 2017-02-24T16:45:26Z
NIFI-3523: Ensure that if we are unable to read Provenance events on
startup that we don't prevent NiFi from starting
----
> WriteAheadProvenanceRepository fails to initialize properly if it contains an
> invalid Provenance Event
> ------------------------------------------------------------------------------------------------------
>
> Key: NIFI-3523
> URL: https://issues.apache.org/jira/browse/NIFI-3523
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Reporter: Mark Payne
> Assignee: Mark Payne
>
> With the new WriteAheadProvenanceRepository, when trying to initialize
> itself, the repository will throw an Exception preventing NiFi from starting
> if it encounters an invalid Provenance Event. While it can properly handle
> IOExceptions that are thrown, other Exceptions (such as those thrown by
> NIFI-3522) will still cause problems. While such events should not be
> generated, the Provenance Repository should be resilient enough to handle
> them and continue on.
> 2017-02-22 15:47:11,896 WARN [main] org.apache.nifi.web.server.JettyServer
> Failed to start web server... shutting down.
> org.apache.nifi.web.NiFiCoreException: Unable to start Flow Controller.
> at
> org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:85)
> ~[na:na]
> at
> org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:837)
> ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:533)
> ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:810)
> ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:345)
> ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1404)
> ~[jetty-webapp-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1366)
> ~[jetty-webapp-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:772)
> ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
> ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:520)
> ~[jetty-webapp-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
> ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
> ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
> ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
> ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
> ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
> ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
> ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
> ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:231)
> ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
> ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
> ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
> at org.eclipse.jetty.server.Server.start(Server.java:411)
> ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
> ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
> ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
> at org.eclipse.jetty.server.Server.doStart(Server.java:378)
> ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
> ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
> at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:736)
> ~[nifi-jetty-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
> at org.apache.nifi.NiFi.<init>(NiFi.java:157)
> [nifi-runtime-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
> at org.apache.nifi.NiFi.main(NiFi.java:264)
> [nifi-runtime-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
> 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)
> ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
> at
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
> ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1585)
> ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:317)
> ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
> ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
> at
> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1060)
> ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
> at
> org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:53)
> ~[na:na]
> ... 28 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)
> ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
> at
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
> ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1585)
> ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:317)
> ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
> ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
> at
> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1060)
> ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
> at
> org.apache.nifi.spring.StandardFlowServiceFactoryBean.getObject(StandardFlowServiceFactoryBean.java:48)
> ~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
> at
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
> ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
> ... 34 common frames omitted
> Caused by: java.lang.RuntimeException: Unable to create Provenance Repository
> at
> org.apache.nifi.controller.FlowController.<init>(FlowController.java:462)
> ~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
> at
> org.apache.nifi.controller.FlowController.createStandaloneInstance(FlowController.java:378)
> ~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
> at
> org.apache.nifi.spring.FlowControllerFactoryBean.getObject(FlowControllerFactoryBean.java:74)
> ~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
> at
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
> ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
> ... 41 common frames omitted
> Caused by: java.lang.IllegalStateException: Cannot create Provenance Event
> Record because FlowFile UUID is not set
> at
> org.apache.nifi.provenance.StandardProvenanceEventRecord$Builder.assertSet(StandardProvenanceEventRecord.java:770)
> ~[nifi-data-provenance-utils-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
> at
> org.apache.nifi.provenance.StandardProvenanceEventRecord$Builder.build(StandardProvenanceEventRecord.java:791)
> ~[nifi-data-provenance-utils-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
> at
> org.apache.nifi.provenance.schema.LookupTableEventRecord.getEvent(LookupTableEventRecord.java:331)
> ~[na:na]
> at
> org.apache.nifi.provenance.EventIdFirstSchemaRecordReader.readRecord(EventIdFirstSchemaRecordReader.java:111)
> ~[na:na]
> at
> org.apache.nifi.provenance.EventIdFirstSchemaRecordReader.nextRecord(EventIdFirstSchemaRecordReader.java:100)
> ~[na:na]
> at
> org.apache.nifi.provenance.serialization.CompressableRecordReader.nextRecord(CompressableRecordReader.java:286)
> ~[na:na]
> at
> org.apache.nifi.provenance.serialization.CompressableRecordReader.getMaxEventId(CompressableRecordReader.java:218)
> ~[na:na]
> at
> org.apache.nifi.provenance.store.WriteAheadStorePartition.initialize(WriteAheadStorePartition.java:126)
> ~[na:na]
> at
> org.apache.nifi.provenance.store.PartitionedEventStore.initialize(PartitionedEventStore.java:68)
> ~[na:na]
> at
> org.apache.nifi.provenance.store.PartitionedWriteAheadEventStore.initialize(PartitionedWriteAheadEventStore.java:97)
> ~[na:na]
> at
> org.apache.nifi.provenance.WriteAheadProvenanceRepository.initialize(WriteAheadProvenanceRepository.java:141)
> ~[na:na]
> at
> org.apache.nifi.controller.FlowController.<init>(FlowController.java:460)
> ~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
> ... 44 common frames omitted
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)