Opened 13 years ago

Closed 13 years ago

#161 closed defect (fixed)

/var loopt vol: error in cleanup script

Reported by: huub Owned by: rick
Priority: critical Milestone: WL-9.0-RELEASE
Keywords: captive portal cleanup Cc:
Resource needed to fix:

Description

Op SOM2 (hybrid) is /var volgelopen.
/tmp staat vol met foutmeldingen / html pagina's, o.a.
met de mededeling

<!-- The above is a description of an error in a Python program, formatted

for a Web browser because the 'cgitb' module was enabled. In case you
are not reading this in a Web browser, here is the original traceback:

Traceback (most recent call last):

File "/usr/local/www/wlportal/index.cgi", line 166, in &lt;module&gt;

fw.cleanup()

File "/usr/local/www/wlportal/index.cgi", line 152, in cleanup

elif stored_mac.has_key(ip) and active_mac[ip] == stored_mac[ip]:

KeyError: '172.17.2.10'

Change History (10)

comment:1 by rick, 13 years ago

Owner: changed from nobody to rick
Status: newassigned

comment:2 by huub, 13 years ago

Zelfde verschijnsel bij NodeBoterhuis, complete htmlpagina:

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
 /usr/local/www/wlportal/index.cgi in ()
    164   if sys.argv[1] == 'cleanup':
    165     fw = PacketFilterControl()
=>  166     fw.cleanup()
    167     sys.exit(0)
    168 
fw = <__main__.PacketFilterControl instance>, fw.cleanup = <bound method PacketFilterControl.cleanup of <__main__.PacketFilterControl instance>>
 /usr/local/www/wlportal/index.cgi in cleanup(self=<__main__.PacketFilterControl instance>, expire_time=None)
    150         # MAC is whitelisted
    151         continue
=>  152       elif stored_mac.has_key(ip) and active_mac[ip] == stored_mac[ip]:
    153         # previous record found
    154         # Stored v.s. Active happy
stored_mac = {'172.17.31.17': '0:22:43:58:11:8', '172.17.32.12': '8:e7:cf:18:2c:2'}, stored_mac.has_key = <built-in method has_key of dict object>, ip = '172.17.31.17', active_mac = {'ue0': '0:27:22:2c:4c:8', 'ue1': '0:60:6e:01:0f:2', 'vr0': '0:27:22:10:f6:0', 'vr1': '0:0d:b9:20:41:b', 'vr2': '0:0d:b9:20:41:b', 'wlan0': '8:e7:f4:6f:89:e'}

<type 'exceptions.KeyError'>: '172.17.31.17'
      args = ('172.17.31.17',)
      message = '172.17.31.17' 

comment:3 by rick, 13 years ago

Status: assignedaccepted

Zit wat fout in het cleanup script, was net aan het kijken.

comment:4 by rick, 13 years ago

In 10794/hybrid:

Houdt rekening met clients die af-en-toe disconnecten, je ziet hiervan
tijdelijk geen MAC.

Related-To: nodefactory:ticket:161

comment:5 by rick, 13 years ago

In 10795/hybrid:

[1:-1] is voor het IP address en niet voor het mac adress. Zorg ervoor dat er
complete goede mac addressen opgeslagen worden.

Related-To: nodefactory:ticket:161

comment:6 by rick, 13 years ago

In 10796/hybrid:

Als we dan ook nog de goede IP addressen teruggeven gaat het helemaal goed.

Related-To: nodefactory:ticket:161

comment:7 by rick, 13 years ago

In 10804/hybrid:

De /tmp bevuilen is niet zo'n best plan. Gooi het maar naar de syslog, gaat het
altijd naar files die goed geroteerd zijn.

Related-To: nodefactory:ticket:161

comment:8 by rick, 13 years ago

In 10805/hybrid:

Anders heten de allebei index.cgi in de syslog en dat is wat ongelukkig.

Related-To: nodefactory:ticket:161

comment:9 by rick, 13 years ago

De /var gefixed, ik heb het op SOM en Boterhuis met het handje gedaan en zal wel in Nagios letten of ik er nog niet een paar gemist heb.

comment:10 by rick, 13 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.