itou
Bonjour,
Je tente d'installer un cluster MySQL sous Fedora 6. J'ai 6 serveurs dispo dont 4 noeuds MySQL et 2 frontaux.
Voici un peu le descriptif de l'installation.
LD1 --> Load Balancer 1 ip: 10.2.2.3 ip virtuel :10.2.2.50
LD2 --> Load Balancer 2 ip: 10.2.2.4
SQL1 --> Noeud SQL 1 ip:10.2.2.51
SQL2 --> Noeud SQL 1 ip:10.2.2.52
SQL3 --> Noeud SQL 1 ip:10.2.2.53
SQL4 --> Noeud SQL 1 ip:10.2.2.54
Pour les noeuds, j'ai pas de problème. Ils fonctionnent très bien. Par contre, pour les frontaux c'est toute une autre histoire.
J'ai installé et configurer Heartbeat comme suit :
/etc/ha.d/ha.cf
bcast eth0
mcast eth0 225.0.0.1 694 1 1
node ld1
logfacility local0
auto_failback off
respawn hacluster /usr/lib/heartbeat/ipfail
apiauth ipfail gid=haclient uid=hacluster
logfile /var/log/ha.log
/etc/ha.d/haresources
ld1 IPaddr::10.2.2.50/24/eth0 ldirectord::ldirectord.cf
/etc/ha.d/haresources
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes
virtual = 10.2.2.50:3306
service = mysql
real = 10.2.2.51:3306 gate
real = 10.2.2.52:3306 gate
real = 10.2.2.53:3306 gate
real = 10.2.2.54:3306 gate
checktype = negotiate
login = "ldirector"
passwd = "ldirectorpassword"
database = "ldirectordb"
request = "SELECT * FROM connectioncheck"
scheduler = wrr
J'ai aussi configurer un LO:0 avec l'ip virtuel en /32 sur LD1.
Quand je démarre le service heartbeat, voici ce que j'ai comme résultats:
/var/log/messages
Jan 20 17:39:12 ld1 logd: [2245]: info: logd started with default configuration.
Jan 20 17:39:12 ld1 logd: [2253]: info: G_main_add_SignalHandler: Added signal handler for signal 15
Jan 20 17:39:12 ld1 logd: [2245]: info: G_main_add_SignalHandler: Added signal handler for signal 15
Jan 20 17:39:13 ld1 heartbeat: [2407]: WARN: Logging daemon is disabled --enabling logging daemon is recommended
Jan 20 17:39:13 ld1 heartbeat: [2407]: info: **************************
Jan 20 17:39:13 ld1 heartbeat: [2407]: info: Configuration validated. Starting heartbeat 2.0.7
Jan 20 17:39:13 ld1 heartbeat: [2408]: info: heartbeat: version 2.0.7
Jan 20 17:39:14 ld1 heartbeat: [2408]: info: Heartbeat generation: 9
Jan 20 17:39:14 ld1 heartbeat: [2408]: info: G_main_add_TriggerHandler: Added signal manual handler
Jan 20 17:39:14 ld1 heartbeat: [2408]: info: G_main_add_TriggerHandler: Added signal manual handler
Jan 20 17:39:14 ld1 heartbeat: [2408]: info: Removing /var/run/heartbeat/rsctmp failed, recreating.
Jan 20 17:39:14 ld1 heartbeat: [2408]: info: glib: UDP Broadcast heartbeat started on port 694 (694) interface eth0
Jan 20 17:39:14 ld1 heartbeat: [2408]: info: glib: UDP Broadcast heartbeat closed on port 694 interface eth0 - Status: 1
Jan 20 17:39:14 ld1 heartbeat: [2408]: info: glib: UDP multicast heartbeat started for group 225.0.0.1 port 694 interface eth0 (ttl=1 loop=1)
Jan 20 17:39:14 ld1 heartbeat: [2408]: info: G_main_add_SignalHandler: Added signal handler for signal 17
Jan 20 17:39:14 ld1 heartbeat: [2408]: info: Comm_now_up(): updating status to active
Jan 20 17:39:14 ld1 heartbeat: [2408]: info: Local status now set to: 'active'
Jan 20 17:39:14 ld1 heartbeat: [2408]: info: Starting child client "/usr/lib/heartbeat/ipfail" (100,151)
Jan 20 17:39:14 ld1 heartbeat: [2408]: info: Local status now set to: 'up'
Jan 20 17:39:14 ld1 heartbeat: [2429]: info: Starting "/usr/lib/heartbeat/ipfail" as uid 100 gid 151 (pid 2429)
Jan 20 17:39:15 ld1 heartbeat: [2408]: info: Link ld1:eth0 up.
ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 10.2.2.50:3306 wrr
-> 10.2.2.54:3306 Route 0 0 0
-> 10.2.2.53:3306 Route 0 0 0
-> 10.2.2.52:3306 Route 0 0 0
-> 10.2.2.51:3306 Route 0 0 0
ip addr sh eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:04:76:91:2b:65 brd ff:ff:ff:ff:ff:ff
inet 10.2.2.3/24 brd 10.2.2.255 scope global eth0
inet6 fe80::204:76ff:fe91:2b65/64 scope link
valid_lft forever preferred_lft forever
ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:76:91:2B:65
inet addr:10.2.2.3 Bcast:10.2.2.255 Mask:255.255.255.0
inet6 addr: fe80::204:76ff:fe91:2b65/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16915 errors:0 dropped:0 overruns:1 frame:0
TX packets:27365 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1274720 (1.2 MiB) TX bytes:6642057 (6.3 MiB)
Interrupt:11 Base address:0x4000
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:26 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2072 (2.0 KiB) TX bytes:2072 (2.0 KiB)
lo:0 Link encap:Local Loopback
inet addr:10.2.2.50 Mask:255.255.255.255
UP LOOPBACK RUNNING MTU:16436 Metric:1
ps -e
2245 ? 00:00:00 ha_logd
2253 ? 00:00:00 ha_logd
2408 ? 00:00:00 heartbeat
2424 ? 00:00:00 heartbeat
2425 ? 00:00:00 heartbeat
2426 ? 00:00:00 heartbeat
2427 ? 00:00:00 heartbeat
2428 ? 00:00:00 heartbeat
2429 ? 00:00:00 ipfail
/sbin/sysctl -p
kernel.sysrq = 0
net.ipv4.ip_forward = 1
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.tcp_syncookies = 1
kernel.core_uses_pid = 1
net.ipv4.conf.all.arp_ignore = 1
error: "net.ipv4.conf.all.hidden" is an unknown key
error: "net.ipv4.conf.lo.hidden" is an unknown key
net.ipv4.conf.eth0.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.eth0.arp_announce = 2
error: "net.ipv4.conf.all.hidden" is an unknown key
error: "net.ipv4.conf.lo.hidden" is an unknown key
Pour l'instant, je n'ai pas encore configurer le serveur LD2. J'essai de faire fonctionner le premier serveur avant de configurer le second.
Bon, d'après ce que je vois dans /var/log/message, ldirectord ne semble pas ce lancer. J'ai donc essayé de le lancer en manuel avec /etc/init.d/ldirectord start.
Et là j'ai juste ces ligne de plus dans le log:
Jan 20 17:40:32 ld1 ldirectord[2449]: Invoking ldirectord invoked as: /usr/sbin/ldirectord restart
Jan 20 17:40:32 ld1 ldirectord[2449]: Starting Linux Director v1.143 as daemon
Jan 20 17:40:32 ld1 ldirectord[2451]: Added virtual server: 10.2.2.50:3306
Jan 20 17:40:32 ld1 ldirectord[2451]: Quiescent real server: 10.2.2.51:3306 ( x 10.2.2.3:3306) (Weight set to 0)
Jan 20 17:40:32 ld1 kernel: IPVS: [wrr] scheduler registered.
Jan 20 17:40:32 ld1 ldirectord[2451]: Quiescent real server: 10.2.2.52:3306 ( x 10.2.2.3:3306) (Weight set to 0)
Jan 20 17:40:32 ld1 ldirectord[2451]: Quiescent real server: 10.2.2.53:3306 ( x 10.2.2.3:3306) (Weight set to 0)
Jan 20 17:40:32 ld1 ldirectord[2451]: Quiescent real server: 10.2.2.54:3306 ( x 10.2.2.3:3306) (Weight set to 0)
Et après tout ça, ça ne fonctionne pas...
Des idée????
Itou