This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Load Balancing not load balancing

So I setup Server Load Balancing and well its not working.

Balancing Rule
Service: HTTP
Virtual Server: External WAN Address

Real Servers
web1 - 10.1.1.1
web2 - 10.1.1.2

Check type: HTTP Host
Check URL: index.html
Check interval: 15
Checked Automatic packet filter rules 

If I navigate to the website it works.

But... if I kill httpd on web1, it shows web1 as down.
If I navigate to the website now, it doesn't load and a tcpdump on web2 doesn't show the HTTP request. 

However the tcpdump shows the HTTP check from Astaro is working as desired.  The log files show the server going up and down as I stop and start httpd on web1.

2011:04:02-19:08:56 gate service_monitor[9039]: id="4000" severity="info" sys="System" sub="loadbalancing" name="REF_xKWwKekOVe 1 TCP 10.1.1.2:80 changed state to ONLINE"
2011:04:02-19:08:56 gate service_monitor[9039]: id="4000" severity="info" sys="System" sub="loadbalancing" name="REF_xKWwKekOVe 0 TCP 10.1.1.1:80 changed state to ONLINE"
2011:04:02-19:09:26 gate service_monitor[9039]: id="4000" severity="info" sys="System" sub="loadbalancing" name="REF_xKWwKekOVe 0 TCP 10.1.1.1:80 changed state to OFFLINE"
2011:04:02-19:09:57 gate service_monitor[9039]: id="4000" severity="info" sys="System" sub="loadbalancing" name="REF_xKWwKekOVe 0 TCP 10.1.1.1:80 changed state to ONLINE"
2011:04:02-21:35:56 gate service_monitor[9039]: id="4000" severity="info" sys="System" sub="loadbalancing" name="REF_xKWwKekOVe 0 TCP 10.1.1.1:80 changed state to OFFLINE"
2011:04:02-21:36:41 gate service_monitor[9039]: id="4000" severity="info" sys="System" sub="loadbalancing" name="REF_xKWwKekOVe 0 TCP 10.1.1.1:80 changed state to ONLINE"
2011:04:02-21:37:56 gate service_monitor[9039]: id="4000" severity="info" sys="System" sub="loadbalancing" name="REF_xKWwKekOVe 0 TCP 10.1.1.1:80 changed state to OFFLINE"
2011:04:02-21:38:26 gate service_monitor[9039]: id="4000" severity="info" sys="System" sub="loadbalancing" name="REF_xKWwKekOVe 0 TCP 10.1.1.1:80 changed state to ONLINE"
2011:04:02-21:41:26 gate service_monitor[9039]: id="4000" severity="info" sys="System" sub="loadbalancing" name="REF_xKWwKekOVe 0 TCP 10.1.1.1:80 changed state to OFFLINE"
2011:04:02-21:42:11 gate service_monitor[9039]: id="4000" severity="info" sys="System" sub="loadbalancing" name="REF_xKWwKekOVe 0 TCP 10.1.1.1:80 changed state to ONLINE"

Any tips or tricks to make this work correctly.

TIA


This thread was automatically locked due to age.
  • Hi doublejz,

    what ASG version do you use?
    What do you get on the browser if web1 is down, timeout or immediately a reset?

    Cheers
     Ulrich
  • I'm running 8.102. When web1 is down it takes a while, Firefox gives the error "Unable to connect". Doing a telnet to the external WAN address on 80 shows that nothing is listening aka not balancing to web2.
  • Can you check packetfilter.log for any suspicious entries ?

    Are you connection from LAN to the external address or from extern?
    If from LAN, please try again from external.

    Cheers
     Ulrich
  • I was attempting to access it from a public address different from the Astaro box.

    Nothing weird in the logs either when web1 is down and its tried to be access.
    10:36:09  Connection using NAT  TCP  Public IP Access Site : 30819 →  External WAN Address : 80 [SYN]  len=48 
    10:36:09  Connection using NAT  TCP  Public IP Access Site : 30820 →  External WAN Address : 80 [SYN]  len=48  10:36:09  Connection using NAT  TCP  Public IP Access Site : 30821 →  External WAN Address : 80 [SYN]  len=48
  • doublejz, what happens if you power down web1 instead of just killing httpd?

    What happens if you use 'Check type' "HTTP host" instead of "Ping"?

    Cheers - Bob
  • The check isn't the problem and the logs show that web1 is down when httpd is stopped. So the detection httpd dying is working its just not redirecting traffic to web2 when web1 is down.
  • Also just out of curiosity, I eliminated the load balancing rule and created a NAT to point 80 traffic to web2 and it works fine. So its definitely something with Astaro redirecting traffic once web1 isn't available. I also tried the ping check and it resulted in the same thing. I enabled an ICMP block rule in iptables on web1, Astaro showed it as down but never redirected the traffic to web2. Argh..
  • Hi doublejz,

    thats strange, I checked with 8.102 and it works for me,
    so this is not a general bug.

    Is it possible to get remote ssh access? If yes, please allow vpn.astaro.de (213.144.15.3) and send me the password via PM.

    Cheers
     Ulrich
  • So, I turned on SSL on my webservers and had to load balancing HTTPS too. So I created a group to include HTTP and HTTPS for the service in the load balancing rule. Well now it load balances between web1 and web2 for both services. Not sure why it only works this way but I won't complain since its working.