Github user markap14 commented on the issue:

    https://github.com/apache/nifi/pull/1585
  
    @bbende I created a 3-node cluster. I added MyProcessor v2.0 to the flow. I 
then shut down node 3, removed the nifi-example-processors-nar-2.0.nar file 
from the lib/ directory and removed conf/flow.xml.gz. I then restarted Node 3. 
It fails to startup because the cluster flow cannot be inherited, due to the 
node not having v2.0 of the Processor. This, I think, is the expected behavior. 
However, it fails with the following error message in the logs:
    
    ```
    2017-03-17 13:14:58,602 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:921)
 ~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at 
org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:513)
 ~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:780) 
[nifi-jetty-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.nifi.NiFi.<init>(NiFi.java:162) 
[nifi-runtime-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.nifi.NiFi.main(NiFi.java:269) 
[nifi-runtime-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
    Caused by: org.apache.nifi.controller.UninheritableFlowException: 
org.apache.nifi.processors.example.MyProcessor from 
org.apache.nifi:nifi-example-processors-nar:2.0 is not known to this NiFi 
instance.
        at 
org.apache.nifi.controller.StandardFlowSynchronizer.checkBundleCompatibility(StandardFlowSynchronizer.java:431)
 ~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at 
org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:246)
 ~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at 
org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1535) 
~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at 
org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO.load(StandardXMLFlowConfigurationDAO.java:83)
 ~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at 
org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:707)
 ~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at 
org.apache.nifi.controller.StandardFlowService.loadFromConnectionResponse(StandardFlowService.java:896)
 ~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        ... 4 common frames omitted
    Caused by: java.lang.IllegalStateException: 
org.apache.nifi.processors.example.MyProcessor from 
org.apache.nifi:nifi-example-processors-nar:2.0 is not known to this NiFi 
instance.
        at 
org.apache.nifi.util.BundleUtils.findCompatibleBundle(BundleUtils.java:54) 
~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.nifi.util.BundleUtils.getBundle(BundleUtils.java:88) 
~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at 
org.apache.nifi.controller.StandardFlowSynchronizer.checkBundleCompatibility(StandardFlowSynchronizer.java:429)
 ~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        ... 9 common frames omitted
    ```
    
    I find this error message confusing. It used to make sense when the local 
flow as different than the cluster flow and that was the only way we could get 
into this situation. However, it now is caused by failing to create the 
necessary Processor. We should use a different error message.
    
    Either we could throw a different Exception (perhaps something that extends 
UninheritableFlowException?) and provide a different error message, or we 
should make the message more generic, such as: "Unable to update local flow to 
match the cluster's flow" instead of "Local flow is different from cluster 
flow," given that the local flow was empty and therefore should try to inherit 
the cluster flow.
    
    Does that make sense?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to