Yes, you need to ensure that each node in the cluster (each instance of the 
application) is running its web server on a unique port if they are all running 
on the same machine. You’ll also need to pay attention to the S2S and cluster 
protocol ports.

Pierre Villard has written an excellent article with prescriptive steps for 
setting up a 3 node cluster (unsecured [1] and secured [2]) and I encourage you 
to follow those steps.

[1] https://pierrevillard.com/2016/08/13/apache-nifi-1-0-0-cluster-setup/ 
<https://pierrevillard.com/2016/08/13/apache-nifi-1-0-0-cluster-setup/>
[2] 
https://pierrevillard.com/2016/11/29/apache-nifi-1-1-0-secured-cluster-setup/ 
<https://pierrevillard.com/2016/11/29/apache-nifi-1-1-0-secured-cluster-setup/>


Andy LoPresto
[email protected]
[email protected]
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On May 25, 2017, at 1:54 PM, Xphos <[email protected]> wrote:
> 
> Okay so I know that this is certainly a duplicate post but i really need help
> setting this up.
> I have installed NiFi and compiled but I am getting stuck trying to setup
> the basic network.
> 
> So I am thinking I am misconfiguring the ports because I am trying to build
> a 3 node network with just localhost. What keeps happening every time i boot
> is that the nodes all turn on but then one by one disconnect until a
> perpetual election cycle happens (All my flow net works are blank)
> 
> So I am including my nifi.property configuration files at the bottom for the
> 3 nodes I am only including the basic data because i haven't touch anything
> else except setting the zookeeper embeddded property to true for all nodes.
> 
> Areas of concern:
> 1. When I was reading the documentation for setting up the zookeeper conf
> file it sets up server.1=hostname:2888:3888 so i just followed that example
> for every server now i didn't want to do that because i feel i should have
> different ports because i used local host but i don't know were it decided
> in need to use these ports so I did not think i could change them.
> 
> 2. web.http.port are all set to 8080 but this might be be incorrectly
> interpreting the docs.
> 
> 
> 
> *Node 1:*
> # Site to Site properties
> nifi.remote.input.host=localhost
> nifi.remote.input.secure=false
> nifi.remote.input.socket.port=8130
> nifi.remote.input.http.enabled=true
> nifi.remote.input.http.transaction.ttl=30 sec
> 
> # web properties #
> nifi.web.war.directory=./lib
> nifi.web.http.host=
> nifi.web.http.port=8080
> nifi.web.http.network.interface.default=
> nifi.web.https.host=
> nifi.web.https.port=
> nifi.web.https.network.interface.default=
> nifi.web.jetty.working.directory=./work/jetty
> nifi.web.jetty.threads=200
> 
> # cluster common properties (all nodes must have same values) #
> nifi.cluster.protocol.heartbeat.interval=5 sec
> nifi.cluster.protocol.is.secure=false
> 
> # cluster node properties (only configure for cluster nodes) #
> nifi.cluster.is.node=true
> nifi.cluster.node.address=
> nifi.cluster.node.protocol.port=8100
> nifi.cluster.node.protocol.threads=10
> nifi.cluster.node.event.history.size=25
> nifi.cluster.node.connection.timeout=5 sec
> nifi.cluster.node.read.timeout=5 sec
> nifi.cluster.firewall.file=
> nifi.cluster.flow.election.max.wait.time=1 mins
> nifi.cluster.flow.election.max.candidates=3
> 
> # zookeeper properties, used for cluster management #
> nifi.zookeeper.connect.string=localhost:2180,localhost:2190,localhost:2200
> nifi.zookeeper.connect.timeout=3 secs
> nifi.zookeeper.session.timeout=3 secs
> nifi.zookeeper.root.node=/nifi
> 
> 
> 
> 
> *Node 2:*
> # Site to Site properties
> nifi.remote.input.host=localhost
> nifi.remote.input.secure=false
> nifi.remote.input.socket.port=8120
> nifi.remote.input.http.enabled=true
> nifi.remote.input.http.transaction.ttl=30 sec
> 
> # web properties #
> nifi.web.war.directory=./lib
> nifi.web.http.host=
> nifi.web.http.port=8080
> nifi.web.http.network.interface.default=
> nifi.web.https.host=
> nifi.web.https.port=
> nifi.web.https.network.interface.default=
> nifi.web.jetty.working.directory=./work/jetty
> nifi.web.jetty.threads=200
> 
> # cluster common properties (all nodes must have same values) #
> nifi.cluster.protocol.heartbeat.interval=5 sec
> nifi.cluster.protocol.is.secure=false
> 
> # cluster node properties (only configure for cluster nodes) #
> nifi.cluster.is.node=true
> nifi.cluster.node.address=
> nifi.cluster.node.protocol.port=8090
> nifi.cluster.node.protocol.threads=10
> nifi.cluster.node.event.history.size=25
> nifi.cluster.node.connection.timeout=5 sec
> nifi.cluster.node.read.timeout=5 sec
> nifi.cluster.firewall.file=
> nifi.cluster.flow.election.max.wait.time=1 mins
> nifi.cluster.flow.election.max.candidates= 3
> 
> # zookeeper properties, used for cluster management #
> nifi.zookeeper.connect.string=localhost:2180,localhost:2190,localhost:2200
> nifi.zookeeper.connect.timeout=3 secs
> nifi.zookeeper.session.timeout=3 secs
> nifi.zookeeper.root.node=/nifi
> 
> 
> 
> *Node 3:*
> # Site to Site properties
> nifi.remote.input.host=localhost
> nifi.remote.input.secure=false
> nifi.remote.input.socket.port=8140
> nifi.remote.input.http.enabled=true
> nifi.remote.input.http.transaction.ttl=30 sec
> 
> # web properties #
> nifi.web.war.directory=./lib
> nifi.web.http.host=
> nifi.web.http.port=8080
> nifi.web.http.network.interface.default=
> nifi.web.https.host=
> nifi.web.https.port=
> nifi.web.https.network.interface.default=
> nifi.web.jetty.working.directory=./work/jetty
> nifi.web.jetty.threads=200
> 
> # cluster common properties (all nodes must have same values) #
> nifi.cluster.protocol.heartbeat.interval=5 sec
> nifi.cluster.protocol.is.secure=false
> 
> # cluster node properties (only configure for cluster nodes) #
> nifi.cluster.is.node=true
> nifi.cluster.node.address=
> nifi.cluster.node.protocol.port=8110
> nifi.cluster.node.protocol.threads=10
> nifi.cluster.node.event.history.size=25
> nifi.cluster.node.connection.timeout=5 sec
> nifi.cluster.node.read.timeout=5 sec
> nifi.cluster.firewall.file=
> nifi.cluster.flow.election.max.wait.time=1 mins
> nifi.cluster.flow.election.max.candidates=3
> 
> # zookeeper properties, used for cluster management #
> nifi.zookeeper.connect.string=localhost:2180,localhost:2190,localhost:2200
> nifi.zookeeper.connect.timeout=3 secs
> nifi.zookeeper.session.timeout=3 secs
> nifi.zookeeper.root.node=/nifi
> 
> 
> 
> *Zookeeper conf files*
> clientPort=2200  //////for all of my nodes i just boost this port by 10
> initLimit=10
> autopurge.purgeInterval=24
> syncLimit=5
> tickTime=2000
> dataDir=./state/zookeeper
> autopurge.snapRetainCount=30
> 
> 
> server.1=localhost:2888:3888
> server.2=localhost:2888:3888
> server.3=localhost:2888:3888
> 
> 
> 
> --
> View this message in context: 
> http://apache-nifi-developer-list.39713.n7.nabble.com/Setting-basic-NiFi-network-problem-tp15989.html
> Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to