[
https://issues.apache.org/jira/browse/NIFI-13800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17884446#comment-17884446
]
ASF subversion and git services commented on NIFI-13800:
--------------------------------------------------------
Commit 69b99390e637de0d489b0764c1290825d6f521ca in nifi's branch
refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=69b99390e6 ]
NIFI-13800 Fixed Missing Registry Client Handling when Inheriting Cluster Flow
(#9309)
When inheriting Registry Clients from a cluster's flow, any missing registry
clients are removed at the end instead of the beginning of the synchronization
logic. This allows those registry clients to still be referenced while
performing synchronization. Also found that if a Processor is missing from
cluster's flow but is running in local flow, on startup we get an error
indicating that the processor does not belong to the associated process group
so fixed that in tandem. Finally, noticed while verifying the fix that we check
if the proposed flow is empty with a null check instead of using the
isFlowEmpty() method - this could result in inheriting an empty flow from
cluster even when a flow is loaded locally.
Signed-off-by: David Handermann <[email protected]>
> Failed to inherit cluster flow when cluster doesn't have local registry client
> ------------------------------------------------------------------------------
>
> Key: NIFI-13800
> URL: https://issues.apache.org/jira/browse/NIFI-13800
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Major
> Fix For: 2.0.0-M5
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> I have a node that is attempting to join a cluster. The node has a flow
> locally. The node also have a Process Group that is not part of the cluster
> flow, and that Process Group is versioned using a Registry Client that the
> cluster does not have. This causes the node not to join the cluster, with the
> following error:
> {code:java}
> 2024-09-24 13:25:21,916 ERROR [main] o.a.nifi.controller.StandardFlowService
> Failed to load flow from cluster
> 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:1003)
> at
> org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:520)
> at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:967)
> at org.apache.nifi.NiFi.<init>(NiFi.java:155)
> at org.apache.nifi.NiFi.<init>(NiFi.java:86)
> at org.apache.nifi.NiFi.main(NiFi.java:284)
> Caused by:
> org.apache.nifi.controller.serialization.FlowSynchronizationException:
> java.lang.IllegalStateException: Process Group refers to a Flow Registry with
> ID 0ad13fbb-9fdb-101c-ffff-ffffcdf58358 but no Flow Registry exists with that
> ID. Cannot resolve to a URL.
> at
> org.apache.nifi.controller.serialization.VersionedFlowSynchronizer.synchronizeFlow(VersionedFlowSynchronizer.java:459)
> at
> org.apache.nifi.controller.serialization.VersionedFlowSynchronizer.sync(VersionedFlowSynchronizer.java:223)
> at
> org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1810)
> at
> org.apache.nifi.persistence.StandardFlowConfigurationDAO.load(StandardFlowConfigurationDAO.java:91)
> at
> org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:817)
> at
> org.apache.nifi.controller.StandardFlowService.loadFromConnectionResponse(StandardFlowService.java:969)
> ... 5 common frames omitted
> Caused by: java.lang.IllegalStateException: Process Group refers to a Flow
> Registry with ID 0ad13fbb-9fdb-101c-ffff-ffffcdf58358 but no Flow Registry
> exists with that ID. Cannot resolve to a URL.
> at
> org.apache.nifi.registry.flow.mapping.NiFiRegistryFlowMapper.applyVersionControlInformation(NiFiRegistryFlowMapper.java:186)
> at
> org.apache.nifi.registry.flow.mapping.NiFiRegistryFlowMapper.lambda$mapProcessGroup$1(NiFiRegistryFlowMapper.java:170)
> at
> org.apache.nifi.registry.flow.mapping.NiFiRegistryFlowMapper.mapGroup(NiFiRegistryFlowMapper.java:262)
> at
> org.apache.nifi.registry.flow.mapping.NiFiRegistryFlowMapper.lambda$mapGroup$4(NiFiRegistryFlowMapper.java:299)
> at
> java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
> at
> java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1715)
> at
> java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
> at
> java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
> at
> java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
> at
> java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
> at
> java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
> at
> org.apache.nifi.registry.flow.mapping.NiFiRegistryFlowMapper.mapGroup(NiFiRegistryFlowMapper.java:300)
> at
> org.apache.nifi.registry.flow.mapping.NiFiRegistryFlowMapper.mapGroup(NiFiRegistryFlowMapper.java:224)
> at
> org.apache.nifi.registry.flow.mapping.NiFiRegistryFlowMapper.mapProcessGroup(NiFiRegistryFlowMapper.java:172)
> at
> org.apache.nifi.flow.synchronization.StandardVersionedComponentSynchronizer.synchronize(StandardVersionedComponentSynchronizer.java:173)
> at
> org.apache.nifi.groups.StandardProcessGroup.synchronizeFlow(StandardProcessGroup.java:3865)
> at
> org.apache.nifi.controller.serialization.VersionedFlowSynchronizer.synchronizeFlow(VersionedFlowSynchronizer.java:451)
> ... 10 common frames omitted {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)