help with load balancing mysql
Guy Waugh
gwaugh at scu.edu.au
Mon Feb 5 23:46:10 GMT 2007
bsheets at singlefin.net wrote:
> How would I call that from within resources.d, or is that where I set debug?
>
Looks like the '-d' flag is actually to start ldirectord in the
foreground, i.e. not as a daemon, and it also sets up debugging. So, you
probably won't be able to run it from heartbeat with this flag (although
I don't know enough about it to be sure).
If you can, run it from a shell prompt like this:
ldirectord -d
BTW, I said in my last email that debugging stuff would be printed to
stdout - looks like it actually prints it to stderr. As far as I know,
debugging stuff should appear on the screen regardless.
>
>
> -----Original Message-----
> From: Guy Waugh <gwaugh at scu.edu.au>
> Date: Tue, 06 Feb 2007 10:07:10
> To:"LinuxVirtualServer.org users mailing list." <lvs-users at linuxvirtualserver.org>
> Subject: Re: help with load balancing mysql
>
> Brian Sheets wrote:
>
>> Looking at ldirectord it looks like it uses the DBI module for perl, which is installed. But there is no mysql binary.. You think it may need that?
>>
>>
> Oh yeah, you're right - uses DBI. I'm pretty sure it wouldn't need the
> mysql binary.
>
> It looks like if you run ldirectord in debug mode (flag: -d), there is
> some debug code in the check_mysql routine that will print what's going
> on to stdout. Maybe give that a try.
>
> -- GW.
>
>> Yes, tcpdump is getting packets. I'm using ldirectord in several implementations and it works well, this is the only one I'm having issue with
>> ----- Original Message -----
>> From: "Guy Waugh" <gwaugh at scu.edu.au>
>> To: "LinuxVirtualServer.org users mailing list." <lvs-users at LinuxVirtualServer.org>
>> Sent: Sunday, February 4, 2007 8:08:21 PM (GMT-0800) US/Pacific
>> Subject: Re: help with load balancing mysql
>>
>> Brian Sheets wrote:
>>
>>
>>> One thing I forgot to note is that ldirectord exits silently, and the ip's are up and operational when this happens. I have to comment out the mysql config lines and restart heartbeat, which starts ldirectord.
>>>
>>>
>>>
>> Most peculiar...
>>
>> Another thought: Is the mysql command-line binary accessible to the user
>> running heartbeat (on my RHEL3 system, root starts heartbeat but setuids
>> to nobody - I don't know which user starts the daemon resources)?
>>
>> Did you find out whether tcpdump on the real servers are getting packets
>> when you telnet to port 3306 from the director to the real servers?
>>
>> Other than those thoughts, I'm not sure I'm going to be much more
>> help... I don't load-balance mysql myself, although I do use a few
>> 'negotiate'-type checks in my ldirectord config, for http, https,
>> smtp and dns - they have all worked fine for me.
>>
>> Cheers,
>> Guy.
>>
>>
>>> Brian
>>>
>>> ----- Original Message -----
>>> From: "Guy Waugh" <gwaugh at scu.edu.au>
>>> To: bsheets at singlefin.net, "LinuxVirtualServer.org users mailing list." <lvs-users at linuxvirtualserver.org>
>>> Sent: Sunday, February 4, 2007 4:12:15 PM (GMT-0800) US/Pacific
>>> Subject: Re: help with load balancing mysql
>>>
>>> bsheets at singlefin.net wrote:
>>>
>>>
>>>
>>>> Ipvsadm shows both servers with a weight of zero. Both reals have lo:0 and the appropriate sysctl.conf entries. This ldirectord is functional for other virtuals.
>>>>
>>>> There is no relevent errors, and it does show both reals being added with a weight of 0
>>>>
>>>> The part that it doesn't appear to be making the negotiate connection to verify the service is weird
>>>>
>>>>
>>>>
>>>>
>>> Indeed it is weird.
>>>
>>> All I can think of is: Any difference putting the 'service=mysql' line
>>> under the 'real=...' lines? (probably not), and... What does the
>>> ldirectord log say when you start ldirectord?
>>>
>>> Also, with tcpdump on the real servers active, does it register packets
>>> when you telnet to port 3306 from the director (just to check that
>>> tcpdump is working)?
>>>
>>> - GW.
>>>
>>>
>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Guy Waugh <gwaugh at scu.edu.au>
>>>> Date: Mon, 05 Feb 2007 10:19:17
>>>> To:"LinuxVirtualServer.org users mailing list." <lvs-users at LinuxVirtualServer.org>
>>>> Subject: Re: help with load balancing mysql
>>>>
>>>> Brian Sheets wrote:
>>>>
>>>>
>>>>
>>>>
>>>>> I'm having a problem load balancing MySQL with ldirectord
>>>>>
>>>>> here is my config
>>>>>
>>>>> # MYSQL
>>>>> virtual=172.16.10.122:3306
>>>>> service=mysql
>>>>> real=172.16.10.120:3306 gate
>>>>> real=172.16.10.121:3306 gate
>>>>> checktype=negotiate
>>>>> login="ldirector"
>>>>> passwd="xxxxxx"
>>>>> database="ldirectordb"
>>>>> request="select * from connectioncheck"
>>>>> scheduler=wrr
>>>>>
>>>>> I'm running this using the latest ultramonkey on debian sarge.
>>>>>
>>>>> I can run a tcpdump on the real server and look for port 3306 connections to the db to connect and run the check, but none are being made
>>>>>
>>>>> Anyone have any ideas?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> What's the output of 'ipvsadm -Ln'? Is the virtual service listed, and
>>>> if so, are the real servers listed?
>>>>
>>>> Anything in the ldirectord log?
>>>>
>>>> Given you're using LVS-DR, do the real servers have the 172.16.10.122
>>>> address set up as a loopback address?
>>>>
>>>> Cheers,
>>>> Guy.
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> thanks
>>>>>
>>>>> Brian
>>>>>
>>>>> _______________________________________________
>>>>> LinuxVirtualServer.org mailing list - lvs-users at LinuxVirtualServer.org
>>>>> Send requests to lvs-users-request at LinuxVirtualServer.org
>>>>> or go to http://www.in-addr.de/mailman/listinfo/lvs-users
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> _______________________________________________
>>>> LinuxVirtualServer.org mailing list - lvs-users at LinuxVirtualServer.org
>>>> Send requests to lvs-users-request at LinuxVirtualServer.org
>>>> or go to http://www.in-addr.de/mailman/listinfo/lvs-users
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> LinuxVirtualServer.org mailing list - lvs-users at LinuxVirtualServer.org
>>>> Send requests to lvs-users-request at LinuxVirtualServer.org
>>>> or go to http://www.in-addr.de/mailman/listinfo/lvs-users
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users at LinuxVirtualServer.org
> Send requests to lvs-users-request at LinuxVirtualServer.org
> or go to http://www.in-addr.de/mailman/listinfo/lvs-users
>
--
Guy Waugh
Unix System Administrator
IT&TS, Southern Cross University
Lismore, NSW, Australia
Email: gwaugh at scu.edu.au
Ph.: +61 2 6620 3196
Fax: +61 2 6620 3033
Search lvs-users Archives
More information about the lvs-users
mailing list