TelegramBot: FHEM crasht nach Update

Begonnen von justcallmeal, 18 November 2019, 11:27:37

Vorheriges Thema - Nächstes Thema

justcallmeal

Hallo zusammen,

gestern habe ich mein Fhem mal wieder geupdatet und habe nun das Problem, dass mein fhem crasht und ich es nur wieder zum Laufen bringe, indem ich den Raspi via ssh neu boote.

Im Log stehen dann eine Menge Meldungen die augenscheinlich mit dem Telebot zu tun haben:

2019.11.18 08:57:12 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2218.
2019.11.18 08:57:12 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2227.
2019.11.18 08:57:12 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2183.
2019.11.18 08:57:12 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2175.
2019.11.18 08:57:12 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2169.
2019.11.18 08:57:12 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2242.
2019.11.18 08:57:12 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2359.
2019.11.18 08:57:12 1: ERROR: empty name in readingsBeginUpdate
2019.11.18 08:57:12 1: stacktrace:
2019.11.18 08:57:12 1:     main::readingsBeginUpdate           called by ./FHEM/50_TelegramBot.pm (2397)
2019.11.18 08:57:12 1:     main::TelegramBot_Callback          called by FHEM/HttpUtils.pm (634)
2019.11.18 08:57:12 1:     main::__ANON__                      called by fhem.pl (751)
2019.11.18 08:57:12 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at fhem.pl line 4772.
2019.11.18 08:57:12 1: readingsUpdate(,sentMsgResult,SUCCESS) missed to call readingsBeginUpdate first.
2019.11.18 08:57:12 1: stacktrace:
2019.11.18 08:57:12 1:     main::readingsBulkUpdate            called by ./FHEM/50_TelegramBot.pm (2398)
2019.11.18 08:57:12 1:     main::TelegramBot_Callback          called by FHEM/HttpUtils.pm (634)
2019.11.18 08:57:12 1:     main::__ANON__                      called by fhem.pl (751)
2019.11.18 08:57:12 1: readingsUpdate(,sentMsgId,15881) missed to call readingsBeginUpdate first.
2019.11.18 08:57:12 1: stacktrace:
2019.11.18 08:57:12 1:     main::readingsBulkUpdate            called by ./FHEM/50_TelegramBot.pm (2399)
2019.11.18 08:57:12 1:     main::TelegramBot_Callback          called by FHEM/HttpUtils.pm (634)
2019.11.18 08:57:12 1:     main::__ANON__                      called by fhem.pl (751)
2019.11.18 08:57:12 1: readingsUpdate(,sentMsgPeerId,) missed to call readingsBeginUpdate first.
2019.11.18 08:57:12 1: stacktrace:
2019.11.18 08:57:12 1:     main::readingsBulkUpdate            called by ./FHEM/50_TelegramBot.pm (2400)
2019.11.18 08:57:12 1:     main::TelegramBot_Callback          called by FHEM/HttpUtils.pm (634)
2019.11.18 08:57:12 1:     main::__ANON__                      called by fhem.pl (751)
2019.11.18 08:57:12 1: PERL WARNING: Use of uninitialized value $d in hash element at fhem.pl line 4525.
2019.11.18 08:57:12 1: PERL WARNING: Use of uninitialized value $dev in hash element at fhem.pl line 3626.
Can't use an undefined value as an ARRAY reference at ./FHEM/50_TelegramBot.pm line 2403.
2019.11.18 10:32:24 1: reload: Error:Modul 99_myUtilsTemplate deactivated:


Kann der Maintainer von TelegramBot mal bitte schauen, was da los ist?

Vielen Dank vorab!

LG,
al
HM-Sen-DB-PCB, HM-Sec-SCo, HM-MOD-Re-8, HM-SEC-SC-2, HM-Sen-MDIR-O, HM-LC-Sw1PBU-FM, HM-LC-RGBW-WM, HM-ES-PMSw1-SM, HM-LC-Sw1-DR

dt2510

Ich hab' das gleiche Problem, bei mir geht allerdings noch ein

2019.11.16 23:56:35 1: PERL WARNING: Use of uninitialized value $ret in numeric le (<=) at FHEM/HttpUtils.pm line 646.

voraus

justcallmeal

...da ich ab heute Abend reisebedingt die nächsten 14 Tage unterwegs bin und mich nicht um fhem kümmern kann, hab ich das automatisierte fhem-Backup von gestern wieder reingefahren; - Otto's Blog und toller Beschreibung auf http://heinz-otto.blogspot.com/2015/12/backup-und-restore-von-fhem.html sei Dank!

Es wäre schön, wenn es bei meiner Rückkehr in 14 Tagen eine Lösung für das Problem gibt  :)

LG,
al
HM-Sen-DB-PCB, HM-Sec-SCo, HM-MOD-Re-8, HM-SEC-SC-2, HM-Sen-MDIR-O, HM-LC-Sw1PBU-FM, HM-LC-RGBW-WM, HM-ES-PMSw1-SM, HM-LC-Sw1-DR

DS_Starter

Hi al,

dann noch schnell die Frage was du genau mit Telegram versendest ?
Konnte das Problem auf einem System bei mir beim Versand von Aufnahmen nachstellen. Allerdings sind die Versionen von Telegram und (sscam bei mir) auf allen Systemen identisch. Doch nur ein System hat das Problem. Telegram ist auch schon recht alt und wurde nicht upgedated. Es muss also irgendwo "dazwischen".
Auf meiner Seite (sscam) schaue ich heute Abend.

Grüße,
Heiko
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

dt2510

Könnte es nicht an HttpUtils liegen ? Der Fehler geht bei mir immer voran ...

2019.11.16 23:56:35 3: D200 - Telegram message transaction "2202" successfully sent to "xxxxxxxxx" by "Telegram"
2019.11.16 23:56:35 1: PERL WARNING: Use of uninitialized value $ret in numeric le (<=) at FHEM/HttpUtils.pm line 646.
2019.11.16 23:56:35 3: D200 - Snapshot of Camera Eingang created. ID: 17
2019.11.16 23:56:35 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2218.


D200 ist ein SSCam Device

justcallmeal

#5
Zitat von: DS_Starter am 18 November 2019, 14:06:27
...dann noch schnell die Frage was du genau mit Telegram versendest ?

Hallo Heiko,

ich versende Fotos von meiner IP-Cam mit Deinem SSCAM-Modul :-)

LG,
al
HM-Sen-DB-PCB, HM-Sec-SCo, HM-MOD-Re-8, HM-SEC-SC-2, HM-Sen-MDIR-O, HM-LC-Sw1PBU-FM, HM-LC-RGBW-WM, HM-ES-PMSw1-SM, HM-LC-Sw1-DR

DS_Starter

Eher nicht, ist nur eine Warnung. Allerdings wahrscheinlich schon ein Hinweis auf einen fehlenden Wert. Der Absturz wird erst durch das Can't use an undefined value as an ARRAY reference at ./FHEM/50_TelegramBot.pm line 2403.
ausgelöst.

Danke al. Dann ist der Zusammenhang hergestellt, aber für mich noch nicht transparent. Ich schaue heute Abend.
Hat bisher ja auch einwandfrei funktioniert.

Lg,
Heiko
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

CoolTux

Eine zusätzliche Abfrage sollte hier Abhilfe schaffen

Zeile 2403
Aus
if ( scalar( @{ $hash->{sentQueue} } ) ) {
nach
if ( ref(@{ $hash->{sentQueue} }) eq 'ARRAY' and scalar( @{ $hash->{sentQueue} } ) ) {


Grüße
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

DS_Starter

Hast du sicherlich nicht unrecht. Frage ist nur wieso es jetzt plötzlich auftritt und bei mir zum Beispiel nur auf einem System wobei alle den gleichen Stand bezüglich telegram und sscam haben. Mysterium ...  ::)
Wie gesagt, ich schaue heute Abend. Telegram pflegt aber Viegener. Ich muss es in Sscam abfabgen wenn ich dahinter gestiegen bin.
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

DS_Starter

Achso .... das kuriose ist ja auch, dass die Snaps bzw. Aufnahmen trotzdem erfolgreich versendet werden (bei mir).
Bei euch ebenfalls ?
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

justcallmeal

Zitat von: DS_Starter am 18 November 2019, 14:47:24
Achso .... das kuriose ist ja auch, dass die Snaps bzw. Aufnahmen trotzdem erfolgreich versendet werden (bei mir).
Bei euch ebenfalls ?

...ja, bei mir auch!
HM-Sen-DB-PCB, HM-Sec-SCo, HM-MOD-Re-8, HM-SEC-SC-2, HM-Sen-MDIR-O, HM-LC-Sw1PBU-FM, HM-LC-RGBW-WM, HM-ES-PMSw1-SM, HM-LC-Sw1-DR

Happy Fhem User

Zitat von: CoolTux am 18 November 2019, 14:29:56
Eine zusätzliche Abfrage sollte hier Abhilfe schaffen

Zeile 2403
Aus
if ( scalar( @{ $hash->{sentQueue} } ) ) {
nach
if ( ref(@{ $hash->{sentQueue} }) eq 'ARRAY' and scalar( @{ $hash->{sentQueue} } ) ) {


Grüße
nenene, da wird ja wieder versucht ein Array zu machen. Da sollte wohl lieber heißen:
if ( ref( $hash->{sentQueue}) eq 'ARRAY' and scalar( @{ $hash->{sentQueue} } ) ) {

CoolTux

Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

DS_Starter

Hallo zusammen,

habe den Fehler gefunden und beseitigt.
Es war ein trivialer Kommentar, der eine Codezeile auskommentiert hatte zum Test.
Warum das allerdings auf meinem Prodsystem zu keinem Problem führte (auch dort war sie auskommentiert), hat sich mir bis jetzt nicht erschlossen.
Bis jetzt war es mir ja auf dem Testsystem auch nicht ausgefallen und auch dort war diese Version seit 04.11. im Einsatz.
Ich vermute ein Reihenfolgeproblem der Definition SSCam vs. TelegramBot.

Die Korrektur ist eingecheckt und morgen früh im Update.
Wer den Fehler sofort beseitigen möchte, kann die Korrektur aus meinem contrib laden. Bitte so komplett mit den Ausführungszeichen am Anfang und Ende eingeben:

"wget -qO ./FHEM/49_SSCam.pm https://svn.fhem.de/fhem/trunk/fhem/contrib/DS_Starter/49_SSCam.pm"

Grüße,
Heiko
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

dt2510

super ... probier' ich nachher gleich aus

dt2510

2019.11.19 11:26:16 3: D200 - Snapshot of Camera Eingang created. ID: 29
2019.11.19 11:26:17 3: D200 - Telegram message transaction "1258" successfully sent to "xxxxxxxxx" by "Telegram"
2019.11.19 11:26:17 1: PERL WARNING: Use of uninitialized value $ret in numeric le (<=) at FHEM/HttpUtils.pm line 646.


Sieht soweit gut aus - bis auf den HttpUtils Fehler, der immer noch mitkommt - FHEM läuft aber normal weiter.

DS_Starter

Ist kein Fehler, nur eine Warnung, aber auch kommt bei mir nicht.
Ich schaue nachher nochmal, aber bin mir unsicher ob das überhaupt aus diesem Kontext kommt.
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

dt2510

Zitat von: DS_Starter am 19 November 2019, 11:43:24
Ist kein Fehler, nur eine Warnung, aber auch kommt bei mir nicht.
Ich schaue nachher nochmal, aber bin mir unsicher ob das überhaupt aus diesem Kontext kommt.

War wohl nur Zufall, kommt nicht bei jedem Versand

DS_Starter

Diese Warnung kommt aus den Tiefen von HttpUtils:


my $ret = syswrite $hash->{conn}, $data;
      if($ret <= 0) {
.....


Vermutlich war die Verbindung bereits abgebaut, aber wenn man es genau wissen will , müsste sich Rudi das mal anschauen.

LG,
Heiko
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

DS_Starter

Nutzt du https ? Wenn ja, stell mal pribeweise um auf http und schau ob die warnung weiterhin erscheint.
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

shootingstar

Hallo in die Runde,
ich habe das Update heute eingespielt und erneut versucht einen Snapshot der Synology Cam mit dem Telegrambot zu versenden.
Bei mir crashed fhem weiterhin.
Gruß Andreas

DS_Starter

Hallo Andreas,

mehr Infos bitte. Logauszug der Absturzstelle, List vom Cam-Device.
Das übliche ...  :)

Grüße,
Heiko
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

shootingstar

Kein Problem.
Hier das fhem log nach dem Crash:


2019.11.19 12:03:14 3: SSCam.Tuer - Snapshot of Camera Tuer created. ID: 16
2019.11.19 12:03:15 3: SSCam.Tuer - Telegram message transaction "2902" successfully sent to "@andreasburkart" by "teleBot"
2019.11.19 12:03:17 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2218.
2019.11.19 12:03:17 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2227.
2019.11.19 12:03:17 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2183.
2019.11.19 12:03:17 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2169.
2019.11.19 12:03:17 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2175.
2019.11.19 12:03:17 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2242.
2019.11.19 12:03:17 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at ./FHEM/50_TelegramBot.pm line 2359.
2019.11.19 12:03:17 1: ERROR: empty name in readingsBeginUpdate
2019.11.19 12:03:17 1: stacktrace:
2019.11.19 12:03:17 1:     main::readingsBeginUpdate           called by ./FHEM/50_TelegramBot.pm (2397)
2019.11.19 12:03:17 1:     main::TelegramBot_Callback          called by FHEM/HttpUtils.pm (634)
2019.11.19 12:03:17 1:     main::__ANON__                      called by fhem.pl (751)
2019.11.19 12:03:17 1: PERL WARNING: Use of uninitialized value $name in concatenation (.) or string at fhem.pl line 4772.
2019.11.19 12:03:17 1: readingsUpdate(,sentMsgResult,SUCCESS) missed to call readingsBeginUpdate first.
2019.11.19 12:03:17 1: stacktrace:
2019.11.19 12:03:17 1:     main::readingsBulkUpdate            called by ./FHEM/50_TelegramBot.pm (2398)
2019.11.19 12:03:17 1:     main::TelegramBot_Callback          called by FHEM/HttpUtils.pm (634)
2019.11.19 12:03:17 1:     main::__ANON__                      called by fhem.pl (751)
2019.11.19 12:03:17 1: readingsUpdate(,sentMsgId,6398) missed to call readingsBeginUpdate first.
2019.11.19 12:03:17 1: stacktrace:
2019.11.19 12:03:17 1:     main::readingsBulkUpdate            called by ./FHEM/50_TelegramBot.pm (2399)
2019.11.19 12:03:17 1:     main::TelegramBot_Callback          called by FHEM/HttpUtils.pm (634)
2019.11.19 12:03:17 1:     main::__ANON__                      called by fhem.pl (751)
2019.11.19 12:03:17 1: readingsUpdate(,sentMsgPeerId,) missed to call readingsBeginUpdate first.
2019.11.19 12:03:17 1: stacktrace:
2019.11.19 12:03:17 1:     main::readingsBulkUpdate            called by ./FHEM/50_TelegramBot.pm (2400)
2019.11.19 12:03:17 1:     main::TelegramBot_Callback          called by FHEM/HttpUtils.pm (634)
2019.11.19 12:03:17 1:     main::__ANON__                      called by fhem.pl (751)
2019.11.19 12:03:17 1: PERL WARNING: Use of uninitialized value $d in hash element at fhem.pl line 4525.
2019.11.19 12:03:17 1: PERL WARNING: Use of uninitialized value $dev in hash element at fhem.pl line 3626.
Can't use an undefined value as an ARRAY reference at ./FHEM/50_TelegramBot.pm line 2403.


Hier das List der Cam:


Internals:
   CAMID      3
   CAMNAME    Tuer
   COMPATIBILITY 8.2.6
   CREDENTIALS Set
   DEF        Tuer 192.168.180.230 5000
   FUUID      5dbad3f5-f33f-89ec-6764-e88d109ffdcab8fa
   FVERSION   49_SSCam.pm:v9.0.4-s20534/2019-11-18
   MODEL      ONVIF - Generic_ONVIF_StreamingOnly
   NAME       SSCam.Tuer
   NR         373
   OPMODE     getStmUrlPath
   PROTOCOL   http
   SERVERADDR 192.168.180.230
   SERVERPORT 5000
   STATE      on
   TYPE       SSCam


Der Snapshot wird auch noch erfolgreich versendet, bevor fhem crashed.

Gruß Andreas

DS_Starter

#23
Jetzt wird es echt schwierig, kann es bei mir nicht mehr nachvollziehen.
Welche SSCam Version hattest du zuvor im Einsatz, mit er es bei dir funktioniert hat ?
Hast du Telegram erst später, also nach der Kameradefinition in dein FHEM integriert ?
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

shootingstar

Gute Nachrichten :)
Nach dem Reboot des Servers funktioniert es jetzt wieder

DS_Starter

 8) ... ich wollte schon (ver)zweifeln  :D

LG
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter