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

I have 2 Ubuntu 11.04 VM's on which i have installed Heartbeat + apache2 to achieve a "high availability" setup. Heartbeat is up and running on both but im not able to ping the Virtual IP (cluster ip)

From the guide which i followed Heartbeat is automatically supposed to create an alias on the active node. But i dont see any alias in both my VM's

The setup goes like this:

enter image description here

ha-node1 configs:

root@ha-node1:/etc/ha.d# cat ha.cf
autojoin none
#mcast bond0 239.0.0.43 694 1 0
warntime 5
deadtime 15
initdead 60
keepalive 2
node ha-node1
node ha-node2
pacemaker respawn
logfile /var/log/ha-log
debugfile /var/log/ha-debug
udpport 694
auto_failback on
bcast eth0

root@ha-node1:/etc/ha.d# cat haresources
ha-node1 IPaddr::10.0.0.10 apache2

root@ha-node1:/etc/ha.d# crm_mon -1
============
Last updated: Thu Oct  6 17:42:57 2011
Stack: Heartbeat
Current DC: ha-node1 (710962f3-6239-4519-8ab7-b176af92cfe4) - partition with quorum
Version: 1.0.9-da7075976b5ff0bee71074385f8fd02f296ec8a3
2 Nodes configured, unknown expected votes
0 Resources configured.
============

Online: [ ha-node1 ha-node2 ]

root@ha-node1:/etc/ha.d# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:0c:29:cb:ae:9d
          inet addr:10.0.0.8  Bcast:10.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::20c:29ff:fecb:ae9d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25247 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17038 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:25278878 (25.2 MB)  TX bytes:2374181 (2.3 MB)
          Interrupt:19 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:480 (480.0 B)  TX bytes:480 (480.0 B)

root@ha-node1:/etc/ha.d# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 00:0c:29:cb:ae:9d brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.8/8 brd 10.255.255.255 scope global eth0
    inet6 fe80::20c:29ff:fecb:ae9d/64 scope link
       valid_lft forever preferred_lft forever

ha-node2 configs:

root@ha-node2:/etc/ha.d# cat ha.cf
autojoin none
#mcast bond0 239.0.0.43 694 1 0
warntime 5
deadtime 15
initdead 60
keepalive 2
node ha-node1
node ha-node2
pacemaker respawn
logfile /var/log/ha-log
debugfile /var/log/ha-debug
udpport 694
auto_failback on
bcast eth0

root@ha-node2:/etc/ha.d# cat haresources
ha-node1 IPaddr::10.0.0.10 apache2

root@ha-node2:/etc/ha.d# crm_mon -1
============
Last updated: Thu Oct  6 17:44:07 2011
Stack: Heartbeat
Current DC: ha-node1 (710962f3-6239-4519-8ab7-b176af92cfe4) - partition with quorum
Version: 1.0.9-da7075976b5ff0bee71074385f8fd02f296ec8a3
2 Nodes configured, unknown expected votes
0 Resources configured.
============

Online: [ ha-node1 ha-node2 ]

root@ha-node2:/etc/ha.d# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:0c:29:d9:ca:5c
          inet addr:10.0.0.9  Bcast:10.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::20c:29ff:fed9:ca5c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23310 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15397 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:25070323 (25.0 MB)  TX bytes:2044327 (2.0 MB)
          Interrupt:19 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:480 (480.0 B)  TX bytes:480 (480.0 B)

root@ha-node2:/etc/ha.d# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 00:0c:29:d9:ca:5c brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.9/8 brd 10.255.255.255 scope global eth0
    inet6 fe80::20c:29ff:fed9:ca5c/64 scope link
       valid_lft forever preferred_lft forever

crm_mon -1 tell me that 0 Resources configured. But i have clearly added the IPaddr resource in the haresources. I cannot ping or browse the Virtual IP. Have I done anything wrong in the setup?

share|improve this question
    
I don't see where you checked for aliases. There's no ip addr show, or similar command, in your question. –  David Schwartz Oct 6 '11 at 12:36
    
Sorry i accidentally a line –  Nel Oct 6 '11 at 12:36
    
I have done a ifconfig -a on both my nodes –  Nel Oct 6 '11 at 12:37
    
Right, but ifconfig -a only shows aliases that have unique interface names. You need to check for unnamed aliases as well. –  David Schwartz Oct 6 '11 at 12:44
1  
0 Resources configured. means the failover IP's not configured. If you only need IP failover, CARP is much simpler to configure and use. –  David Schwartz Oct 6 '11 at 13:04

1 Answer 1

up vote 2 down vote accepted

0 Resources configured means that the failover IP is not configured as an HA resource.

By the way, if IP failover is all you need, CARP (via ucarp/ucarpd) is much simpler.

share|improve this answer
    
Thank you, I need heartbeat to take care of apache+mysql in this setup. I shall look into CARP also. –  Nel Oct 7 '11 at 3:10

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.