FHEM - Hardware > Server - Linux
FHEM bleibt stehen
Muschelpuster:
Moin zusammen,
das Problem plagt mich schon länger. Da es aktuell massiv an der Zeit mangelt, habe ich das Problem bislang mit einem nächtlichen init 6 über cron umschifft. Doch jetzt hat es mich erwischt, FHEM hält keine 10 Minuten mehr durch. Nun ist mein Setup schon relativ komplex und ich habe nicht so die rechte Idee, wie ich jetzt das Thema eingrenze. Natürlich kann ich FHEM erst einmal mit einer Default-Konfig starten, das hatte ich vor einer Weile schon erfolgreich getestet. Aber wie nun weiter? Im fhem.log sind da schon einige Dinge zu sehen, aber was fange ich damit an?
--- Code: ---root@deb-srv:/opt/fhem/log# tail -f fhem-2022-11.log
2022.11.20 14:02:00 1: PERL WARNING: Use of uninitialized value $find in pattern match (m//) at /usr/lib/x86_64-linux-gnu/perl/5.24/Encode/Alias.pm line 31.
2022.11.20 14:02:00 1: PERL WARNING: Use of uninitialized value $find in lc at /usr/lib/x86_64-linux-gnu/perl/5.24/Encode/Alias.pm line 40.
2022.11.20 14:02:00 1: PERL WARNING: Use of uninitialized value $find in string eq at /usr/lib/x86_64-linux-gnu/perl/5.24/Encode/Alias.pm line 44.
2022.11.20 14:02:00 1: PERL WARNING: Use of uninitialized value $find in hash element at /usr/lib/x86_64-linux-gnu/perl/5.24/Encode/Alias.pm line 57.
2022.11.20 14:02:00 1: PERL WARNING: Use of uninitialized value $find in lc at /usr/lib/x86_64-linux-gnu/perl/5.24/Encode/Alias.pm line 58.
2022.11.20 14:02:00 1: PERL WARNING: Use of uninitialized value $find in hash element at /usr/lib/x86_64-linux-gnu/perl/5.24/Encode/Alias.pm line 77.
2022.11.20 14:02:00 1: PERL WARNING: Use of uninitialized value $name in string ne at /usr/lib/x86_64-linux-gnu/perl/5.24/Encode.pm line 114.
2022.11.20 14:02:00 1: PERL WARNING: Use of uninitialized value $name in hash element at /usr/lib/x86_64-linux-gnu/perl/5.24/Encode.pm line 118.
2022.11.20 14:02:00 1: PERL WARNING: Use of uninitialized value in substitution iterator at ./FHEM/98_JsonMod.pm line 878.
2022.11.20 14:04:08 2: AttrTemplates: got 252 entries
--- Ende Code ---
Das ist eigentlich alles vom Start, der Abflug könnte 14:04 sein, aber sicher bin ich mir da nicht.
FHEM-Restart geht übrigens auch nicht, dann heißt es, das Port 7072 noch in Benutzung ist - FHEM sich also irgendwo nich ganz beenden ließ. Da greift dann nur ein hilfloses init 6
Ok, mein Linux und damit auch mein mein Perl sind 'etwas' älter, könnte das schon das Problem sein?
--- Code: ---root@deb-srv:/opt/fhem/log# uname -a
Linux deb-srv 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux
root@deb-srv:/opt/fhem/log# perl -v
This is perl 5, version 24, subversion 1 (v5.24.1) built for x86_64-linux-gnu-thread-multi
(with 90 registered patches, see perl -V for more detail)
Copyright 1987-2017, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
--- Ende Code ---
Ich schreibe auf jeden Fall erst einmal eine Clonezilla-Stick, erstelle ein komplettes HD-Image und versuche mich dann mal in einem Dist-Upgrade.
Gerne nehme ich noch Anregungen an, wie ich weiter debuggen kann.
Niels
MadMax-FHEM:
Naja vor dem Dist-Upgrade (da werden ja verm. die Probleme erst mal nicht einfach verschwinden) würde ich erst mal herausfinden was los ist.
Das hier hast du durch?
https://wiki.fhem.de/wiki/FHEM_startet_nicht_-_Tipps_zur_Fehlersuche
https://wiki.fhem.de/wiki/Hilfe!_Mein_FHEM_funktioniert_nicht!
Und uname -a bringt nicht wirklich viel...
...es wäre interessant die Version zu kennen:
cat /etc/os-release
Die geposteten Logausschnitte bringen auch nicht viel: da wäre mehr besser...
...bzw. gibt es ja dazu den "Debug-Modus" (siehe Link).
EDIT: https://wiki.fhem.de/wiki/FHEM_startet_nicht_-_Tipps_zur_Fehlersuche#Fehlernachrichten_von_FHEM_bei_dessen_Start_analysieren
Vorher aber fhem stoppen, wenn es sein muss mit "Gewalt": kill...
Gruß, Joachim
Muschelpuster:
Danke Joachim,
Nummer 1 ist einfach ;-)
--- Code: ---root@deb-srv:/opt/fhem# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
--- Ende Code ---
Die Links habe ich nicht durchgearbeitet, erst einmal habe ich jetzt ein volles HD-Image, was auch schon wieder mehr Arbeit als angenommen macht, da auf meiner Zotabox das BIOS nicht startet. Aber das ist ein (hoffentlich) nachgelagertes Thema.
Bezüglich der Performance ist meine ZBOX in der Regel arg gelangweilt:
--- Code: ---top - 16:01:51 up 7 min, 1 user, load average: 0,00, 0,16, 0,13
Tasks: 107 total, 2 running, 105 sleeping, 0 stopped, 0 zombie
%Cpu(s): 4,0 us, 0,4 sy, 0,0 ni, 95,5 id, 0,0 wa, 0,0 hi, 0,1 si, 0,0 st
KiB Mem : 3957968 total, 2478484 free, 1135104 used, 344380 buff/cache
KiB Swap: 4101116 total, 4101116 free, 0 used. 2594724 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
762 fhem 20 0 274960 150656 10300 S 12,3 3,8 0:35.09 perl
497 unifi 20 0 4722076 665472 25728 S 2,0 16,8 2:13.57 java
395 mongodb 20 0 322484 59868 29176 S 1,0 1,5 0:04.89 mongod
809 unifi 20 0 370096 83828 33564 S 1,0 2,1 0:06.58 mongod
1463 root 20 0 42816 3648 3024 R 1,0 0,1 0:00.25 top
385 root 20 0 4290692 98524 18280 S 0,3 2,5 0:11.89 java
681 mysql 20 0 695004 102460 17000 S 0,3 2,6 0:01.98 mysqld
1 root 20 0 56996 6820 5292 S 0,0 0,2 0:01.72 systemd
2 root 20 0 0 0 0 S 0,0 0,0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0,0 0,0 0:00.00 ksoftirqd/0
5 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 kworker/0:0H
6 root 20 0 0 0 0 S 0,0 0,0 0:00.11 kworker/u8:0
7 root 20 0 0 0 0 R 0,0 0,0 0:00.34 rcu_sched
8 root 20 0 0 0 0 S 0,0 0,0 0:00.00 rcu_bh
9 root rt 0 0 0 0 S 0,0 0,0 0:00.00 migration/0
10 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 lru-add-drain
11 root rt 0 0 0 0 S 0,0 0,0 0:00.00 watchdog/0
12 root 20 0 0 0 0 S 0,0 0,0 0:00.00 cpuhp/0
13 root 20 0 0 0 0 S 0,0 0,0 0:00.00 cpuhp/1
14 root rt 0 0 0 0 S 0,0 0,0 0:00.00 watchdog/1
15 root rt 0 0 0 0 S 0,0 0,0 0:00.00 migration/1
16 root 20 0 0 0 0 S 0,0 0,0 0:00.00 ksoftirqd/1
--- Ende Code ---
Niels
Muschelpuster:
So, schon steht FHEM wieder und tatsächlich geht die CPU-Auslastung von FHEM gegen 100%:
--- Code: ---top - 16:09:07 up 14 min, 1 user, load average: 1,18, 0,72, 0,36
Tasks: 106 total, 2 running, 104 sleeping, 0 stopped, 0 zombie
%Cpu(s): 38,3 us, 0,9 sy, 0,0 ni, 60,5 id, 0,0 wa, 0,0 hi, 0,3 si, 0,0 st
KiB Mem : 3957968 total, 2359636 free, 1236928 used, 361404 buff/cache
KiB Swap: 4101116 total, 4101116 free, 0 used. 2492816 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
762 fhem 20 0 274960 150768 10300 R 99,7 3,8 3:46.37 perl
497 unifi 20 0 4739504 730928 25736 S 52,3 18,5 3:10.06 java
809 unifi 20 0 401844 121312 34108 S 2,0 3,1 0:11.92 mongod
395 mongodb 20 0 322484 59868 29176 S 1,0 1,5 0:09.06 mongod
385 root 20 0 4290692 108236 18280 S 0,7 2,7 0:17.66 java
1572 root 20 0 42816 3644 3024 R 0,7 0,1 0:00.82 top
681 mysql 20 0 695004 102776 17000 S 0,3 2,6 0:02.87 mysqld
1 root 20 0 56996 6820 5292 S 0,0 0,2 0:01.72 systemd
2 root 20 0 0 0 0 S 0,0 0,0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0,0 0,0 0:00.01 ksoftirqd/0
5 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 kworker/0:0H
7 root 20 0 0 0 0 S 0,0 0,0 0:00.63 rcu_sched
8 root 20 0 0 0 0 S 0,0 0,0 0:00.00 rcu_bh
9 root rt 0 0 0 0 S 0,0 0,0 0:00.00 migration/0
10 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 lru-add-drain
11 root rt 0 0 0 0 S 0,0 0,0 0:00.00 watchdog/0
12 root 20 0 0 0 0 S 0,0 0,0 0:00.00 cpuhp/0
13 root 20 0 0 0 0 S 0,0 0,0 0:00.00 cpuhp/1
14 root rt 0 0 0 0 S 0,0 0,0 0:00.00 watchdog/1
15 root rt 0 0 0 0 S 0,0 0,0 0:00.00 migration/1
--- Ende Code ---
Und so macht es auch etwas Sinn, dass FHEM nicht auf die Stoppaufforderung reagiert:
--- Code: ---root@deb-srv:/opt/fhem# systemctl stop fhem
root@deb-srv:/opt/fhem# ps ax | grep perl
762 ? R 6:39 perl fhem.pl configDB
1730 pts/0 S+ 0:00 grep perl
--- Ende Code ---
Selbst ein Kill bringt nichts:
--- Code: ---root@deb-srv:/opt/fhem# kill 762
root@deb-srv:/opt/fhem# ps ax | grep perl
762 ? R 8:43 perl fhem.pl configDB
1775 pts/0 S+ 0:00 grep perl
--- Ende Code ---
Niels
MadMax-FHEM:
Für systemctl brauchst du root Rechte: sudo
Ohne wird das nix...
Äh: eingelogged als root!!!?
Das ist (aus bestimmtem Grund) per default NICHT möglich!
Stretch: tja (über kurz oder lang: Update) Stretch, Buster, Bullseye...
kill: naja du misst schon "sagen" welches Kill...
kill -9 würde ich mal nehmen...
Wo bleiben Logausgaben?
Debug-Modus Ausgaben?
Gruß, Joachim
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln