Mark Payne created NIFI-8771:
--------------------------------
Summary: NiFI fails to start if clustered and flow consists only
of 1+ Controller Services
Key: NIFI-8771
URL: https://issues.apache.org/jira/browse/NIFI-8771
Project: Apache NiFi
Issue Type: Bug
Components: Core Framework
Reporter: Mark Payne
Assignee: Mark Payne
Kind of a corner case, but if you try to start up a NiFi cluster and the
dataflow consists of only 1 or more controller services in the root process
group and no other components, NiFi will fail to start.
This can fail in two possible ways:
* If the flow was saved using the same version of NiFi as is being started, we
will see the following error:
{code}
2021-07-08 16:09:27,065 ERROR [main] o.a.nifi.controller.StandardFlowService
Failed to load flow from cluster due to:
org.apache.nifi.controller.serialization.FlowSynchronizationException: Failed
to connect node to cluster because local flow controller partially updated.
Administrator should disconnect node and review flow for corruption.
org.apache.nifi.controller.serialization.FlowSynchronizationException: Failed
to connect node to cluster because local flow controller partially updated.
Administrator should disconnect node and review flow for corruption.
at
org.apache.nifi.controller.StandardFlowService.loadFromConnectionResponse(StandardFlowService.java:1052)
at
org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:521)
at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:1206)
at org.apache.nifi.NiFi.<init>(NiFi.java:159)
at org.apache.nifi.NiFi.<init>(NiFi.java:71)
at org.apache.nifi.NiFi.main(NiFi.java:303)
Caused by:
org.apache.nifi.controller.serialization.FlowSynchronizationException:
java.lang.IllegalStateException: The specified observer identifier
(bulletin-observer) already exists.
at
org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:306)
at
org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1468)
at
org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO.load(StandardXMLFlowConfigurationDAO.java:89)
at
org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:810)
at
org.apache.nifi.controller.StandardFlowService.loadFromConnectionResponse(StandardFlowService.java:1021)
... 5 common frames omitted
Caused by: java.lang.IllegalStateException: The specified observer identifier
(bulletin-observer) already exists.
at
org.apache.nifi.logging.repository.StandardLogRepository.addObserver(StandardLogRepository.java:135)
at
org.apache.nifi.controller.flow.StandardFlowManager.createControllerService(StandardFlowManager.java:494)
at
org.apache.nifi.controller.service.ControllerServiceLoader.createControllerService(ControllerServiceLoader.java:206)
at
org.apache.nifi.controller.service.ControllerServiceLoader.loadControllerServices(ControllerServiceLoader.java:111)
at
org.apache.nifi.controller.StandardFlowSynchronizer.addControllerServices(StandardFlowSynchronizer.java:1374)
at
org.apache.nifi.controller.StandardFlowSynchronizer.addProcessGroup(StandardFlowSynchronizer.java:1317)
at
org.apache.nifi.controller.StandardFlowSynchronizer.updateFlow(StandardFlowSynchronizer.java:432)
at
org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:283)
... 9 common frames omitted
{code}
* If the version is different, we will see this error:
{code}
2021-07-08 15:49:52,994 ERROR [main] org.apache.nifi.web.server.JettyServer
Unable to load flow due to:
org.apache.nifi.controller.UninheritableFlowException: Proposed flow could not
be inherited because it references one or more Bundles that are not available
in this NiFi instance: Could not find Bundle
org.apache.nifi:nifi-ssl-context-service-nar:1.11.4.2.0.4.0-80:
org.apache.nifi.ssl.StandardRestrictedSSLContextService from
org.apache.nifi:nifi-ssl-context-service-nar:1.11.4.2.0.4.0-80 is not known to
this NiFi instance.
org.apache.nifi.controller.UninheritableFlowException: Proposed flow could not
be inherited because it references one or more Bundles that are not available
in this NiFi instance: Could not find Bundle
org.apache.nifi:nifi-ssl-context-service-nar:1.11.4.2.0.4.0-80:
org.apache.nifi.ssl.StandardRestrictedSSLContextService from
org.apache.nifi:nifi-ssl-context-service-nar:1.11.4.2.0.4.0-80 is not known to
this NiFi instance.
at
org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:199)
at
org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1457)
at
org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO.load(StandardXMLFlowConfigurationDAO.java:89)
at
org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:810)
at
org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:458)
at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:1155)
at org.apache.nifi.NiFi.<init>(NiFi.java:159)
at org.apache.nifi.NiFi.<init>(NiFi.java:71)
at org.apache.nifi.NiFi.main(NiFi.java:303)
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)