I have setup NCM with 3 nodes. Somehow one node disconnected or failed. Again I started that node But It shown error message that 'Failed to connect node to cluster because local flow is different than cluster flow'. For this I have deleted flow.xml.gz file from the failure node and start it. Then it's work fine. But I don't want to delete flow.xml.gz file.
Is there any way that NIFI automatically delete flow.xml.gz file from failure node when I will start failure node in the cluster.
@Prakhar Agrawal @Felix Albani is correct. There is no way to automatically have a node delete his flow.xml.gz in favor of the clusters flow. If we allowed that it could lead to unexpected data loss. Lets assume a node was taken out of the cluster do perform some side work and the user tries to rejoin it to cluster, if it just took the clusters flow, any data queued in a connection that doe snot exist in clusters flow would be lost. It would be impossible for Nifi to know if the joining of this node to this cluster was a mistake or intended, so NiFi simply informs you there is a mismatch and expects you to resolve the issue.
Also noticed you mentioned "NCM" (NiFi Cluster Manager). NIFi moved away from having a NCM staring with Apache NIFi 1.x version. Newer version have a zero master cluster where any connected node can be elected as the cluster's coordinator.