I have been trying to place two virtual machine with heartbeat. osboxes and osboxes2.
When I run nmap localhost this is the output:
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00017s latency).
Not shown: 991 closed ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
53/tcp open domain
80/tcp open http
443/tcp open https
631/tcp open ipp
3306/tcp open mysql
9050/tcp open tor-socks
10000/tcp open snet-sensor-mgmt
Here is the tcpdump of such interface eth0:
18:38:22.267817 IP 192.168.141.135.48748 > 192.168.141.255.694: UDP, length 315
18:38:22.268640 IP 192.168.141.135.38234 > osboxes2.694: UDP, length 315
18:38:22.269421 IP osboxes2 > 192.168.141.135: ICMP osboxes2 udp port 694 unreachable, length 351
As you can see udp port 694 unreachable. When i try to ping osboxes from osboxes2:
PING 192.168.141.137 (192.168.141.137) 56(84) bytes of data.
64 bytes from 192.168.141.137: icmp_seq=1 ttl=64 time=0.284 ms
64 bytes from 192.168.141.137: icmp_seq=2 ttl=64 time=0.291 ms
64 bytes from 192.168.141.137: icmp_seq=3 ttl=64 time=0.681 ms
ha.cf file from osboxes:
#Arquivo de log de debug:
logfile /var/log/ha-log
#Arquivo de log
debugfile /var/log/ha-debug
#Para onde vai os logs
logfacility local0
#Frequencia em segundo de batimentos cardicados
keepalive 2
#Tempo indica a morte do node
deadtime 25
#Tempo que o heartbeat deve esperar por beats (nao o beat dos beatboxes)
warntime 10
#Tempo maximo para declarar o outro servidor morto
initdead 50
#Porto de sincronia
udpport 694
#Endereco de broadcast da rede
bcast eth0
#Nao entendi. Se for preciso vai la procurar depois.
ucast eth0 192.168.141.137
#Determinar se o servidor volta para o master caso ele responda
auto_failback on
#Nome dos nodes do cluster
node osboxes2
node osboxes
haresourcers from osboxes:
osboxes 192.168.141.135 apache
It's worth noting that osboxes(principal node) is 192.168.141.135 and osboxes2 is 192.168.141.137.
I guessing the problem resides in the port 694 not opened since it is unreachable.