Search code examples
testingnetwork-programmingportapache-nifidevelopment-environment

Running Nifi cluster on a single host


Is it possible to run 3 node Nifi cluster on single host/machine (in my case a virtual one)? And if so what needs to be done for it to work properly?

I've been having a lot of problems trying to set unconflicting ports and make all 3 instances of Nifi run on single host. Most recent problem is that Nifi node is unable to connect to itself.

I know it does not make any sense to run multiple nodes on single host, but it's for testing and development purposes.

Thanks a lot for any advice!


Solution

  • There is a walkthrough in the Apache NiFi documentation which goes step-by-step through the process of deploying multiple nodes in a cluster all running on a single physical/virtual machine.

    There are also best practices and port configuration values to take into consideration.

    Without further details on the specific errors you are encountering, ensure the following:

    1. The port for UI/API, cluster communications, site-to-site, and load-balanced connections are all unique for each node.
    2. Ensure the ZooKeeper (embedded or remote) connections are correct for every node.
    3. If TLS is being used, ensure that all nodes have an identity established and the proper permissions are assigned, and these permissions are replicated to every node.