Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
What do you mean by "became filtered"? –  Shane Madden Jun 26 '12 at 5: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 6: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 2 '12 at 7:15
    
Verify with netstat that it's listening on 0.0.0.0? –  Shane Madden Jul 2 '12 at 16:10

1 Answer 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

share|improve this answer
    
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 2 '12 at 7:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.