[
https://issues.apache.org/jira/browse/NIFI-10371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17582963#comment-17582963
]
ASF subversion and git services commented on NIFI-10371:
--------------------------------------------------------
Commit b012e9aad298ad54012b5cda319aef90cbdfa8ab in nifi's branch
refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=b012e9aad2 ]
NIFI-10371: When a component is moved between groups, ensure that its versioned
component id is unique within the destination group. Also ensure that when
adding a connection to a PG with the VersionedComponentSynchronizer that we
prefer obtaining source/destination by instance id instead of versioned id.
Fixed bug where ProcessGroup would inadvertently set the wrong component's
Versioned Component ID to null when there was an ID conflict
This closes #6314
Signed-off-by: David Handermann <[email protected]>
> NiFi can fail to startup with error: IllegalStateException: Cannot add
> Connection to Process Group because source is an Output Port that does not
> belong to a child Process Group
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-10371
> URL: https://issues.apache.org/jira/browse/NIFI-10371
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.16.0, 1.17.0, 1.16.1, 1.16.2, 1.16.3
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Major
> Fix For: 1.18.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> There was an issue brought up in Apache Slack for version 1.16 of NiFi:
> {code:java}
> Question - I’m having a major issue where i restarted nifi and now it crashes
> on startup with:
> 2022-07-31 03:10:05,448 INFO [main] o.a.n.c.s.AffectedComponentSet Starting
> the following components: AffectedComponentSet[inputPorts=[], outputPorts=[],
> remoteInputPorts=[], remoteOutputPorts=[], processors=[],
> controllerServices=[], reportingTasks=[]]
> 2022-07-31 03:10:05,452 WARN [main] org.eclipse.jetty.webapp.WebAppContext
> Failed startup of context
> o.e.j.w.WebAppContext@3ed03652{nifi-api,/nifi-api,file:///opt/nifi/nifi-current/work/jetty/nifi-web-api-1.16.0.war/webapp/,UNAVAILABLE}{./work/nar/extensions/nifi-server-nar-1.16.0.nar-unpacked/NAR-INF/bundled-dependencies/nifi-web-api-1.16.0.war}
> org.apache.nifi.controller.serialization.FlowSynchronizationException:
> java.lang.IllegalStateException: Cannot add Connection to Process Group
> because source is an Output Port that does not belong to a child Process
> Group {code}
> Additional debug logging was used to determine that when NiFi started up, it
> was attempting to create a connection from an Output Port to a Processor
> within the same Process Group, which is not allowed.
> The issue appears to be the result of the fact that there are multiple Output
> Ports with the same Versioned Component ID.
> One in the 'parent' process group and one in the child. Because of this, NiFi
> was mistakenly using the Output Port in the 'parent' group instead of the one
> in the child group in order to create the connection.
> We should address this in two ways:
> # When obtaining the source or destination of a connection, we should first
> attempt to fetch the component by Instance ID instead of 'identifier' (which
> is the Versioned Component ID / "Tracking ID"). We should always prefer the
> instance id.
> # We should not allow two components with the same Versioned Component ID to
> exist in the same Process Group. It's ok for 2 components to have the same
> Versioned Component ID in different Process Groups, but if the components get
> moved to parent/child groups, it can create an issue.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)