2012-07-18 - Re: [GRASE-Hotspot] captive client gets disconnected every 5 minutes, not a desktop thing.

Header Data

From: Tim White <ti***8@gmail.com>
Message Hash: 1c46eeb3c073096ffd2f3caa83979b63fab0029b18500e85d8c6587b5807cf19
Message ID: <50073214.8000202@gmail.com>
Reply To: <CAFaSQofMC_4_iy7dCWrgTSnAgTmf_fQGbQK9p3LJ42v+9zWyhg@mail.gmail.com>
UTC Datetime: 2012-07-18 15:00:52 UTC
Raw Date: Thu, 19 Jul 2012 08:00:52 +1000

Raw message

Ok, it seems the only way we are going to work out the problem, is to 
see what the script is seeing that it thinks is a change in network 
settings.

The script responsible is 
/usr/share/grase/scripts/update_grase_networksettings.sh

Make sure you have your computer setup to email you the results of cron 
jobs (requires a smtp server). Alternatively, install ssmtp and set it 
up to use mail.purewhite.id.au as the smarthost and my tim AT 
grasehotspot.org address as the destination (I think that'll work, email 
me off list before you try that).

Then in the script 
/usr/share/grase/scripts/update_grase_networksettings.sh, find the 
following section and add the one diff line.

Change this part
--
update_new_file() {
     files_equal $1 $2 || {
         cp -f $1 $2
         return 0;
     }
     return 1;
}
--
To look like this
--
update_new_file() {
     files_equal $1 $2 || {
     diff -s $1 $2
         cp -f $1 $2
         return 0;
     }
     return 1;
}
--

Its not well tested, but you should get an email every 5 minutes when 
it's trying to restart the network settings, and it should tell us if 
the 2 files are different or the same, and if they are different, it'll 
show us how. Until I see why it thinks they are different, I'm stumped! 
I attempt to detect server errors and don't restart the services on 
server errors, but maybe I've missed one.

Tim

On 18/07/12 20:03, bb gate wrote:
> Hello all,
>
>
> The OS is Precise server i386. I installed GRASE dev.packages on top. 
> The captive client got disconnected every 5 minutes. Syslog went on 
> and on like this.
>
> Jul 17 07:00:01 bb CRON[2580]: (root) CMD 
> (/usr/share/grase/scripts/check_clock.sh)
> Jul 17 07:00:01 bb CRON[2581]: (root) CMD ( 
> /usr/local/bin/traffic-ulogd.sh >/dev/null 2>&1)
> Jul 17 07:00:01 bb CRON[2582]: (root) CMD (   
> /usr/share/grase/scripts/update_grase_networksettings.sh)
> Jul 17 07:00:01 bb CRON[2587]: (nobody) CMD ( wget -q 
> http://127.0.0.1/grase/radmin/cron.php -O -)
> Jul 17 07:00:01 bb crontab[2631]: (root) LIST (root)
> Jul 17 07:00:01 bb crontab[2633]: (root) REPLACE (root)
> Jul 17 07:00:01 bb coova-chilli[2439]: chilli.c: 7535: CoovaChilli 
> shutting down
> Jul 17 07:00:01 bb coova-chilli[2635]: main-script.c: 93: Running 
> /etc/chilli/down.sh (0/0)
> Jul 17 07:00:02 bb dnsmasq[2444]: exiting on receipt of SIGTERM
> Jul 17 07:00:02 bb kernel: [  876.212365] device eth1 left promiscuous 
> mode
> Jul 17 07:00:03 bb ntpd[1596]: Deleting interface #10 tun0, 
> 10.1.0.1#123, interface stats: received=0, sent=0, dropped=0, 
> active_time=298 secs
> Jul 17 07:00:03 bb ntpd[1596]: peers refreshed
> Jul 17 07:00:04 bb dnsmasq[2816]: started, version 2.59 cachesize 150
> Jul 17 07:00:04 bb dnsmasq[2816]: compile time options: IPv6 
> GNU-getopt DBus i18n DHCP TFTP conntrack IDN
> Jul 17 07:00:04 bb dnsmasq[2816]: warning: ignoring resolv-file flag 
> because no-resolv is set
> Jul 17 07:00:04 bb dnsmasq[2816]: using nameserver 8.8.4.4#53
> Jul 17 07:00:04 bb dnsmasq[2816]: using nameserver 8.8.8.8#53
> Jul 17 07:00:04 bb dnsmasq[2816]: using nameserver 208.67.220.123#53
> Jul 17 07:00:04 bb dnsmasq[2816]: using nameserver 208.67.222.123#53
> Jul 17 07:00:04 bb dnsmasq[2816]: read /etc/hosts - 7 addresses
> Jul 17 07:00:04 bb coova-chilli[2811]: CoovaChilli(ChilliSpot) 1.2.9. 
> Copyright 2002-2005 Mondru AB. Licensed under GPL. Copyright 2006-2011 
> Coova Technologies, LLC <su***t@coova.com 
> <mailto:su***t@coova.com>>. Licensed under GPL. See 
> http://www.coova.org/ for details.
> Jul 17 07:00:04 bb coova-chilli[2811]: tun.c: 604: TX queue length set 
> to 100
> Jul 17 07:00:04 bb kernel: [  878.451717] device eth1 entered 
> promiscuous mode
> Jul 17 07:00:04 bb coova-chilli[2824]: main-script.c: 93: Running 
> /etc/chilli/up.sh (0/0)
> Jul 17 07:00:04 bb coova-chilli[2811]: chilli.c: 5101: New DHCP 
> request from MAC=00-0A-E4-F4-64-81
> Jul 17 07:00:04 bb coova-chilli[2811]: chilli.c: 4989: Client 
> MAC=00-0A-E4-F4-64-81 assigned IP 10.1.0.2
> Jul 17 07:00:04 bb CRON[2577]: (CRON) info (No MTA installed, 
> discarding output)
> Jul 17 07:00:05 bb ntpd[1596]: Listen normally on 11 tun0 10.1.0.1 UDP 123
> Jul 17 07:00:05 bb ntpd[1596]: peers refreshed
> Jul 17 07:00:05 bb ntpd[1596]: new interface(s) found: waking up resolver
> Jul 17 07:01:01 bb cron[878]: (root) RELOAD (crontabs/root)
> Jul 17 07:01:17 bb coova-chilli[2811]: chilli.c: 5857: Successful UAM 
> login from username=demo1 IP=10.1.0.2
> Jul 17 07:05:01 bb CRON[2942]: (root) CMD (   
> /usr/share/grase/scripts/update_grase_networksettings.sh)
> Jul 17 07:05:02 bb crontab[2975]: (root) LIST (root)
> Jul 17 07:05:02 bb crontab[2977]: (root) REPLACE (root)
> Jul 17 07:05:02 bb coova-chilli[2811]: chilli.c: 7535: CoovaChilli 
> shutting down
> Jul 17 07:05:02 bb coova-chilli[2979]: main-script.c: 93: Running 
> /etc/chilli/down.sh (0/0)
> Jul 17 07:05:02 bb dnsmasq[2816]: exiting on receipt of SIGTERM
> Jul 17 07:05:02 bb kernel: [ 1176.347574] device eth1 left promiscuous 
> mode
> Jul 17 07:05:03 bb ntpd[1596]: Deleting interface #11 tun0, 
> 10.1.0.1#123, interface stats: received=0, sent=0, dropped=0, 
> active_time=298 secs
> Jul 17 07:05:03 bb ntpd[1596]: peers refreshed
> Jul 17 07:05:04 bb dnsmasq[3158]: started, version 2.59 cachesize 150
> Jul 17 07:05:04 bb dnsmasq[3158]: compile time options: IPv6 
> GNU-getopt DBus i18n DHCP TFTP conntrack IDN
> Jul 17 07:05:04 bb dnsmasq[3158]: warning: ignoring resolv-file flag 
> because no-resolv is set
> Jul 17 07:05:04 bb dnsmasq[3158]: using nameserver 8.8.4.4#53
> Jul 17 07:05:04 bb dnsmasq[3158]: using nameserver 8.8.8.8#53
> Jul 17 07:05:04 bb dnsmasq[3158]: using nameserver 208.67.220.123#53
> Jul 17 07:05:04 bb dnsmasq[3158]: using nameserver 208.67.222.123#53
> Jul 17 07:05:04 bb dnsmasq[3158]: read /etc/hosts - 7 addresses
> Jul 17 07:05:04 bb coova-chilli[3153]: CoovaChilli(ChilliSpot) 1.2.9. 
> Copyright 2002-2005 Mondru AB. Licensed under GPL. Copyright 2006-2011 
> Coova Technologies, LLC <su***t@coova.com 
> <mailto:su***t@coova.com>>. Licensed under GPL. See 
> http://www.coova.org/ for details.
> Jul 17 07:05:04 bb coova-chilli[3153]: tun.c: 604: TX queue length set 
> to 100
> Jul 17 07:05:04 bb kernel: [ 1178.590123] device eth1 entered 
> promiscuous mode
> Jul 17 07:05:04 bb coova-chilli[3166]: main-script.c: 93: Running 
> /etc/chilli/up.sh (0/0)
> Jul 17 07:05:04 bb CRON[2941]: (CRON) info (No MTA installed, 
> discarding output)
> Jul 17 07:05:05 bb ntpd[1596]: Listen normally on 12 tun0 10.1.0.1 UDP 123
> Jul 17 07:05:05 bb ntpd[1596]: peers refreshed
> Jul 17 07:05:05 bb ntpd[1596]: new interface(s) found: waking up resolver
> Jul 17 07:05:08 bb coova-chilli[3153]: chilli.c: 5101: New DHCP 
> request from MAC=00-0A-E4-F4-64-81
> Jul 17 07:05:08 bb coova-chilli[3153]: chilli.c: 4989: Client 
> MAC=00-0A-E4-F4-64-81 assigned IP 10.1.0.2
> Jul 17 07:06:01 bb cron[878]: (root) RELOAD (crontabs/root)
> Jul 17 07:06:45 bb coova-chilli[3153]: chilli.c: 5857: Successful UAM 
> login from username=demo1 IP=10.1.0.2
> Jul 17 07:09:01 bb CRON[3283]: (root) CMD (  [ -x 
> /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find 
> /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin 
> +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; 
> -delete)
> Jul 17 07:10:02 bb CRON[3295]: (root) CMD 
> (/usr/share/grase/scripts/check_clock.sh)
> Jul 17 07:10:02 bb CRON[3296]: (root) CMD (   
> /usr/share/grase/scripts/update_grase_networksettings.sh)
> Jul 17 07:10:02 bb crontab[3332]: (root) LIST (root)
> Jul 17 07:10:02 bb crontab[3334]: (root) REPLACE (root)
> Jul 17 07:10:02 bb coova-chilli[3153]: chilli.c: 7535: CoovaChilli 
> shutting down
> Jul 17 07:10:02 bb coova-chilli[3336]: main-script.c: 93: Running 
> /etc/chilli/down.sh (0/0)
> Jul 17 07:10:02 bb dnsmasq[3158]: exiting on receipt of SIGTERM
> Jul 17 07:10:02 bb kernel: [ 1476.660404] device eth1 left promiscuous 
> mode
> Jul 17 07:10:03 bb ntpd[1596]: Deleting interface #12 tun0, 
> 10.1.0.1#123, interface stats: received=0, sent=0, dropped=0, 
> active_time=298 secs
> Jul 17 07:10:03 bb ntpd[1596]: peers refreshed
> Jul 17 07:10:04 bb dnsmasq[3515]: started, version 2.59 cachesize 150
> Jul 17 07:10:04 bb dnsmasq[3515]: compile time options: IPv6 
> GNU-getopt DBus i18n DHCP TFTP conntrack IDN
> Jul 17 07:10:04 bb dnsmasq[3515]: warning: ignoring resolv-file flag 
> because no-resolv is set
> Jul 17 07:10:04 bb dnsmasq[3515]: using nameserver 8.8.4.4#53
> Jul 17 07:10:04 bb dnsmasq[3515]: using nameserver 8.8.8.8#53
> Jul 17 07:10:04 bb dnsmasq[3515]: using nameserver 208.67.220.123#53
> Jul 17 07:10:04 bb dnsmasq[3515]: using nameserver 208.67.222.123#53
> Jul 17 07:10:04 bb dnsmasq[3515]: read /etc/hosts - 7 addresses
> Jul 17 07:10:04 bb coova-chilli[3510]: CoovaChilli(ChilliSpot) 1.2.9. 
> Copyright 2002-2005 Mondru AB. Licensed under GPL. Copyright 2006-2011 
> Coova Technologies, LLC <su***t@coova.com 
> <mailto:su***t@coova.com>>. Licensed under GPL. See 
> http://www.coova.org/ for details.
> Jul 17 07:10:04 bb coova-chilli[3510]: tun.c: 604: TX queue length set 
> to 100
> Jul 17 07:10:04 bb kernel: [ 1478.904929] device eth1 entered 
> promiscuous mode
> Jul 17 07:10:05 bb coova-chilli[3523]: main-script.c: 93: Running 
> /etc/chilli/up.sh (0/0)
> Jul 17 07:10:05 bb coova-chilli[3510]: chilli.c: 5101: New DHCP 
> request from MAC=00-0A-E4-F4-64-81
> Jul 17 07:10:05 bb coova-chilli[3510]: chilli.c: 4989: Client 
> MAC=00-0A-E4-F4-64-81 assigned IP 10.1.0.2
> Jul 17 07:10:05 bb CRON[3293]: (CRON) info (No MTA installed, 
> discarding output)
> Jul 17 07:10:05 bb ntpd[1596]: Listen normally on 13 tun0 10.1.0.1 UDP 123
> Jul 17 07:10:05 bb ntpd[1596]: peers refreshed
> Jul 17 07:10:05 bb ntpd[1596]: new interface(s) found: waking up resolver
> Jul 17 07:10:27 bb coova-chilli[3510]: chilli.c: 5857: Successful UAM 
> login from username=demo1 IP=10.1.0.2
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
>
> _______________________________________________
> Grase-hotspot mailing list
> Gr***t@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/grase-hotspot


Thread