Support Questions

Find answers, ask questions, and share your expertise

Nifi multi host docker containers using Reverse Proxy with windows docker-desktop

avatar
Super Guru

Hi,

I have been struggling for sometime now trying to figure out if Nifi cluster can be deployed using windows docker-desktop where each node lives on a different host. I managed to do it using Ubuntu system but since Ubuntu is not supported by our IT I'm trying to see if the same can be implemented in the windows env.

I knew there will be challenges with windows since it has some limitations specially to containers networking  over Unix. One of those limitations is that if you are trying to use host networking the IP address of the host doesnt bind to the container , instead it uses what is called a loop back. When I try to set the  nifi host property to the machine fqdn or ip I keep getting the error:

 

 

java.net.BindException: Cannot assign requested address

 

 

Which I imagine that is a result of the IP already being reserved to the host and not accessible to the container.

After doing some research to work around this problem, I came across Reverse Proxy. The idea is deploy Nifi on each host locally ( default bridge network) and all the communication with the user and other nodes are done through the Reverse Proxy (I used nginx) . It sounded simple at first but once I got in to it , it got very complex very quickly 🙂

I was able to get the RP working on a standalone instance , but once you start introducing cluster it gets very tricky with all the ports and the host naming. Actually Nifi documentation has some information regarding setting up a RP for remote (over the internet ) cluster which I got to admit it looked very intimidating specially around the dynamic routing config in the nifi.properties. None the less I tried to follow as much as I comprehend but is not for nifi nodes in  docker containers .

To Summarize, The problem is Nifi nodes internally needs to communicate with each other using different ports and passing each other host info specially that are set up in the  cluster host address (nifi.cluster.node.address)  and the load balancing host address (nifi.cluster.load.balance.host). I cant assign the host ip\fqdn because of the error above and I cant find a way to dynamically set those similar to how s2s hostname and port are set.

Any help or guidance  on this is highly appreciated.

Thanks for reading and sorry for the long post.

 

 

 

1 REPLY 1

avatar
Community Manager

@mburgess @MattWho Hi! Do you have any insights here? Thanks.


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community: