- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Unable to setup NiFi Cluster due to an Error
- Labels:
-
Apache NiFi
Created ‎02-05-2025 09:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Team,
Need help in setting up NiFi Cluster with 3 nodes, while i am trying to setup with below parameters, i am getting error. Please suggest where i am going wrong
NiFi Version: nifi-2.2.0
state-management.xml
<cluster-provider>
<id>cluster-provider</id>
<class>org.apache.nifi.controller.state.providers.raft.RaftStateProvider</class>
<property name="Connect String">Host1_IPAddress:2181,Host2_IPAddress:2181,Host3_IPAddress:2181</property>
<property name="Root Node">/nifi</property>
<property name="Session Timeout">10 seconds</property>
<property name="Access Control">Open</property>
</cluster-provider>
NiFi Properties:
nifi.cluster.is.node=true
nifi.cluster.node.address=Host1_IPAddress
nifi.cluster.node.protocol.port=9999
nifi.cluster.flow.election.max.candidates=3
nifi.sensitive.props.key=KeyValue
nifi.state.management.provider.cluster=cluster-provider
nifi.web.https.host=localhost
nifi.web.https.port=8444
Error:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.nifi.components.state.StateManagerProvider]: Factory method 'stateManagerProvider' threw exception with message: Cannot create CLUSTER Provider of type org.apache.nifi.controller.state.providers.raft.RaftStateProvider
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.lambda$instantiate$0(SimpleInstantiationStrategy.java:199)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiateWithFactoryMethod(SimpleInstantiationStrategy.java:88)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:168)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
... 65 common frames omitted
Caused by: java.lang.RuntimeException: Cannot create CLUSTER Provider of type org.apache.nifi.controller.state.providers.raft.RaftStateProvider
at org.apache.nifi.controller.state.manager.StandardStateManagerProvider.createStateProvider(StandardStateManagerProvider.java:289)
at org.apache.nifi.controller.state.manager.StandardStateManagerProvider.createClusteredStateProvider(StandardStateManagerProvider.java:156)
at org.apache.nifi.controller.state.manager.StandardStateManagerProvider.create(StandardStateManagerProvider.java:122)
at org.apache.nifi.framework.configuration.ManagerConfiguration.stateManagerProvider(ManagerConfiguration.java:83)
at org.apache.nifi.framework.configuration.ManagerConfiguration$$SpringCGLIB$$0.CGLIB$stateManagerProvider$2(<generated>)
at org.apache.nifi.framework.configuration.ManagerConfiguration$$SpringCGLIB$$FastClass$$1.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:348)
at org.apache.nifi.framework.configuration.ManagerConfiguration$$SpringCGLIB$$0.stateManagerProvider(<generated>)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.lambda$instantiate$0(SimpleInstantiationStrategy.java:171)
... 68 common frames omitted
Caused by: java.lang.IllegalStateException: The specified class 'org.apache.nifi.controller.state.providers.raft.RaftStateProvider' is not known to this nifi.
at org.apache.nifi.controller.state.manager.StandardStateManagerProvider.instantiateStateProvider(StandardStateManagerProvider.java:389)
at org.apache.nifi.controller.state.manager.StandardStateManagerProvider.createStateProvider(StandardStateManagerProvider.java:287)
... 79 common frames omitted
Created ‎02-06-2025 07:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@BK84
The exception is caused by:
Caused by: java.lang.IllegalStateException: The specified class 'org.apache.nifi.controller.state.providers.raft.RaftStateProvider' is not known to this nifi.
Your NiFi knows nothing about this class meanung the nifi lib directory does not contain any nar that includes this class:
org.apache.nifi.controller.state.providers.raft.RaftStateProvider
I also see nothing in Apache NiFi Jira nor in the NiFi 2 documentation mentioning this class or any type of raft state provider.
Looking at the properties configured with this provider class, they match the zookeeper properties. So I suspect you should be using this class instead in your stet provider:
org.apache.nifi.controller.state.providers.zookeeper.ZooKeeperStateProvider
Please help our community grow and thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt
