1

I'm configuring two load balancer (lb01 & lb02) with keepalived for my two mysql server (db01 & db02) with standard port 3306. There is virtual ip address (192.168.205.10) to access it also act as failover, but somehow the web server in the front can't access this mysql server using vip. Here is my config:

Keepalived:

Only the mysql part that i added here.

LB01:

virtual_server 192.168.205.10 3306 {
  delay_loop 6
  lb_algo rr
  lb_kind DR
  protocol TCP

  real_server 192.168.205.4 3306 {
    weight 10
    TCP_CHECK {
      connect_port    3306
      connect_timeout 2
    }
  }
}

LB02:

virtual_server 192.168.205.10 3306 {
  delay_loop 6
  lb_algo rr
  lb_kind DR
  protocol TCP

  real_server 192.168.205.6 3306 {
    weight 10
    TCP_CHECK {
      connect_port    3306
      connect_timeout 2
    }
  }
}

I already comment out the "bind-address=127.0.0.1" part in both server my.cnf. Also, remove all the firewall prog from my ubuntu server (ufw or iptables).

Any help?

thanks.

quanta
  • 51,413
  • 19
  • 159
  • 217
Ludwig
  • 23
  • 2
  • 4
  • What do you mean by "became filtered"? – Shane Madden Jun 26 '12 at 05:07
  • ohh, what i mean is that the mysql port should be open, not filtered..i have scanned the host using nmap – Ludwig Jun 26 '12 at 06:12
  • Gotcha - what nmap means when it says 'filtered' is that no response traffic of any kind was sent by the server in response to the `SYN`. So let's start by making sure the virtual IP is working correctly - is it responding to ping? – Shane Madden Jun 26 '12 at 15:26
  • yes, its responding to ping...seems that its blocked by something that i'm clueless, i already uninstalled firewall,selinux, still no response – Ludwig Jul 02 '12 at 07:15
  • Verify with `netstat` that it's listening on 0.0.0.0? – Shane Madden Jul 02 '12 at 16:10

1 Answers1

1

Did you check if you forgot to remove the mysql option --skip-network from your config file ?

The easiest way to find out if it's a network/firewall problem is to make a telnet connection on the lb* mysql servers port 3306 from the web server. If you can get through it's not a network issue :)

Or use tcpdump -i ethX port 3306

quanta
  • 51,413
  • 19
  • 159
  • 217
golja
  • 1,621
  • 10
  • 14
  • yes, i remove that option on mysql. But somehow its the keepalived config above not working, so i remove it, and now its working...still can't find the correct configuration for this, but so far its working...will try to figure out what might the problem with my keepalived configuration, will keep posted. Thanks all :) – Ludwig Jul 02 '12 at 07:41