diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/state/providers/zookeeper/ZooKeeperStateProvider.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/state/providers/zookeeper/ZooKeeperStateProvider.java index 239b68a759..27727a7d7d 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/state/providers/zookeeper/ZooKeeperStateProvider.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/state/providers/zookeeper/ZooKeeperStateProvider.java @@ -439,7 +439,15 @@ public class ZooKeeperStateProvider extends AbstractStateProvider { setState(newValue, (int) oldValue.getVersion(), componentId); return true; } catch (final IOException ioe) { - return false; + final Throwable cause = ioe.getCause(); + if (cause != null && cause instanceof KeeperException) { + final KeeperException ke = (KeeperException) cause; + if (Code.BADVERSION == ke.code()) { + return false; + } + } + + throw ioe; } }