Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-8771

NiFI fails to start if clustered and flow consists only of 1+ Controller Services

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 1.14.0
    • Core Framework
    • None

    Description

      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:
      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
      
      • If the version is different, we will see this error:
      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)
      

       

      Attachments

        Issue Links

          Activity

            People

              markap14 Mark Payne
              markap14 Mark Payne
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h