MySQL balanced cluster howto and Ubuntu server 6.10

Discussion in 'HOWTO-Related Questions' started by arsh79, Jun 29, 2007.

  1. arsh79

    arsh79 New Member

    Hello everyone,
    following the (great) howto I've been able to get the MySQL cluster up and running flawlessy, but I found some problems configuring UltraMonkey.

    I followed the howto step by step (aka "cut and paste") and all check commands are replying as expected with a notable exception: if i disable ldirectord as a daemon I can't see weights shifting with "ipvsadm -L -n" (both servers are weight 0) like this:

    Code:
    IP Virtual Server version 1.2.1 (size=4096)
    Prot LocalAddress:Port Scheduler Flags
      -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
    TCP  192.168.10.15:mysql wrr
      -> 192.168.10.11:mysql           Local   0      0          0
      -> 192.168.10.12:mysql           Route   0      0          0
    If i issue a "/etc/init.d/ldirectord start" weights start shifting as expected as one or the other server fails.

    My real problem is that if I stop the MySQL sql node on the active master I can't connect to the database anymore, thus not routing requests to the backup sql node.

    I can see in the output of ipvsadm the correct server weights (mysql stopped weight 0, the active one weight 1)

    Any suggestions?
    I can provide logs and/or conf files if you need them.

    Thank you for your time in advance
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Are there any errors in your logs?
     
  3. arsh79

    arsh79 New Member

    No, it doesn't report any error in logs...
    I found out that if I'm trying to connect from a third server the whole system works as expected.

    I take it that the service isn't balanced when one of the hosting servers is trying to access it. I have only 2 servers in my setup, with a web application (that resides on the same servers) accessing the database cluster.
    Do you think is possible to have a failover cluster with only 2 servers or I must have at least 3?
     
  4. falko

    falko Super Moderator Howtoforge Staff

    What IP address does your web application use to connect to MySQL? It should be the virtual IP address.
     
  5. arsh79

    arsh79 New Member

    Yes, in my setup i have (192.168.0...) .11 and .12 as SQL interfaces and .15 as virtual IP for the balanced mysql to listen to.
    Now if i shutdown mysql on server .11 and try connect to server .15 i get the "unable to connect" error...
    Probably that's happening because of the lo:0 interface I configured
     

Share This Page