NiFi: Failed to connect node to cluster because local flow is different than cluster flow
Asked Answered
T

3

6

After rebooting the server, NiFi does not start. Before the server reboot, I was able to shutdown/start NiFi without any issues.

I ensured that the 3 config files (flow.xml.gz, authorizations.xml, and users.xml) are identical on all the nodes.

2019-12-08 14:36:10,085 ERROR [main] o.a.nifi.controller.StandardFlowService Failed to load flow from cluster due to: org.apache.nifi.controller.UninheritableFlowException: Failed to connect node to cluster because local flow is different than cluster flow.
org.apache.nifi.controller.UninheritableFlowException: Failed to connect node to cluster because local flow is different than cluster flow.
    at org.apache.nifi.controller.StandardFlowService.loadFromConnectionResponse(StandardFlowService.java:1026)
    at org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:539)
    at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:1009)
    at org.apache.nifi.NiFi.<init>(NiFi.java:158)
    at org.apache.nifi.NiFi.<init>(NiFi.java:72)
    at org.apache.nifi.NiFi.main(NiFi.java:297)
Caused by: org.apache.nifi.controller.UninheritableFlowException: Proposed Authorizer is not inheritable by the flow controller because of Authorizer differences: Proposed Authorizations do not match current Authorizations: Proposed fingerprint is not inheritable because the current access policies is not empty.

Also, ruled out any zookeeper corruption issue by deleting the znode for NiFi in the zookeeper cluster.

I am on NiFi 1.9.1

Any help is highly appreciated.

Thicken answered 8/12, 2019 at 16:22 Comment(0)
E
5

This means there is a difference in authorizations.xml or users.xml, most likely authorizations.xml. I would try copying those two files from one of the other nodes over to the node that is having the problem, this will ensure they are exactly the same.

Esquimau answered 9/12, 2019 at 14:14 Comment(1)
Thanks, Bryan. The files were of the same size but when I did the md5sum they were different. Made them the same across the cluster and then it worked fine.Thicken
V
5

A suggestion, if there is case we can't copy flow.xml.gz (like it was with me) for various process restrictions. We can stop Nifi service on problematic node, rename existing flow.xml.gz to a backup (just to be sure we don't loose it) and restart Nifi service.

Nifi would automatically generate a flow.xml.gz and connect the node to the cluster. It worked for me, hence, sharing.

Thanks

Vincentvincenta answered 20/11, 2020 at 9:6 Comment(2)
This is the better answer, IMO. Because sometimes copying flow from one of the nodes work on some versions due to a bug.Vulvitis
in my case nifi process restart was required (just reconnecting wasn't enough)Paranymph
L
0

It can also happen because of version difference of NIFI. If you were running an older version and is trying to upgrade your cluster to newer version, this will give you an error syncing the flow definition. We cannot have a cluster having two different version of nifi running. In that case, stop all the older nodes of nifi having older nifi version and restart the deployment onto the newer nifi version. NOTE : If you stop all the current running node you will lose the flow definition, so make sure they are backed-up appropriately.

Leaseholder answered 9/5, 2023 at 8:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.