Support Questions

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

Nifi cluster setup using Nifi 1.0

avatar
Contributor

I am setting up a mutlinode cluster using Nifi 1.x and HDF 2.0.1 ,but getting below error:-

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowController': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: ./state/zookeeper/myid file is missing
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1585) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:317) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1060) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
I have created myid at each node . each myid file has 1 ,2 and 3 as value.
1 ACCEPTED SOLUTION

avatar

@Anwaar Siddiqui

Anwaar,

The myid file value has to match the list of zookeeper servers in the order they are listed in the state-management.xml file.

For example in the state-management file, we list the zookeeper servers

<property name="Connect String">daves-nifi-cluster-2:2181,daves-nifi-cluster-3:2181,daves-nifi-cluster-4:2181</property>

so on server daves-nifi-cluster-2 the value in the myid file on that server would be 1

so on server daves-nifi-cluster-3 the value in the myid file on that server would be 2

so on server daves-nifi-cluster-4 the value in the myid file on that server would be 3

In HDF 2.0/NiFi 1.0 you need to create a state/zookeeper directory on the same level as the conf, not inside of conf, directory, make sure you put the myid file in that state/zookeeper directory

View solution in original post

1 REPLY 1

avatar

@Anwaar Siddiqui

Anwaar,

The myid file value has to match the list of zookeeper servers in the order they are listed in the state-management.xml file.

For example in the state-management file, we list the zookeeper servers

<property name="Connect String">daves-nifi-cluster-2:2181,daves-nifi-cluster-3:2181,daves-nifi-cluster-4:2181</property>

so on server daves-nifi-cluster-2 the value in the myid file on that server would be 1

so on server daves-nifi-cluster-3 the value in the myid file on that server would be 2

so on server daves-nifi-cluster-4 the value in the myid file on that server would be 3

In HDF 2.0/NiFi 1.0 you need to create a state/zookeeper directory on the same level as the conf, not inside of conf, directory, make sure you put the myid file in that state/zookeeper directory