Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

nifi : Failed to connect node to cluster because local flow is different than cluster flow

avatar
Explorer

Hi,

I have HDF 3.1 installed in 5 nodes (n1,n2,n3,n4 and n5). When i start cluster through ambari , all nodes are connected but "n1" node stopping. When i went to nifi-app.log i see below error.

"Failed to connect node to cluster because local flow is different than cluster flow".

So i copied flow.xml.gz from n3 to n1 node and started node. I still see same error.

This time i i took backup of flow.xml.gz and removed all flow.xml.gz files from all 5 nodes and started all 5 nodes. i still see n2,n3,n4 and n5 connected and n1 nifi service stopped and nifi-app.log still showing same below error.

-----------------------------------------------------------------------------------------------------------------

2018-07-26 18:32:42,499 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:937)
at org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:516)
at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:872)
at org.apache.nifi.NiFi.<init>(NiFi.java:160)
at org.apache.nifi.NiFi.main(NiFi.java:268)
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.
at org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:307)
at org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1622)
at org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO.load(StandardXMLFlowConfigurationDAO.java:84)
at org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:723)
at org.apache.nifi.controller.StandardFlowService.loadFromConnectionResponse(StandardFlowService.java:912)
... 4 common frames omitted

------------------------------------------------------------------------------------------------------------------------

The newly generated flow.xml.gz file is having nothing but below xml tags.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flowController encoding-version="1.3">
<maxTimerDrivenThreadCount>10</maxTimerDrivenThreadCount>
<maxEventDrivenThreadCount>5</maxEventDrivenThreadCount>
<registries/>
<rootGroup>
<id>d8e3ef08-0164-1000-f1dd-27c8a40f9d60</id>
<name>NiFi Flow</name>
<position x="0.0" y="0.0"/>
<comment/>
</rootGroup>
<controllerServices/>
<reportingTasks/>
</flowController>

Any help would be appreciate to resolve this issue.

1 ACCEPTED SOLUTION

avatar
Super Mentor

@Sri Bet

When a node attempts to join an existing cluster there are 3 files that are checked to make sure they match between the node connecting and the cluster:

1. flow.xml.gz (Contains everything you have configured/added via the NiFi UI.)

2. users.xml (Contains all users added via the NiFI UI. This file will not exist if you are not using NiFi's default file based authorizer. Also will not exist if NiFi is not running secured)

3. authorizations.xml (Contains all authorization policies which have been granted to above users added via the NiFI UI. This file will not exist if you are not using NiFi's default file based authorizer. Also will not exist if NiFi is not running secured)

-

I am not sure why one of your nodes had a mismatch in your authorizations.xml file. Perhaps while this node was not in the cluster a new policy was granted to a user?
-

Deleting the users.xml and authorizations.xml files is not the best resolution. When these files do not exist, NiFi will create on the basic authorizations for the initial admin identity and nodes defined in the authorizers.xml file. deleting these files will result in loss of any other authorizations that ay have been granted later.

-

The best fix is to copy the users.xml and authorizations.xml from another node to the node having issues.

-

Thank you,

Matt

View solution in original post

2 REPLIES 2

avatar
Explorer

Problem has been resolved after i deleted users.xml and authorizations.xml both files across all cluster and restarted. It seems policies got mismatched between one node to all nodes.

avatar
Super Mentor

@Sri Bet

When a node attempts to join an existing cluster there are 3 files that are checked to make sure they match between the node connecting and the cluster:

1. flow.xml.gz (Contains everything you have configured/added via the NiFi UI.)

2. users.xml (Contains all users added via the NiFI UI. This file will not exist if you are not using NiFi's default file based authorizer. Also will not exist if NiFi is not running secured)

3. authorizations.xml (Contains all authorization policies which have been granted to above users added via the NiFI UI. This file will not exist if you are not using NiFi's default file based authorizer. Also will not exist if NiFi is not running secured)

-

I am not sure why one of your nodes had a mismatch in your authorizations.xml file. Perhaps while this node was not in the cluster a new policy was granted to a user?
-

Deleting the users.xml and authorizations.xml files is not the best resolution. When these files do not exist, NiFi will create on the basic authorizations for the initial admin identity and nodes defined in the authorizers.xml file. deleting these files will result in loss of any other authorizations that ay have been granted later.

-

The best fix is to copy the users.xml and authorizations.xml from another node to the node having issues.

-

Thank you,

Matt