[Linux-HA] [Heartbeat] my VIP doesn't work :(

2011-04-26 Thread SEILLIER Mathieu
Hi all,
First I'm french so sorry in advance for my English...

I have to use Heartbeat for High Availability between 2 Tomcat 5.5 servers 
under Linux RedHat 5.3. The first server is active, the other one is passive. 
The master is called servappli01, with IP address 186.20.100.40, the slave is 
called servappli02, with IP address 186.20.100.39.
I configured a virtual IP 186.20.100.41. Each Tomcat is not launched when 
server is started, this is Heartbeat which starts Tomcat when it's running.
My problem is : When heartbeat is started on the first server, then on the 
second server, the VIP is assigned to the 2 servers ! also, Tomcat is started 
on each server, and each node see the other node as dead !

Here is my configuration :

ha.cf file (the same on each server) :

logfile /var/log/ha-log

debugfile /var/log/ha-debug

logfacility none

keepalive 2

warntime 6

deadtime 10

initdead 90

bcast eth0

node servappli01 servappli02

auto_failback yes

respawn hacluster /usr/lib/heartbeat/ipfail

apiauth ipfail gid=haclient uid=hacluster


haresources file (the same on each server) :

servappli01 IPaddr::186.20.100.41/24/eth0 tomcat


Result of ifconfig command on the first server (servappli01) :

eth0  Link encap:Ethernet  HWaddr 00:1E:0B:BB:C2:38

  inet adr:186.20.100.40  Bcast:186.20.100.255  Masque:255.255.255.0

  adr inet6: fe80::21e:bff:febb:c238/64 Scope:Lien

  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

  RX packets:14404996 errors:0 dropped:0 overruns:0 frame:0

  TX packets:6580505 errors:0 dropped:0 overruns:0 carrier:0

  collisions:0 lg file transmission:1000

  RX bytes:385833 (3.5 GiB)  TX bytes:2694953468 (2.5 GiB)

  Interruption:177 Memoire:fa00-fa012100



eth0:0Link encap:Ethernet  HWaddr 00:1E:0B:BB:C2:38

  inet adr:186.20.100.41  Bcast:186.20.100.255  Masque:255.255.255.0

  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  Interruption:177 Memoire:fa00-fa012100

Result of ifconfig command on the second server (servappli02) at the same time :

eth0  Link encap:Ethernet  HWaddr 00:1E:0B:77:C9:0C

  inet adr:186.20.100.39  Bcast:186.20.100.255  Masque:255.255.255.0

  adr inet6: fe80::21e:bff:fe77:c90c/64 Scope:Lien

  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

  RX packets:23815049 errors:0 dropped:0 overruns:0 frame:0

  TX packets:17441845 errors:0 dropped:0 overruns:0 carrier:0

  collisions:0 lg file transmission:1000

  RX bytes:2620027933 (2.4 GiB)  TX bytes:3595896739 (3.3 GiB)

  Interruption:177 Memoire:fa00-fa012100



eth0:0Link encap:Ethernet  HWaddr 00:1E:0B:77:C9:0C

  inet adr:186.20.100.41  Bcast:186.20.100.255  Masque:255.255.255.0

  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  Interruption:177 Memoire:fa00-fa012100

Result of /usr/bin/cl_status listnodes command (on each server) :

servappli02

servappli01


Result of /usr/bin/cl_status nodestatus servappli01 command on servappli01 :

active

Result of /usr/bin/cl_status nodestatus servappli02 command on servappli01 :

dead

Result of /usr/bin/cl_status nodestatus servappli01 command on servappli02 :

dead

Result of /usr/bin/cl_status nodestatus servappli02 command on servappli02 :

active

And of course, if I kill Tomcat on master server, there's no switch to the 
second server (a call to a webapp using the VIP doesn't work).

Can somebody help me please ?
I guess there's is something wrong but I don't know what !
Thanx

Mathieu
___
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


Re: [Linux-HA] [Heartbeat] my VIP doesn't work :(

2011-04-26 Thread mike
On 11-04-22 06:25 AM, SEILLIER Mathieu wrote:
 Hi all,
 First I'm french so sorry in advance for my English...

 I have to use Heartbeat for High Availability between 2 Tomcat 5.5 servers 
 under Linux RedHat 5.3. The first server is active, the other one is passive. 
 The master is called servappli01, with IP address 186.20.100.40, the slave is 
 called servappli02, with IP address 186.20.100.39.
 I configured a virtual IP 186.20.100.41. Each Tomcat is not launched when 
 server is started, this is Heartbeat which starts Tomcat when it's running.
 My problem is : When heartbeat is started on the first server, then on the 
 second server, the VIP is assigned to the 2 servers ! also, Tomcat is started 
 on each server, and each node see the other node as dead !

 Here is my configuration :

 ha.cf file (the same on each server) :

 logfile /var/log/ha-log

 debugfile /var/log/ha-debug

 logfacility none

 keepalive 2

 warntime 6

 deadtime 10

 initdead 90

 bcast eth0

 node servappli01 servappli02

 auto_failback yes

 respawn hacluster /usr/lib/heartbeat/ipfail

 apiauth ipfail gid=haclient uid=hacluster


 haresources file (the same on each server) :

 servappli01 IPaddr::186.20.100.41/24/eth0 tomcat


 Result of ifconfig command on the first server (servappli01) :

 eth0  Link encap:Ethernet  HWaddr 00:1E:0B:BB:C2:38

inet adr:186.20.100.40  Bcast:186.20.100.255  Masque:255.255.255.0

adr inet6: fe80::21e:bff:febb:c238/64 Scope:Lien

UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

RX packets:14404996 errors:0 dropped:0 overruns:0 frame:0

TX packets:6580505 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 lg file transmission:1000

RX bytes:385833 (3.5 GiB)  TX bytes:2694953468 (2.5 GiB)

Interruption:177 Memoire:fa00-fa012100



 eth0:0Link encap:Ethernet  HWaddr 00:1E:0B:BB:C2:38

inet adr:186.20.100.41  Bcast:186.20.100.255  Masque:255.255.255.0

UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
Interruption:177 Memoire:fa00-fa012100

 Result of ifconfig command on the second server (servappli02) at the same 
 time :

 eth0  Link encap:Ethernet  HWaddr 00:1E:0B:77:C9:0C

inet adr:186.20.100.39  Bcast:186.20.100.255  Masque:255.255.255.0

adr inet6: fe80::21e:bff:fe77:c90c/64 Scope:Lien

UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

RX packets:23815049 errors:0 dropped:0 overruns:0 frame:0

TX packets:17441845 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 lg file transmission:1000

RX bytes:2620027933 (2.4 GiB)  TX bytes:3595896739 (3.3 GiB)

Interruption:177 Memoire:fa00-fa012100



 eth0:0Link encap:Ethernet  HWaddr 00:1E:0B:77:C9:0C

inet adr:186.20.100.41  Bcast:186.20.100.255  Masque:255.255.255.0

UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
Interruption:177 Memoire:fa00-fa012100

 Result of /usr/bin/cl_status listnodes command (on each server) :

 servappli02

 servappli01


 Result of /usr/bin/cl_status nodestatus servappli01 command on servappli01 :

 active

 Result of /usr/bin/cl_status nodestatus servappli02 command on servappli01 :

 dead

 Result of /usr/bin/cl_status nodestatus servappli01 command on servappli02 :

 dead

 Result of /usr/bin/cl_status nodestatus servappli02 command on servappli02 :

 active

 And of course, if I kill Tomcat on master server, there's no switch to the 
 second server (a call to a webapp using the VIP doesn't work).

 Can somebody help me please ?
 I guess there's is something wrong but I don't know what !
 Thanx

 Mathieu
 ___
 Linux-HA mailing list
 Linux-HA@lists.linux-ha.org
 http://lists.linux-ha.org/mailman/listinfo/linux-ha
 See also: http://linux-ha.org/ReportingProblems


It almost sounds like the nodes are unaware of each other. Could be a 
network thing maybe. Here's some things to try:
Can you ssh or ping one node from the other?
Bring up one node with the VIP running - leave the other node up but 
heartbeat down. an you ping the VIP from the node NOT running HA?
What happens when you look at the cluster when both nodes are running - 
use the crm_mon command and paste what you see in here.

I'm thinking you have some sort of network issue.
___
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


Re: [Linux-HA] [Heartbeat] my VIP doesn't work :(

2011-04-26 Thread Amit Jathar
Have you generated the authkey by corosync-keygen command on one node  then 
copied that file to other node ?

-Original Message-
From: linux-ha-boun...@lists.linux-ha.org 
[mailto:linux-ha-boun...@lists.linux-ha.org] On Behalf Of mike
Sent: Tuesday, April 26, 2011 5:41 PM
To: General Linux-HA mailing list
Subject: Re: [Linux-HA] [Heartbeat] my VIP doesn't work :(

On 11-04-22 06:25 AM, SEILLIER Mathieu wrote:
 Hi all,
 First I'm french so sorry in advance for my English...

 I have to use Heartbeat for High Availability between 2 Tomcat 5.5 servers 
 under Linux RedHat 5.3. The first server is active, the other one is passive. 
 The master is called servappli01, with IP address 186.20.100.40, the slave is 
 called servappli02, with IP address 186.20.100.39.
 I configured a virtual IP 186.20.100.41. Each Tomcat is not launched when 
 server is started, this is Heartbeat which starts Tomcat when it's running.
 My problem is : When heartbeat is started on the first server, then on the 
 second server, the VIP is assigned to the 2 servers ! also, Tomcat is started 
 on each server, and each node see the other node as dead !

 Here is my configuration :

 ha.cf file (the same on each server) :

 logfile /var/log/ha-log

 debugfile /var/log/ha-debug

 logfacility none

 keepalive 2

 warntime 6

 deadtime 10

 initdead 90

 bcast eth0

 node servappli01 servappli02

 auto_failback yes

 respawn hacluster /usr/lib/heartbeat/ipfail

 apiauth ipfail gid=haclient uid=hacluster


 haresources file (the same on each server) :

 servappli01 IPaddr::186.20.100.41/24/eth0 tomcat


 Result of ifconfig command on the first server (servappli01) :

 eth0  Link encap:Ethernet  HWaddr 00:1E:0B:BB:C2:38

inet adr:186.20.100.40  Bcast:186.20.100.255
 Masque:255.255.255.0

adr inet6: fe80::21e:bff:febb:c238/64 Scope:Lien

UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

RX packets:14404996 errors:0 dropped:0 overruns:0 frame:0

TX packets:6580505 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 lg file transmission:1000

RX bytes:385833 (3.5 GiB)  TX bytes:2694953468 (2.5
 GiB)

Interruption:177 Memoire:fa00-fa012100



 eth0:0Link encap:Ethernet  HWaddr 00:1E:0B:BB:C2:38

inet adr:186.20.100.41  Bcast:186.20.100.255
 Masque:255.255.255.0

UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
Interruption:177 Memoire:fa00-fa012100

 Result of ifconfig command on the second server (servappli02) at the same 
 time :

 eth0  Link encap:Ethernet  HWaddr 00:1E:0B:77:C9:0C

inet adr:186.20.100.39  Bcast:186.20.100.255
 Masque:255.255.255.0

adr inet6: fe80::21e:bff:fe77:c90c/64 Scope:Lien

UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

RX packets:23815049 errors:0 dropped:0 overruns:0 frame:0

TX packets:17441845 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 lg file transmission:1000

RX bytes:2620027933 (2.4 GiB)  TX bytes:3595896739 (3.3
 GiB)

Interruption:177 Memoire:fa00-fa012100



 eth0:0Link encap:Ethernet  HWaddr 00:1E:0B:77:C9:0C

inet adr:186.20.100.41  Bcast:186.20.100.255
 Masque:255.255.255.0

UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
Interruption:177 Memoire:fa00-fa012100

 Result of /usr/bin/cl_status listnodes command (on each server) :

 servappli02

 servappli01


 Result of /usr/bin/cl_status nodestatus servappli01 command on servappli01 :

 active

 Result of /usr/bin/cl_status nodestatus servappli02 command on servappli01 :

 dead

 Result of /usr/bin/cl_status nodestatus servappli01 command on servappli02 :

 dead

 Result of /usr/bin/cl_status nodestatus servappli02 command on servappli02 :

 active

 And of course, if I kill Tomcat on master server, there's no switch to the 
 second server (a call to a webapp using the VIP doesn't work).

 Can somebody help me please ?
 I guess there's is something wrong but I don't know what !
 Thanx

 Mathieu
 ___
 Linux-HA mailing list
 Linux-HA@lists.linux-ha.org
 http://lists.linux-ha.org/mailman/listinfo/linux-ha
 See also: http://linux-ha.org/ReportingProblems


It almost sounds like the nodes are unaware of each other. Could be a network 
thing maybe. Here's some things to try:
Can you ssh or ping one node from the other?
Bring up one node with the VIP running - leave the other node up but heartbeat 
down. an you ping the VIP from the node NOT running HA?
What happens when you look at the cluster when both nodes are running - use the 
crm_mon command and paste what you see in here.

I'm thinking you have some sort of network issue.
___
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http

Re: [Linux-HA] [Heartbeat] my VIP doesn't work :(

2011-04-26 Thread Dimitri Maziuk
On 4/22/2011 4:25 AM, SEILLIER Mathieu wrote:

 Result of /usr/bin/cl_status nodestatus servappli01 command on servappli01 :
 active

 Result of /usr/bin/cl_status nodestatus servappli02 command on servappli01 :
 dead

 Result of /usr/bin/cl_status nodestatus servappli01 command on servappli02 :
 dead

 Result of /usr/bin/cl_status nodestatus servappli02 command on servappli02 :
 active

iptables?

 And of course, if I kill Tomcat on master server, there's no switch
 to  the second server (a call to a webapp using the VIP doesn't work).

You need mon for that.

Dima
___
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


Re: [Linux-HA] [Heartbeat] my VIP doesn't work :(

2011-04-26 Thread Dejan Muhamedagic
On Tue, Apr 26, 2011 at 12:29:28PM +, Amit Jathar wrote:
 Have you generated the authkey by corosync-keygen command on one node  
 then copied that file to other node ?

Heartbeat != Corosync

Thanks,

Dejan

 -Original Message-
 From: linux-ha-boun...@lists.linux-ha.org 
 [mailto:linux-ha-boun...@lists.linux-ha.org] On Behalf Of mike
 Sent: Tuesday, April 26, 2011 5:41 PM
 To: General Linux-HA mailing list
 Subject: Re: [Linux-HA] [Heartbeat] my VIP doesn't work :(
 
 On 11-04-22 06:25 AM, SEILLIER Mathieu wrote:
  Hi all,
  First I'm french so sorry in advance for my English...
 
  I have to use Heartbeat for High Availability between 2 Tomcat 5.5 servers 
  under Linux RedHat 5.3. The first server is active, the other one is 
  passive. The master is called servappli01, with IP address 186.20.100.40, 
  the slave is called servappli02, with IP address 186.20.100.39.
  I configured a virtual IP 186.20.100.41. Each Tomcat is not launched when 
  server is started, this is Heartbeat which starts Tomcat when it's running.
  My problem is : When heartbeat is started on the first server, then on the 
  second server, the VIP is assigned to the 2 servers ! also, Tomcat is 
  started on each server, and each node see the other node as dead !
 
  Here is my configuration :
 
  ha.cf file (the same on each server) :
 
  logfile /var/log/ha-log
 
  debugfile /var/log/ha-debug
 
  logfacility none
 
  keepalive 2
 
  warntime 6
 
  deadtime 10
 
  initdead 90
 
  bcast eth0
 
  node servappli01 servappli02
 
  auto_failback yes
 
  respawn hacluster /usr/lib/heartbeat/ipfail
 
  apiauth ipfail gid=haclient uid=hacluster
 
 
  haresources file (the same on each server) :
 
  servappli01 IPaddr::186.20.100.41/24/eth0 tomcat
 
 
  Result of ifconfig command on the first server (servappli01) :
 
  eth0  Link encap:Ethernet  HWaddr 00:1E:0B:BB:C2:38
 
 inet adr:186.20.100.40  Bcast:186.20.100.255
  Masque:255.255.255.0
 
 adr inet6: fe80::21e:bff:febb:c238/64 Scope:Lien
 
 UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 
 RX packets:14404996 errors:0 dropped:0 overruns:0 frame:0
 
 TX packets:6580505 errors:0 dropped:0 overruns:0 carrier:0
 
 collisions:0 lg file transmission:1000
 
 RX bytes:385833 (3.5 GiB)  TX bytes:2694953468 (2.5
  GiB)
 
 Interruption:177 Memoire:fa00-fa012100
 
 
 
  eth0:0Link encap:Ethernet  HWaddr 00:1E:0B:BB:C2:38
 
 inet adr:186.20.100.41  Bcast:186.20.100.255
  Masque:255.255.255.0
 
 UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 Interruption:177 Memoire:fa00-fa012100
 
  Result of ifconfig command on the second server (servappli02) at the same 
  time :
 
  eth0  Link encap:Ethernet  HWaddr 00:1E:0B:77:C9:0C
 
 inet adr:186.20.100.39  Bcast:186.20.100.255
  Masque:255.255.255.0
 
 adr inet6: fe80::21e:bff:fe77:c90c/64 Scope:Lien
 
 UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 
 RX packets:23815049 errors:0 dropped:0 overruns:0 frame:0
 
 TX packets:17441845 errors:0 dropped:0 overruns:0 carrier:0
 
 collisions:0 lg file transmission:1000
 
 RX bytes:2620027933 (2.4 GiB)  TX bytes:3595896739 (3.3
  GiB)
 
 Interruption:177 Memoire:fa00-fa012100
 
 
 
  eth0:0Link encap:Ethernet  HWaddr 00:1E:0B:77:C9:0C
 
 inet adr:186.20.100.41  Bcast:186.20.100.255
  Masque:255.255.255.0
 
 UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 Interruption:177 Memoire:fa00-fa012100
 
  Result of /usr/bin/cl_status listnodes command (on each server) :
 
  servappli02
 
  servappli01
 
 
  Result of /usr/bin/cl_status nodestatus servappli01 command on 
  servappli01 :
 
  active
 
  Result of /usr/bin/cl_status nodestatus servappli02 command on 
  servappli01 :
 
  dead
 
  Result of /usr/bin/cl_status nodestatus servappli01 command on 
  servappli02 :
 
  dead
 
  Result of /usr/bin/cl_status nodestatus servappli02 command on 
  servappli02 :
 
  active
 
  And of course, if I kill Tomcat on master server, there's no switch to the 
  second server (a call to a webapp using the VIP doesn't work).
 
  Can somebody help me please ?
  I guess there's is something wrong but I don't know what !
  Thanx
 
  Mathieu
  ___
  Linux-HA mailing list
  Linux-HA@lists.linux-ha.org
  http://lists.linux-ha.org/mailman/listinfo/linux-ha
  See also: http://linux-ha.org/ReportingProblems
 
 
 It almost sounds like the nodes are unaware of each other. Could be a network 
 thing maybe. Here's some things to try:
 Can you ssh or ping one node from the other?
 Bring up one node with the VIP running - leave the other node up but 
 heartbeat down. an you ping the VIP from the node NOT running HA?
 What happens when you look at the cluster when both nodes are running