Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux Virtual Server: Users

Re: [lvs-users] Ultramonkey heartbeat not starting ldirectord automatically

 

 

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded


aslan at digirati

Sep 4, 2007, 6:54 PM

Post #1 of 7 (896 views)
Permalink
Re: [lvs-users] Ultramonkey heartbeat not starting ldirectord automatically

Hi,

Did you looked in the system logs for errors from ldirectord or
heartbeat ?


best regard,
Aslan Carlos




Em Ter, 2007-09-04 às 19:38 -0400, j j escreveu:
> When heartbeat is started at bootup, it's not starting ldirectord.
> Any idea why?
> I do not have a stand by linux director. All the setup was done
> following the instructions on
> http://www.ultramonkey.org/3/topologies/hc-ha-lb-eg.html and
> http://www.howtoforge.com/loadbalanced_mysql_cluster_debian.
>
> My linux director files are set as follows and I have only 1 node:
>
> vi /etc/ha.d/ha.cf
>
> logfacility local0
> bcast eth0
> mcast eth0 225.0.0.1 694 1 0
> auto_failback off
> node a
> #node loadb2
> respawn hacluster /usr/lib/heartbeat/ipfail
> apiauth ipfail gid=haclient uid=hacluster
>
> vi /etc/ha.d/haresources
>
> a \
> ldirectord::ldirectord.cf \
> LVSSyncDaemonSwap::master \
> IPaddr2::192.168.0.240/24/eth0/192.168.0.255
>
> vi /etc/ha.d/ldirectord.cf
>
> # Global Directives
> checktimeout=10
> checkinterval=2
> autoreload=no
> logfile="local0"
> quiescent=yes
>
> virtual = 192.168.0.240:3306
> service = mysql
> real = 192.168.0.4:3306 gate
> real = 192.168.0.5:3306 gate
> checktype = negotiate
> login = "ldirector"
> passwd = "somepassword"
> database = "ldirectordb"
> request = "SELECT * FROM connectioncheck"
> scheduler = wrr
>
> On the main Linux Director, after starting heartbeat, ldirectord is
> not automatically started by heartbeat. I get this:
>
> [root@a me]# ps aux| grep heartbeat
> root 3249 0.0 2.0 5204 5204 ? SLs 22:37 0:00
> heartbeat: heartbeat: master control process
> nobody 3263 0.0 1.6 4256 4256 ? SL 22:37 0:00
> heartbeat: heartbeat: FIFO reader
> nobody 3264 0.0 1.6 4252 4252 ? SL 22:37 0:00
> heartbeat: heartbeat: write: serial /dev/ttyS0
> nobody 3265 0.0 1.6 4252 4252 ? SL 22:37 0:00
> heartbeat: heartbeat: read: serial /dev/ttyS0
> nobody 3266 0.0 1.6 4252 4252 ? SL 22:37 0:00
> heartbeat: heartbeat: write: mcast eth0
> nobody 3267 0.0 1.6 4252 4252 ? SL 22:37 0:00
> heartbeat: heartbeat: read: mcast eth0
> nobody 3268 0.0 1.6 4252 4252 ? SL 22:37 0:00
> heartbeat: heartbeat: write: ping 192.168.0.1
> nobody 3269 0.0 1.6 4252 4252 ? SL 22:37 0:00
> heartbeat: heartbeat: read: ping 192.168.0.1
> 1001 3294 0.0 0.3 3224 968 ? S 22:37 0:00
> /usr/lib/heartbeat/ipfail
> root 4016 0.0 0.2 4164 628 pts/0 S+ 22:46 0:00 grep heartbeat
>
> [root@a me]# /sbin/ip addr sh eth0
> 2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
> link/ether 00:04:5a:6e:f0:dc brd ff:ff:ff:ff:ff:ff
> inet 192.168.0.2/24 brd 192.168.0.255 scope global eth0
> inet6 fe80::204:5aff:fe6e:f0dc/64 scope link
> valid_lft forever preferred_lft forever
>
> [root@a me]# /usr/sbin/ldirectord ldirectord.cf status
> ldirectord is stopped for /etc/ha.d/ldirectord.cf
>
> [root@a me]# /sbin/ipvsadm -L -n
> IP Virtual Server version 1.2.0 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
> -> RemoteAddress:Port Forward Weight ActiveConn InActConn
>
> [root@a me]# /etc/ha.d/resource.d/LVSSyncDaemonSwap master status
> master stopped
>
>
>
> ============
> After stopping heartbeat:
>
> [root@a me]# ps aux| grep heartbeat
> root 3967 0.0 0.2 4752 616 pts/0 S+ 23:02 0:00 grep heartbeat
>
> [root@a me]# /sbin/ipvsadm -L -n
> IP Virtual Server version 1.2.0 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
> -> RemoteAddress:Port Forward Weight ActiveConn InActConn
>
> [root@a me]# /etc/init.d/ldirectord start
> Starting ldirectord [ OK ]
>
> [root@a me]# /sbin/ipvsadm -L -n
> IP Virtual Server version 1.2.0 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
> -> RemoteAddress:Port Forward Weight ActiveConn InActConn
> TCP 192.168.0.240:3306 wrr
> -> 192.168.0.5:3306 Route 0 0 0
> -> 192.168.0.4:3306 Route 0 0 0
>
> [root@a me]# /etc/ha.d/resource.d/LVSSyncDaemonSwap master status
> master stopped
>
> [root@a me]# /usr/sbin/ldirectord ldirectord.cf status
> ldirectord is stopped for /etc/ha.d/ldirectord.cf
>
>
> [me [at] de ~]$ mysql -h 192.168.0.240 -u ldirector -p
> Enter password:
> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.240' (113)
>
>
>
> Even with heartbeat stopped and ldirectord running, I can't connect to
> mysql server.
>
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
> Send requests to lvs-users-request [at] LinuxVirtualServer
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users


_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


pierg75 at yahoo

Sep 5, 2007, 12:09 AM

Post #2 of 7 (841 views)
Permalink
Re: [lvs-users] Ultramonkey heartbeat not starting ldirectord automatically [In reply to]

j j wrote:
> When heartbeat is started at bootup, it's not starting ldirectord.
> Any idea why?
> I do not have a stand by linux director. All the setup was done
> following the instructions on
> http://www.ultramonkey.org/3/topologies/hc-ha-lb-eg.html and
> http://www.howtoforge.com/loadbalanced_mysql_cluster_debian.
>
> My linux director files are set as follows and I have only 1 node:
Why do you use lvs, heartbeat and everyhting else with one node?

Pier

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


rampeters at gmail

Sep 5, 2007, 6:47 AM

Post #3 of 7 (838 views)
Permalink
Re: [lvs-users] Ultramonkey heartbeat not starting ldirectord automatically [In reply to]

> Why do you use lvs, heartbeat and everyhting else with one node?

I am just running ultramonkey, nothing else. I have looked the system
logs. This is what I have:

/var/log/messages for node "a" after starting ultramonkey ldirecotrd

Sep 5 12:37:44 a kernel: IPVS: Registered protocols (TCP, UDP, AH, ESP)
Sep 5 12:37:44 a kernel: IPVS: Connection hash table configured
(size=4096, memory=32Kbytes)
Sep 5 12:37:44 a kernel: IPVS: ipvs loaded.
Sep 5 12:37:53 a ldirectord[4602]: Starting Linux Director v1.77.2.32 as daemon
Sep 5 12:37:53 a ldirectord: Starting ldirectord succeeded
Sep 5 12:37:53 a kernel: IPVS: [wrr] scheduler registered.
Sep 5 12:37:53 a ldirectord[4604]: Added virtual server: 192.168.0.240:3306
Sep 5 12:37:53 a ldirectord[4604]: Quiescent real server:
192.168.0.4:3306 mapped from 192.168.0.4:3306 ( x 192.168.0.240:3306)
(Weight set to 0)
Sep 5 12:37:53 a ldirectord[4604]: Quiescent real server:
192.168.0.5:3306 mapped from 192.168.0.5:3306 ( x 192.168.0.240:3306)
(Weight set to 0)

[me [at] de ~]$ mysql -h 192.168.0.240 -u ldirector -p
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.240' (113)

When I try to connect to mysql, I don't see any entry in
/var/log/messages real server c,d or in linux director
/var/log/messages.

Ping Virtual IP from node "a"
[root@a me]# ping 192.168.0.240
PING 192.168.0.240 (192.168.0.240) 56(84) bytes of data.
>From 192.168.0.2 icmp_seq=1 Destination Host Unreachable
>From 192.168.0.2 icmp_seq=2 Destination Host Unreachable
>From 192.168.0.2 icmp_seq=3 Destination Host Unreachable
>From 192.168.0.2 icmp_seq=5 Destination Host Unreachable

Ping Virtual IP from node "a" (another computer on the same network)
[me [at] de ~]$ ping 192.168.0.240
PING 192.168.0.240 (192.168.0.240) 56(84) bytes of data.
>From 192.168.0.3 icmp_seq=2 Destination Host Unreachable
>From 192.168.0.3 icmp_seq=3 Destination Host Unreachable
>From 192.168.0.3 icmp_seq=4 Destination Host Unreachable
>From 192.168.0.3 icmp_seq=6 Destination Host Unreachable

Ping doesn't work either.

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


pierg75 at yahoo

Sep 5, 2007, 7:42 AM

Post #4 of 7 (839 views)
Permalink
Re: [lvs-users] Ultramonkey heartbeat not starting ldirectord automatically [In reply to]

j j wrote:
>> Why do you use lvs, heartbeat and everyhting else with one node?
>
> I am just running ultramonkey, nothing else.
Ultramokey is just a set of other tools (correct me if i'm wrong),
heartbeat, ldirector and lvs.

> I have looked the system
> logs. This is what I have:
>
> /var/log/messages for node "a" after starting ultramonkey ldirecotrd
>
> Sep 5 12:37:44 a kernel: IPVS: Registered protocols (TCP, UDP, AH, ESP)
> Sep 5 12:37:44 a kernel: IPVS: Connection hash table configured
> (size=4096, memory=32Kbytes)
> Sep 5 12:37:44 a kernel: IPVS: ipvs loaded.
> Sep 5 12:37:53 a ldirectord[4602]: Starting Linux Director v1.77.2.32 as daemon
> Sep 5 12:37:53 a ldirectord: Starting ldirectord succeeded
> Sep 5 12:37:53 a kernel: IPVS: [wrr] scheduler registered.
> Sep 5 12:37:53 a ldirectord[4604]: Added virtual server: 192.168.0.240:3306
> Sep 5 12:37:53 a ldirectord[4604]: Quiescent real server:
> 192.168.0.4:3306 mapped from 192.168.0.4:3306 ( x 192.168.0.240:3306)
> (Weight set to 0)
> Sep 5 12:37:53 a ldirectord[4604]: Quiescent real server:
> 192.168.0.5:3306 mapped from 192.168.0.5:3306 ( x 192.168.0.240:3306)
> (Weight set to 0)
>
> [me [at] de ~]$ mysql -h 192.168.0.240 -u ldirector -p
> Enter password:
> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.240' (113)
/etc/init.d/mysql status?
Or ps auxw | grep mysql?

Pier

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


rampeters at gmail

Sep 5, 2007, 8:22 PM

Post #5 of 7 (841 views)
Permalink
Re: [lvs-users] Ultramonkey heartbeat not starting ldirectord automatically [In reply to]

> > [me [at] de ~]$ mysql -h 192.168.0.240 -u ldirector -p
> > Enter password:
> > ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.240' (113)
> /etc/init.d/mysql status?
> Or ps auxw | grep mysql?
>
mysql server is running. That's not the problem.

My guess is that something wrong with ldirectord. It's showing Real
Server weights =0. This shouldn't be the case because both servers
are running and weight should be 1 for both.

[root@a me]# /sbin/ipvsadm -L -n
IP Virtual Server version 1.2.0 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.240:3306 wrr
-> 192.168.0.5:3306 Route 0 0 0
-> 192.168.0.4:3306 Route 0 0 0

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


graeme at graemef

Sep 6, 2007, 12:06 AM

Post #6 of 7 (835 views)
Permalink
Re: [lvs-users] Ultramonkey heartbeat not starting ldirectord automatically [In reply to]

On Wed, 2007-09-05 at 23:22 -0400, j j wrote:
> My guess is that something wrong with ldirectord. It's showing Real
> Server weights =0. This shouldn't be the case because both servers
> are running and weight should be 1 for both.

You showed this in your original log:

Sep 5 12:37:53 a ldirectord[4604]: Quiescent real server:
192.168.0.4:3306 mapped from 192.168.0.4:3306 ( x 192.168.0.240:3306)
(Weight set to 0)
Sep 5 12:37:53 a ldirectord[4604]: Quiescent real server:
192.168.0.5:3306 mapped from 192.168.0.5:3306 ( x 192.168.0.240:3306)
(Weight set to 0)

You have to determine *why* it's setting the weight to 0. Some sort of
healthcheck is failing, by the look of it.

How about you let us see your ldirectord config?

Graeme


_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


pierg75 at yahoo

Sep 6, 2007, 12:09 AM

Post #7 of 7 (837 views)
Permalink
Re: [lvs-users] Ultramonkey heartbeat not starting ldirectord automatically [In reply to]

j j wrote:
> mysql server is running. That's not the problem.
>
> My guess is that something wrong with ldirectord. It's showing Real
> Server weights =0. This shouldn't be the case because both servers
> are running and weight should be 1 for both.
>
> [root@a me]# /sbin/ipvsadm -L -n
> IP Virtual Server version 1.2.0 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
> -> RemoteAddress:Port Forward Weight ActiveConn InActConn
> TCP 192.168.0.240:3306 wrr
> -> 192.168.0.5:3306 Route 0 0 0
> -> 192.168.0.4:3306 Route 0 0 0
Uhm...wait a second...or i missed something or i didn't understand...are
you using two servers (two nodes) or just one?
In your first mail you said just one node...
If you have two servers, then post all info about both of them (ipvsadm,
ip addr sh, etc etc).

Pier

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.