Webui + proxy plötzlich aus

Hi,

schon wieder: Eine ganze Schulklasse (max. 15 gleichzeitig) versucht di Schulkonsole zu öffnen und das Passwort zu ändern.
Jetzt ist sie in dem Zustand: keine Rückmeldung, kein Timeout, keine DAten im Log, ps auf dem Server:

root@server:/var/log/ajenti# ps aux | grep aj                                                                                               
root       775  0.2  0.6 343548 81444 ?        Sl   Okt13   8:15 /usr/bin/python /usr/local/bin/ajenti-panel -d --stock-plugins --plugins /u
sr/lib/linuxmuster-webui/plugins                                                                                                            |
nobody     849  0.0  0.6 279736 79232 ?        S    Okt13   0:28 /usr/local/bin/ajenti-panel worker [restricted session]     

Das ist echt kein Zustand. Keine der 5. Klassen konnten bisher ohne technische Probleme ihre Passwörter ändern. Liegt das an meiner Hardware (12GB RAM, 3 Cores Intel® Xeon® CPU E5420 @ 2.50GHz, 1Gbit angebunden) ? Kann doch auch nicht sein, dass die Hardware/Netzwerk zu schwachbrüstig für 15 popelige Anmeldungen ist?

VG, Tobias

korrigiere mich, ca. nach 5 Minuten bekomme ich in minimalem HTML

Worker timeout

statt der Schulkonsole.
VG, Tobias

ich korrigiere mich nochmals: nach ca. 10 Minuten, ich habe jetzt richtig auf die Uhr geschaut.

VG, Tobias

Hallo Tobias

Die Schüleranmeldung ist momentan nicht unterstützt, aus Sicherheitsgründen. Wenn ihr das ändert, musst ihr auch die Verantwortung nehmen.

Das Problem liegt nich am Hardware, aber an einem falschen Header, und ja, das sind genau 10min, es steht hier : ajenti/ajenti-core/aj/gate/middleware.py at e0f91bc28a6a59c137ce086d191acaa479853a58 · ajenti/ajenti · GitHub

Das ganze (Sicherheit + Header) ist gar nicht einfach zu lösen und benötigt viele Zeit, deswegen ist es für später geplant, aber ich arbeite gerade daran : First attempt to use gevent SSLSocket. · kiarn/ajenti@bed1c2c · GitHub

Gruß

Arnaud

Hallo Arnaud,
Vielen Dank für diese superschnelle Antwort!

Richtig. „Kein Zustand“ gilt dann nur für unsere Schule :slight_smile: und liegt nicht in der Verantwortung der linuxmuster-Lösung. Ich nehme mal an, dass die Schulkonsole von irgendeinem Header und oder Zustand „abgeschossen“ wird, was evtl. mit der Zeit oder der Masse von Anfrage zu tun hat. Wenn ich dich irgendwie unterstützen kann, sag mir was ich testen soll.

Abgesehen davon: Auch ich habe jetzt erfolgreich nativ mit Hilfe von gnome-center das Passwort geändert.

VG, Tobias

Hallo @Arnaud, hallo @Cgsman,

So einfach war es dann doch nicht, aber hier hab ich einen (bei mir) funktionierenden code:

Siehe hier: Serverperformance ich hab das auch nach github gepackt.

#!/usr/bin/env python3                                                                                                                                                                  
# -*- coding: utf-8 -*-                                                                                                                                                                 
import requests, json, argparse

formatpretty=True
try:
    from pygments import highlight, lexers, formatters # optional pretty printing                                                                                                       
except ImportError:
    formatpretty=False

URLBase="https://server"

parser = argparse.ArgumentParser(description="Test the login process of the WebUI. Login, retrieve identity, retrieve quota, measure time.")
parser.add_argument('-s','--serverurl', help='Server URL to use, defaults to "https://server"', required=False)
parser.add_argument('-v','--verbose', help='Show the output of Identity and Quota retrieval"', required=False, action="store_true")
parser.add_argument('-u','--user', help='Username to use for login', required=True)
parser.add_argument('-p','--password', help='Password to use for login', required=True)
args = parser.parse_args()
if args.serverurl != None:
    URLBase=args.serverurl
print("Login into ", URLBase)

s = requests.Session()
payload = {'username': args.user, 'mode': 'normal', 'password': args.password }
l = s.post(URLBase+"/api/core/auth", json=payload, verify=False)
print("Login ", end='')
if (l.status_code == requests.status_codes.codes.ok):
    print("ok, loads in ", l.elapsed.total_seconds(), " seconds.")

    n = s.get(URLBase+"/api/core/identity", verify=False)
    print("Identity retrieval ", end='')
    if (n.status_code == 200):
        print("ok, loads in ", n.elapsed.total_seconds(), " seconds.")
        if args.verbose:
            obj = json.dumps(n.json(), indent=2)
            if formatpretty:
                colorful_json = highlight(obj, lexers.JsonLexer(), formatters.TerminalFormatter())
                obj = colorful_json
            print(obj)
    else:
        print(" failed.")
    o = s.post(URLBase+"/api/lmn/quota/", verify=False)
    print("Quota retrieval ", end='')
    if (o.status_code == 200):
        print("ok, loads in ", o.elapsed.total_seconds(), " seconds.")
        if args.verbose:
            obj = json.dumps(o.json(), indent=2)
            if formatpretty:
                colorful_json = highlight(obj, lexers.JsonLexer(), formatters.TerminalFormatter())
                obj = colorful_json
            print(obj)
    else:
        print(" failed.")

else:
    print(" failed.")

liefert folgende Ausgabe:

./benchmark_webui.py -u "testuser" -p "Muster!" 2>/dev/null
Login into  https://server
Login ok, loads in  1.443546  seconds.
Identity retrieval ok, loads in  1.865406  seconds.
Quota retrieval ok, loads in  3.888849  seconds.

Damit kann ich(oder wer will) jetzt mal auf 20 Rechnern das Einloggen auf der Schulkonsole durchspielen.

VG, Tobias

4 „Gefällt mir“