Search code examples
azuretomcatazure-hub

Unable to load balance tomcats using Microsoft Azure Load Balancer


I am very much new to Microsoft Azure. I am using using Azure Portal in web browser to set up my application.

I followed the following procedure to load balance my tomcat applications.

  1. I created two VMs with Ubuntu (16.0.X) in the same availability set.
  2. In both the VMs I changed the network security group to make sure both are externally accessible.
  3. I downloaded tomcat 7 on each of the VMs using wget and deployed my war file on each of them.
  4. Tested with browser and ensured that application is accessible externally from each of the VMs.

Now I tried to load balance the above two VMs :

  1. Created a new load balancer in microsoft azure portal.
  2. Attached both the VMs as backend pool to the load balancer.
  3. Created a probe to check for application on port 8080
  4. Set up a load balancing rule to allow all TCP traffic on port 8080 to the VMs 8080.

However, Now when I try to connect to the load balancer using the port 8080 and the public IP . I get connection timeout error.

Is there anything which I have missed in the setup?


Solution

  • The problem with my setup was in the probe. I had configured probe on HTTP whereas it should be on TCP.