Good morning everybody,<br><br>I've built up a load balance system with two routers an two real servers.<br>On each servers, I've configured two different services: tftp and http.<br>For momitoring http service I've used default piranha parameters and everything
<br>works well, while for monitoring tftp I've written a custom script.<br><br>My script returns the string "OK" if it is able to contact the service, otherwise<br>it returns "FAIL". If I start "pulse" daemon after starting real servers, everyting
<br>works fine and I can see all the two real server displayed on the piranha<br>monitoring interface, but if I stop some of the tftp services, piranha doesn't<br>detect this event (I still see on the piranha monitoring user interface all the services, even dead
<br>ones) and continues sending the tftp packets to the dead services (I can see this sniffing packets on servers).<br>Also If I want to restart the pulse daemon I must change heartbeat post on<br><a href="http://lvs.cf">
lvs.cf</a> fila, as I get the message: pulse: "cannot create heartbeat socket --<br>running as root?"<br><br>In short, it seems to me, when using an external monitoring script, piranha is<br>only able the to detect when the script succeeds.
<br><br>I'm using piranha version 0.7.12 on Red HAT AS 3.<br><br>Here's my monitoring script (It can return "Ok" if it can contact service, oterwise it returns "FAIL"):<br><br>#!/bin/bash<br><br>
TFTP=/usr/bin/tftp<br><br>#HOST="localhost"<br>HOST=$1<br>PORT=69<br>RETRIES=10<br>TO=10<br>URL="/000000000000"<br><br>RC=0<br>TMP1=`mktemp /tmp/tftpmon.XXXXXXXXXX` || exit 1<br>TMP2=`mktemp /tmp/tftpmon.XXXXXXXXXX` || exit 1
<br>$TFTP <<- EOF > $TMP1 2> /dev/null<br>$HOST<br>timeout $TO<br>rexmt $TO<br>get $URL $TMP2<br>EOF<br><br>   if ! grep -q Received $TMP1; then<br>      RC=1<br>   fi<br>   if grep -q "File not found" $TMP1; then
<br>      RC=0<br>   fi<br><br>           if [ "$RC" = "0" ]; then<br>                        echo "OK";<br>           else<br>                echo "FAIL";<br>           fi<br><br>   rm -f $TMP1 $TMP2
<br><br>And my <a href="http://lvs.cf">lvs.cf</a> is the following:<br><br>serial_no = 117<br>primary = <a href="http://172.42.1.190">172.42.1.190</a><br>service = lvs<br>backup_active = 1<br>backup = <a href="http://172.42.1.191">
172.42.1.191</a><br>heartbeat = 1<br>heartbeat_port = 539<br>keepalive = 6<br>deadtime = 18<br>network = nat<br>nat_router = <a href="http://192.168.1.251">192.168.1.251</a> eth1:1<br>debug_level = 3<br>virtual TFTP {<br>
     active = 1<br>     address = <a href="http://172.42.1.195">172.42.1.195</a> eth0:1<br>     vip_nmask = <a href="http://255.255.255.0">255.255.255.0</a><br>     port = 69<br>     persistent = 10<br>     expect = "OK"
<br>     use_regex = 0<br>     send_program = "/opt/myscript.sh %h"<br>     load_monitor = none<br>     scheduler = rr<br>     protocol = udp<br>     timeout = 6<br>     reentry = 15<br>     quiesce_server = 0<br>
     server pc170 {<br>         address = <a href="http://192.168.1.170">192.168.1.170</a><br>         active = 1<br>         weight = 1<br>     }<br>     server pc171 {<br>         address = <a href="http://192.168.1.171">
192.168.1.171</a><br>         active = 1<br>         weight = 1<br>     }<br>}<br>virtual ZTC-WEB {<br>     active = 1<br>     address = <a href="http://172.42.1.195">172.42.1.195</a> eth0:1<br>     vip_nmask = <a href="http://255.255.255.0">
255.255.255.0</a><br>     fwmark = 80<br>     port = 8080<br>     persistent = 10<br>     send = "GET / HTTP/1.0\r\n\r\n"<br>     expect = "HTTP"<br>     use_regex = 0<br>     load_monitor = none<br>     scheduler = rr
<br>     protocol = tcp<br>     timeout = 6<br>     reentry = 15<br>     quiesce_server = 0<br>     server pc170 {<br>         address = <a href="http://192.168.1.170">192.168.1.170</a><br>         active = 1<br>         weight = 1
<br>     }<br>     server pc171 {<br>         address = <a href="http://192.168.1.171">192.168.1.171</a><br>         active = 1<br>         weight = 1<br>     }<br>}<br><br>Is it a bug or did a mmake some mistake???<br>can anyone help me???
<br><br>Thanks in advance,<br>Fabrizio<br><br>