title: NiFi Cluster on AWS using ECS and external Zookeeper
body: <p>I'm trying to set up a NiFi Cluster on AWS using ECS with External Zookeeper.</p>
  
  <p>Have created a ECS Cluster for Zookeeper with 3 EC2 instance and running zookeeper ensemble. This external Zookeeper is working fine as I tested with my SolrCloud and also on my local NiFi. The local NiFi cluster was set up based on <a href="https://www.nifi.rocks/apache-nifi-docker-compose-cluster" rel="nofollow noreferrer">https://www.nifi.rocks/apache-nifi-docker-compose-cluster</a><br>
  Now that I had made sure that NiFi cluster works well with my external zookeeper that is running on AWS, I created another ECS cluster with 2 EC2 instances for NiFi. I did make sure all the variables are set properly for a NiFi cluster. All checks from the list of env variables given in <a href="https://github.com/apache/nifi/tree/master/nifi-docker/dockerhub" rel="nofollow noreferrer">https://github.com/apache/nifi/tree/master/nifi-docker/dockerhub</a></p>
  
  <p>Though NiFi is starting on both the 2 EC2 instances and they using my external zookeeper, the 2 NiFi are running as two separate clusters with one node with each cluster. Ideally I'm wanting them to run as 2 nodes in one cluster.</p>
  
  <p>I did compare the nifi.properties from the local NiFi cluster and the AWS Clusters and they all look good. </p>
  
  <p>Am I missing some obvious step here?</p>
  
  <p>Exception is</p>
  
  <pre><code>WARN [main] o.a.nifi.controller.StandardFlowService Failed to connect to cluster due to: org.apache.nifi.cluster.protocol.ProtocolException: Failed to create socket to due to: java.net.UnknownHostException
  
  Attempted to determine the node's information but failed to retrieve its information due to org.apache.nifi.cluster.protocol.ProtocolException: Failed to create socket due to: java.net.UnknownHostException
  </code></pre>