Hallo,
ich habe die von "außen" zugängliche FHEMWEB-Instanz durch allowedCommands eingeschränkt. Wenn ich nun darauf zugreife, gibt es massenweise solche Einträge im Log:
2021.11.10 09:21:47 1: stacktrace:
2021.11.10 09:21:47 1: main::allowed_Authorize called by fhem.pl (3895)
2021.11.10 09:21:47 1: main::CallFn called by fhem.pl (5853)
2021.11.10 09:21:47 1: main::Authorized called by fhem.pl (1131)
2021.11.10 09:21:47 1: main::AnalyzePerlCommand called by fhem.pl (1189)
2021.11.10 09:21:47 1: main::AnalyzeCommand called by fhem.pl (1116)
2021.11.10 09:21:47 1: main::AnalyzeCommandChain called by ./FHEM/01_FHEMWEB.pm (2779)
2021.11.10 09:21:47 1: main::FW_fC called by ./FHEM/01_FHEMWEB.pm (963)
2021.11.10 09:21:47 1: main::FW_answerCall called by ./FHEM/01_FHEMWEB.pm (598)
2021.11.10 09:21:47 1: main::FW_Read called by fhem.pl (3895)
2021.11.10 09:21:47 1: main::CallFn called by fhem.pl (773)
Gibt es eine Möglichkeit gezielt diese Logeinträge zu unterdrücken, damit man andere Probleme im Log schneller sieht?
Ciao
MiK
ZitatGibt es eine Möglichkeit gezielt diese Logeinträge zu unterdrücken[...]
Klar, man setzt nicht "attr global stacktrace", dann kommt die WARNING Zeile genau einmal, und es gibt kein stacktrace.
Eine Unterdrueckung genau dieses Problems ist aber nicht implementiert.
Die Ausgabe hier reicht mir nicht um das Problem zu identifizieren, ich braeuchte die WARNING Ausgabe, und vmtl. die Definition der allowed.
Irgendwie bekomme ich im Moment keine Warning-Zeile dazu. Eventuell, weil ich schon einmal versucht habe das Problem zu lösen und im FHEMWEB "verbose" auf "0" gesetzt habe.
Aus der allowed-Definition:
attr allowed_WEB allowedCommands set,get,select style,xmllist,setreading
Ein Attribut "stacktrace" ist bei mir im global-Device nicht gesetzt.
Nachdem ich ein paar Verbose-Level wieder hoch gestellt habe, bekomme ich folgendes ausführlicheres Log:
2021.11.10 10:42:29 4: Connection closed for WEBhook_127.0.0.1_43316: EOF
2021.11.10 10:42:29 4: Connection accepted from WEBhook_127.0.0.1_43372
2021.11.10 10:42:29 4: WEBhook_127.0.0.1_43372 GET /webhook?detail=SVG_FileLog_Sysstat_1; BUFLEN:0
2021.11.10 10:42:29 4: WEBhook: /webhook?detail=SVG_FileLog_Sysstat_1 / RL:7955 / text/html; charset=UTF-8 / Content-Encoding: gzip
/ Cache-Control: no-cache, no-store, must-revalidate
2021.11.10 10:42:29 4: Connection closed for WEBhook_127.0.0.1_43372: EOF
2021.11.10 10:42:29 4: Connection accepted from WEBhook_127.0.0.1_43376
2021.11.10 10:42:29 4: WEBhook_127.0.0.1_43376 GET /webhook?cmd=%7BReadingsVal(%22SVG_FileLog_Sysstat_1%22%2C%22copyGplotFile%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_66384900441627; BUFLEN:0
2021.11.10 10:42:29 3: Forbidden command perl for WEBhook_127.0.0.1_43376
2021.11.10 10:42:29 1: stacktrace:
2021.11.10 10:42:29 1: main::allowed_Authorize called by fhem.pl (3895)
2021.11.10 10:42:29 1: main::CallFn called by fhem.pl (5853)
2021.11.10 10:42:29 1: main::Authorized called by fhem.pl (1131)
2021.11.10 10:42:29 1: main::AnalyzePerlCommand called by fhem.pl (1189)
2021.11.10 10:42:29 1: main::AnalyzeCommand called by fhem.pl (1116)
2021.11.10 10:42:29 1: main::AnalyzeCommandChain called by ./FHEM/01_FHEMWEB.pm (2779)
2021.11.10 10:42:29 1: main::FW_fC called by ./FHEM/01_FHEMWEB.pm (963)
2021.11.10 10:42:29 1: main::FW_answerCall called by ./FHEM/01_FHEMWEB.pm (598)
2021.11.10 10:42:29 1: main::FW_Read called by fhem.pl (3895)
2021.11.10 10:42:29 1: main::CallFn called by fhem.pl (773)
2021.11.10 10:42:29 4: WEBhook: /webhook?cmd=%7BReadingsVal(%22SVG_FileLog_Sysstat_1%22%2C%22copyGplotFile%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_66384900441627 / RL:93 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/ Cache-Control: no-cache, no-store, must-revalidate
2021.11.10 10:42:30 4: Connection accepted from WEBhook_127.0.0.1_43378
2021.11.10 10:42:30 4: WEBhook_127.0.0.1_43378 GET /webhook?cmd=%7BAttrVal(%22SVG_FileLog_Sysstat_1%22%2C%22room%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_66384900441627; BUFLEN:0
2021.11.10 10:42:30 3: Forbidden command perl for WEBhook_127.0.0.1_43378
2021.11.10 10:42:30 1: stacktrace:
2021.11.10 10:42:30 1: main::allowed_Authorize called by fhem.pl (3895)
2021.11.10 10:42:30 1: main::CallFn called by fhem.pl (5853)
2021.11.10 10:42:30 1: main::Authorized called by fhem.pl (1131)
2021.11.10 10:42:30 1: main::AnalyzePerlCommand called by fhem.pl (1189)
2021.11.10 10:42:30 1: main::AnalyzeCommand called by fhem.pl (1116)
2021.11.10 10:42:30 1: main::AnalyzeCommandChain called by ./FHEM/01_FHEMWEB.pm (2779)
2021.11.10 10:42:30 1: main::FW_fC called by ./FHEM/01_FHEMWEB.pm (963)
2021.11.10 10:42:30 1: main::FW_answerCall called by ./FHEM/01_FHEMWEB.pm (598)
2021.11.10 10:42:30 1: main::FW_Read called by fhem.pl (3895)
2021.11.10 10:42:30 1: main::CallFn called by fhem.pl (773)
2021.11.10 10:42:30 4: WEBhook: /webhook?cmd=%7BAttrVal(%22SVG_FileLog_Sysstat_1%22%2C%22room%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_66384900441627 / RL:82 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/ Cache-Control: no-cache, no-store, must-revalidate
2021.11.10 10:42:30 4: Connection closed for WEBhook_127.0.0.1_43376: EOF
2021.11.10 10:42:30 4: Connection accepted from WEBhook_127.0.0.1_43380
2021.11.10 10:42:30 4: Connection closed for WEBhook_127.0.0.1_43378: EOF
2021.11.10 10:42:30 4: Connection accepted from WEBhook_127.0.0.1_43382
2021.11.10 10:42:30 4: WEBhook_127.0.0.1_43380 POST /webhook/SVG_showLog?dev=SVG_FileLog_Sysstat_1&logdev=FileLog_Sysstat&gplotfile=SVG_FileLog_Sysstat_1&logfile=CURRENT&pos=&fwcsrf=csrf_66384900441627&fw_id=7005; BUFLEN:0
2021.11.10 10:42:30 4: WEBhook_127.0.0.1_43382 GET /webhook?XHR=1&inform=type=status;filter=SVG_FileLog_Sysstat_1;since=1636537348;fmt=JSON&fw_id=7005×tamp=1636537349941; BUFLEN:0
2021.11.10 10:42:30 4: FileLog_Sysstat get: Input file ./log/Sysstat-2021-11.log, from:2021-11-09_10:45:00 to:2021-11-10_10:44:59
2021.11.10 10:42:30 4: FileLog_Sysstat get: line 1, regexp:sysstat.temperature\x3a, col:3, output lines:91
2021.11.10 10:42:30 4: FileLog_Sysstat get: line 2, regexp:sysstat.user\x3a, col:3, output lines:92
2021.11.10 10:42:30 4: FileLog_Sysstat get: line 3, regexp:sysstat./\x3a, col:3, output lines:24
2021.11.10 10:42:30 4: FileLog_temperatures get: Input file ./log/temperatures-2021-11.log, from:2021-11-09_10:45:00 to:2021-11-10_10:44:59
2021.11.10 10:42:30 4: FileLog_temperatures get: line 1, regexp:dht.temperature\x3a, col:3, output lines:0
2021.11.10 10:42:30 4: WEBhook: /webhook/SVG_showLog?dev=SVG_FileLog_Sysstat_1&logdev=FileLog_Sysstat&gplotfile=SVG_FileLog_Sysstat_1&logfile=CURRENT&pos=&fwcsrf=csrf_66384900441627&fw_id=7005 / RL:3895 / image/svg+xml / Content-Encoding: gzip
/ Cache-Control: no-cache, no-store, must-revalidate
Das ist bei einer Plotansicht, da ich es damit immer gut reproduzieren kann. Die Meldungen kommen aber auch auf anderen Seiten.
Letztlich würde es mir schon genügen, wenn ich das Stacktrace noch wegbekommen könnte. Aber das ist bei mir im global gar nicht gesetzt.
Laut Code wird stacktrace in diesem Fall bei "attr allowed_WEB verbose 5" generiert.
Btw. "select style" ist kein FHEM Befehl, was man per allowed erlauben oder unterbinden kann.
Zitat von: rudolfkoenig am 10 November 2021, 10:58:44
Laut Code wird stacktrace in diesem Fall bei "attr allowed_WEB verbose 5" generiert.
Im allowed ist bei mir überhaupt kein verbose gesetzt.
Zitat von: rudolfkoenig am 10 November 2021, 10:58:44
Btw. "select style" ist kein FHEM Befehl, was man per allowed erlauben oder unterbinden kann.
Keine Ahnung, wo ich das her habe. War wohl ein Versuch die Styleauswahl zum Laufen zu bekommen.
verbose=0 in allowed entfernt zwar das
2021.11.10 11:06:07 3: Forbidden command perl for WEBhook_127.0.0.1_47280
Aber nicht den anschließenden Stacktrace.
Ich habe das jetzt nachgestellt, und dabei gemerkt, dass die Abfrage auf verbose 5 im Modul kaputt war.
Ich habe das jetzt gefixt, und eingecheckt.
Danke fuer die Meldung.
Vielen Dank!
Das heißt, der Stacktrace sollte dann ohne besondere verbose oder stacktrace Attribute verschwinden. Richtig?
Ja.