Hello!
There is a known issue, where gmond will determine its multicast
channel, based on default route configuration.
This is not always correct, for example when default route is an
internet gateway, therefore it is not pointing to the local network,
which gmond should be using.
There is a solution for this problem, documented on ganglia web site,
saying:
___________________________________
Some users have reported problems on machines with no "default" route.
Gmond reports the error mcast_join() setsockopt() error: No such device
and then exits at startup. The workaround is to create a static route
for the ganglia multicast channel.
prompt> route add -host 239.2.11.71 dev eth0
Replace eth0 above with the name of the network interface you want to
send ganglia multicast traffic on
___________________________________
This not only solves "no default route" problem, but also an incorrect
default route issue, and makes it possible to bind gmond to the correct
network interface.
I have altered /etc/init.d/gmond script to run the mentioned above
command to add route when gmond is started and to remove it when it stops.
I attach this script and hope that you will implement it in the next
ganglia release.
Thank you for your great job!
--
Yaroslav Klyukin
Systems admin / integrator
Microway, Inc. - http://www.microway.com/
[EMAIL PROTECTED]
#!/bin/sh
#
# chkconfig: 2345 20 80
# description: gmond startup script
#
GMOND=/usr/sbin/gmond
GMOND_CONF="/etc/gmond.conf"
mcast_route()
{
MCAST_CHANNEL=`grep "^[ ]*mcast_channel" $GMOND_CONF|awk '{print $2}'`
MCAST_IF=`grep "^[ ]*mcast_if" $GMOND_CONF|awk '{print $2}'`
if [ "x$MCAST_IF" = "x" ]
then
MCAST_IF="eth0"
fi
if [ "x$MCAST_CHANNEL" = "x" ]
then
MCAST_CHANNEL="239.2.11.71"
fi
if [ "$1" = "add" ]
then
route add -host $MCAST_CHANNEL dev $MCAST_IF
fi
if [ "$1" = "del" ]
then
route del -host $MCAST_CHANNEL dev $MCAST_IF
fi
}
. /etc/rc.d/init.d/functions
RETVAL=0
case "$1" in
start)
echo -n "Starting GANGLIA gmond: "
[ -f $GMOND ] || exit 1
mcast_route add
daemon $GMOND
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/gmond
;;
stop)
echo -n "Shutting down GANGLIA gmond: "
mcast_route del
killproc gmond
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/gmond
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
status)
status gmond
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit $RETVAL