[Chilli] SOLVED !!!! No process in pidfile '/usr/local/var/run/chilli.pid' found running; none killed.

Russell Mike radius.sir at gmail.com
Mon Feb 11 11:10:27 UTC 2013


>
>>>  Thanks dear all once again --
>>>
>>>  The only problem left that i cannot stop chilli (Coova_1.3.0 & UBUNTU
>>> 12.4 LTS x64). I can modify the start/stop script and use "kill -9" but
>>> really do not want to do that. perhaps there is better way to handle this.
>>>
>>>  because i read that kill -9 doesn't give the process a chance to
>>> cleanly:
>>>
>>> 1) shut down socket connections
>>>
>>> 2) clean up temp files
>>>
>>> 3) inform its children that it is going away
>>>
>>> 4) reset its terminal characteristics
>>>
>>> and so on and so on and so on.
>>>
>>>
>>>  *PROBLEM:*
>>>
>>> root at captive:~# /etc/init.d/chilli stop
>>>
>>> Found configuration /usr/local/etc/chilli/coova-vlan10/chilli.conf
>>>
>>> Running DHCPIF=coova-vlan10 /etc/init.d/chilli stop
>>>
>>> Shutting down chilli: No process in pidfile
>>> '/usr/local/var/run/chilli.coova-vlan10.pid' found running; none killed.
>>>
>>>
>>>  Found configuration /usr/local/etc/chilli/coova-vlan20/chilli.conf
>>>
>>> Running DHCPIF=coova-vlan20 /etc/init.d/chilli stop
>>>
>>> Shutting down chilli: No process in pidfile
>>> '/usr/local/var/run/chilli.coova-vlan20.pid' found running; none killed.
>>>
>>>
>>>  Found configuration /usr/local/etc/chilli/coova-vlan30/chilli.conf
>>>
>>> Running DHCPIF=coova-vlan30 /etc/init.d/chilli stop
>>>
>>> Shutting down chilli: No process in pidfile
>>> '/usr/local/var/run/chilli.coova-vlan30.pid' found running; none killed.
>>>
>>>
>>>  Found configuration /usr/local/etc/chilli/coova-vlan40/chilli.conf
>>>
>>> Running DHCPIF=coova-vlan40 /etc/init.d/chilli stop
>>>
>>> Shutting down chilli: No process in pidfile
>>> '/usr/local/var/run/chilli.coova-vlan40.pid' found running; none killed.
>>>
>>>
>>>  Found configuration /usr/local/etc/chilli/coova-vlan50/chilli.conf
>>>
>>> Running DHCPIF=coova-vlan50 /etc/init.d/chilli stop
>>>
>>> Shutting down chilli: No process in pidfile
>>> '/usr/local/var/run/chilli.coova-vlan50.pid' found running; none killed.
>>>
>>> Thanks / Regards
>>>
>>> RM --R
>>>
>>>

*Mike WROTE:*

Hi Sir,

Ever since chilli was installed, default script was never able to stop the
service, i tried re compelling, uninstalled/installed number of time. but
just after the installation this script never could stop the daemon.


*Chuan SAID:*
I install coovachilli with deb from old chilli file. It includes chilli and
start stop scripts. I added original chilli for you with email. you need to
create only 1 vlan then test start and stop check on start It creates
chilli*.pid cause you need pid to kill for stop chilli


*Mike Wrote: *

Hi Sir

BIG BIG Thanks, that worked !!!!

i can now stop chilli normally. i modified the stop section of my chilli
start script, i need to create two variables in edition. I tested running
chilli on physical interface (one instance only) & stop using script, it
just worked. i am expecting it would work for VLANs (multi instances) as
well.

But the script that was created during compilation/installation were never
able to stop the daemon. Was failing with following error:
*
*
Shutting down chilli: No process in pidfile '/usr/local/var/run/chilli.pid'
found running; none killed.

Say simple work thanks does not seems to be enough. God will through shine
in your way. here is the working script *(CoovaChilli 1.3.0 on
UBUNTU_12.4LTS x64)*. Modification are showed in RED.



#!/bin/sh

*# Custom Variable Defined by RM ---*
*DAEMON=/usr/local/sbin/chilli*
*NAME=chilli*

[ -f /usr/local/sbin/chilli ] || exit 0

. /usr/local/etc/chilli/functions

MULTI=$(ls /usr/local/etc/chilli/*/chilli.conf 2>/dev/null)
[ -z "$DHCPIF" ] && [ -n "$MULTI" ] && {
    for c in $MULTI;
    do
        echo "Found configuration $c"
        DHCPIF=$(basename $(echo $c|sed 's#/chilli.conf##'))
        export DHCPIF
        echo "Running DHCPIF=$DHCPIF $0 $*"
        sh $0 $*
    done
    exit
}

if [ -n "$DHCPIF" ]; then
    CONFIG=/usr/local/etc/chilli/$DHCPIF/chilli.conf
    pidfile=/usr/local/var/run/chilli.$DHCPIF.pid
else
    CONFIG=/usr/local/etc/chilli.conf
    pidfile=/usr/local/var/run/chilli.pid
fi

[ -f $CONFIG ] || {
    echo "$CONFIG Not found"
    exit 0
}

check_required

RETVAL=0
prog="chilli"

case $1 in
    start)
        echo -n "Starting $prog: "

        /sbin/modprobe tun >/dev/null 2>&1
        echo 1 > /proc/sys/net/ipv4/ip_forward

        [ -e /dev/net/tun ] || {
            (cd /dev;
                mkdir net;
                cd net;
                mknod tun c 10 200)
        }

        writeconfig
        radiusconfig

        test ${HS_ADMINTERVAL:-0} -gt 0 && {
            (crontab -l 2>&- | grep -v $0
                echo "*/$HS_ADMINTERVAL * * * * $0 radconfig"
                ) | crontab - 2>&-
        }

        ifconfig $HS_LANIF 0.0.0.0
        if [ "$(which start-stop-daemon)" = "" ]; then
            /usr/local/sbin/chilli -c $CONFIG --pidfile=$pidfile &
        else
            start-stop-daemon -S --pidfile=$pidfile --user=chilli \
                --exec /usr/local/sbin/chilli -- -c $CONFIG &
        fi
        echo
        ;;

    radconfig)
        [ -e $MAIN_CONF ] || writeconfig
        radiusconfig
        ;;

    reload)
        killall -HUP chilli
        ;;

    restart)
        $0 stop
        sleep 1
        $0 start
        RETVAL=$?
        ;;

    stop)
        echo -n "Shutting down $prog: "

        crontab -l 2>&- | grep -v $0 | crontab -


   crontab -l 2>&- | grep -v /etc/init.d/chilli | crontab -


        start-stop-daemon --oknodo --stop --quiet --pidfile
/var/run/$NAME.$HS_LANIF.pid \
                --exec $DAEMON
        echo
        ;;

    *)
        echo "Usage: $0 {start|stop|restart|reload|radconfig}"
        exit 1
esac

exit $?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.coova.org/pipermail/chilli/attachments/20130211/4dfc7154/attachment-0001.html>


More information about the Chilli mailing list