Support Questions

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

NIFI Cluster Configuration Error

avatar
Contributor

Version 1.15.3

Windows Server 2019 Standard

 

# zookeeper properties, used for cluster management #
nifi.zookeeper.connect.string=nifi-inf-02:2181,nifi-inf-03:2181
nifi.zookeeper.connect.timeout=10 secs
nifi.zookeeper.session.timeout=10 secs
nifi.zookeeper.root.node=/nifi
nifi.zookeeper.client.secure=false
nifi.zookeeper.security.keystore=
nifi.zookeeper.security.keystoreType=
nifi.zookeeper.security.keystorePasswd=
nifi.zookeeper.security.truststore=
nifi.zookeeper.security.truststoreType=
nifi.zookeeper.security.truststorePasswd=
nifi.zookeeper.jute.maxbuffer=

 

After configuration of cluster the service spits the following error on startup.

 

Please check the configuration of the Cluster State Provider with ID [zk-provider] in the file D:\nifi-1.15.3\.\conf\state-management.xml
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:176)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:101)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1884)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1284)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:345)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330)
... 121 common frames omitted
Caused by: java.lang.IllegalStateException: Could not initialize State Providers because the Cluster State Provider is not valid. The following 1 Validation Errors occurred:
'Connect String' validated against '' is invalid because Connect String must contain at least one character that is not white space

1 ACCEPTED SOLUTION

avatar
Super Guru

Hi @Tra ,

 

When you start NiFi in cluster mode (no-standalone), besides configuring ZooKeeper properties in nifi.properties you also need to configure it for State Management in the conf/state-management.xml file.

Make sure your zk-provider in that file looks like the example below:

    <cluster-provider>
        <id>zk-provider</id>
        <class>org.apache.nifi.controller.state.providers.zookeeper.ZooKeeperStateProvider</class>
        <property name="Connect String">nifi-inf-02:2181,nifi-inf-03:2181</property>
        <property name="Root Node">/nifi</property>
        <property name="Session Timeout">10 seconds</property>
        <property name="Access Control">Open</property>
    </cluster-provider>

  

Cheers,

André

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

View solution in original post

2 REPLIES 2

avatar
Super Guru

Hi @Tra ,

 

When you start NiFi in cluster mode (no-standalone), besides configuring ZooKeeper properties in nifi.properties you also need to configure it for State Management in the conf/state-management.xml file.

Make sure your zk-provider in that file looks like the example below:

    <cluster-provider>
        <id>zk-provider</id>
        <class>org.apache.nifi.controller.state.providers.zookeeper.ZooKeeperStateProvider</class>
        <property name="Connect String">nifi-inf-02:2181,nifi-inf-03:2181</property>
        <property name="Root Node">/nifi</property>
        <property name="Session Timeout">10 seconds</property>
        <property name="Access Control">Open</property>
    </cluster-provider>

  

Cheers,

André

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Contributor

Thank you so much!  I couldn't find anything on the web about this.  You saved the day!!!!!!!!!!!!