FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: bastelfeak am 23 Juni 2017, 22:30:52

Titel: FHEM startet nicht
Beitrag von: bastelfeak am 23 Juni 2017, 22:30:52
Hallo,
seit gestern Morgen ist mein FHEM nicht mehr erreichbar.
Der Pi ist erreichbar, aber leider lässt sich FHEM nicht starten.

Im Log ist folgendes zu finden:

2017.06.23 22:19:28 1: PERL WARNING: Use of uninitialized value $3 in concatenation (.) or string at fhem.pl line 2579.
2017.06.23 22:19:29 1: PERL WARNING: Smartmatch is experimental at ./FHEM/99_cleanUtils.pm line 25.
2017.06.23 22:19:29 1: PERL WARNING: Smartmatch is experimental at ./FHEM/99_cleanUtils.pm line 125.
2017.06.23 22:19:29 1: Including fhem.cfg
2017.06.23 22:19:29 1: PERL WARNING: Use of uninitialized value $1 in concatenation (.) or string at fhem.pl line 2579, <$fh> line 5.
2017.06.23 22:19:29 1: PERL WARNING: Use of uninitialized value $2 in concatenation (.) or string at fhem.pl line 2579, <$fh> line 5.
2017.06.23 22:19:29 1: PERL WARNING: Use of uninitialized value $3 in concatenation (.) or string at fhem.pl line 2579, <$fh> line 5.
2017.06.23 22:19:29 3: telnetPort: port 7072 opened
2017.06.23 22:19:29 3: WEB: port 8083 opened
2017.06.23 22:19:29 3: WEBphone: port 8084 opened
2017.06.23 22:19:29 3: WEBtablet: port 8085 opened
2017.06.23 22:19:30 2: eventTypes: loaded 3032 events from ./log/eventTypes.txt
2017.06.23 22:19:30 3: myHmUART device closed
2017.06.23 22:19:30 3: Opening myHmUART device /dev/ttyAMA0
2017.06.23 22:19:30 3: Setting myHmUART serial parameters to 115200,8,N,1
2017.06.23 22:19:30 3: myHmUART device opened
Undefined subroutine &main::RESIDENTStk_Define called at fhem.pl line 3412, <$fh> line 1008.


Ich bin leider nur mäßig bewandert im Umgang mit Linux und Fhem und sehr auf eure Hilfe angewiesen. Habt ihr eine Idee?

Viele Grüße
bastelf(r)eak
Titel: Antw:FHEM startet nicht
Beitrag von: amenomade am 23 Juni 2017, 22:57:11
Hast Du was geändert?
Titel: Antw:FHEM startet nicht
Beitrag von: bastelfeak am 23 Juni 2017, 23:10:59
Nein, leider nichts. Von einem Moment auf den anderen.
Titel: Antw:FHEM startet nicht
Beitrag von: amenomade am 23 Juni 2017, 23:21:47
Prüf mal die Berechtigungen im Verzeichnis /opt/fhem/FHEM, ob die alle auf fhem:dialout sind.
Insbesondere das Modul RESIDENT
Titel: Antw:FHEM startet nicht
Beitrag von: amenomade am 23 Juni 2017, 23:26:01
Und setze mal stacktrace auf 1, du wirst sehen welches Modul problematisch ist.
Titel: Antw:FHEM startet nicht
Beitrag von: bastelfeak am 23 Juni 2017, 23:54:49
Also Residents.pm gehört fhem und dialout an.

Im Log findet sich jetzt folgendes:


2017.06.23 23:52:23 1: PERL WARNING: Use of uninitialized value $3 in concatenation (.) or string at fhem.pl line 2579.
2017.06.23 23:52:24 1: PERL WARNING: Smartmatch is experimental at ./FHEM/99_cleanUtils.pm line 25.
2017.06.23 23:52:24 1: PERL WARNING: Smartmatch is experimental at ./FHEM/99_cleanUtils.pm line 125.
2017.06.23 23:52:24 1: Including fhem.cfg
2017.06.23 23:52:24 1: PERL WARNING: Use of uninitialized value $1 in concatenation (.) or string at fhem.pl line 2579, <$fh> line 5.
2017.06.23 23:52:24 1: stacktrace:
2017.06.23 23:52:24 1:     main::__ANON__                      called by fhem.pl (2579)
2017.06.23 23:52:24 1:     main::GlobalAttr                    called by fhem.pl (3412)
2017.06.23 23:52:24 1:     main::CallFn                        called by fhem.pl (2755)
2017.06.23 23:52:24 1:     main::CommandAttr                   called by fhem.pl (1157)
2017.06.23 23:52:24 1:     main::AnalyzeCommand                called by fhem.pl (1021)
2017.06.23 23:52:24 1:     main::AnalyzeCommandChain           called by fhem.pl (1292)
2017.06.23 23:52:24 1:     main::CommandInclude                called by fhem.pl (528)
2017.06.23 23:52:24 1: PERL WARNING: Use of uninitialized value $2 in concatenation (.) or string at fhem.pl line 2579, <$fh> line 5.
2017.06.23 23:52:24 1: stacktrace:
2017.06.23 23:52:24 1:     main::__ANON__                      called by fhem.pl (2579)
2017.06.23 23:52:24 1:     main::GlobalAttr                    called by fhem.pl (3412)
2017.06.23 23:52:24 1:     main::CallFn                        called by fhem.pl (2755)
2017.06.23 23:52:24 1:     main::CommandAttr                   called by fhem.pl (1157)
2017.06.23 23:52:24 1:     main::AnalyzeCommand                called by fhem.pl (1021)
2017.06.23 23:52:24 1:     main::AnalyzeCommandChain           called by fhem.pl (1292)
2017.06.23 23:52:24 1:     main::CommandInclude                called by fhem.pl (528)
2017.06.23 23:52:24 1: PERL WARNING: Use of uninitialized value $3 in concatenation (.) or string at fhem.pl line 2579, <$fh> line 5.
2017.06.23 23:52:24 1: stacktrace:
2017.06.23 23:52:24 1:     main::__ANON__                      called by fhem.pl (2579)
2017.06.23 23:52:24 1:     main::GlobalAttr                    called by fhem.pl (3412)
2017.06.23 23:52:24 1:     main::CallFn                        called by fhem.pl (2755)
2017.06.23 23:52:24 1:     main::CommandAttr                   called by fhem.pl (1157)
2017.06.23 23:52:24 1:     main::AnalyzeCommand                called by fhem.pl (1021)
2017.06.23 23:52:24 1:     main::AnalyzeCommandChain           called by fhem.pl (1292)
2017.06.23 23:52:24 1:     main::CommandInclude                called by fhem.pl (528)
2017.06.23 23:52:24 3: telnetPort: port 7072 opened
2017.06.23 23:52:24 3: WEB: port 8083 opened
2017.06.23 23:52:24 3: WEBphone: port 8084 opened
2017.06.23 23:52:24 3: WEBtablet: port 8085 opened
2017.06.23 23:52:25 2: eventTypes: loaded 3032 events from ./log/eventTypes.txt
2017.06.23 23:52:25 3: myHmUART device closed
2017.06.23 23:52:25 3: Opening myHmUART device /dev/ttyAMA0
2017.06.23 23:52:25 3: Setting myHmUART serial parameters to 115200,8,N,1
2017.06.23 23:52:25 3: myHmUART device opened
Undefined subroutine &main::RESIDENTStk_Define called at fhem.pl line 3412, <$fh> line 1009.
Titel: Antw:FHEM startet nicht
Beitrag von: amenomade am 24 Juni 2017, 00:03:24
Und RESIDENTStk.pm?
Titel: Antw:FHEM startet nicht
Beitrag von: bastelfeak am 24 Juni 2017, 08:46:04
Das passt auch. Leider läuft es immer noch nicht.
Titel: Antw:FHEM startet nicht
Beitrag von: amenomade am 24 Juni 2017, 10:45:49
Mach mal ein ls -laR /opt/fhem in einem Terminal
Titel: Antw:FHEM startet nicht
Beitrag von: bastelfeak am 24 Juni 2017, 22:07:08
Es gehört alles fhem:dialout.

Weil ich es auch bereits im Forum gefunden habe: Die SD Karte ist noch nicht voll beschrieben und hat noch 6,5GB freien Speicher.
Titel: Antw:FHEM startet nicht
Beitrag von: Otto123 am 24 Juni 2017, 22:27:10
Hi,

startet fhem den mit der Demo?
perl fhem.pl fhem.cfg.demo
ZitatPrerequisite:
  - perl
  - stop any existing FHEM process first (if started any).

HOWTO:
  Start FHEM with a demo configuration with
    perl fhem.pl fhem.cfg.demo
  (typed in a terminal) and point your browser to http://YourFhemHost:8083
  Use the startfhemDemo skript on the FritzBox.
  If you'd like to see the RSS demo, you have to install the Perl GD library,
  e.g. with:
    sudo apt-get install libgd-gd2-perl
    sudo apt-get install libgd-text-perl

Stopping:
  - type shutdown in the browser command window, followed by RETURN
  or
  - type CTRL-C in the terminal window

This demo:
- it won't overwrite any settings in the productive FHEM installation
- it uses its own log-directory (demolog) and configfile (fhem.cfg.demo)
- it won't start in the background, the FHEM-log is written to the terminal
- it won't touch any home-automation hardware (CUL, ZWawe dongle, etc) attached
  to the host.

Gruß Otto

Titel: Antw:FHEM startet nicht
Beitrag von: amenomade am 24 Juni 2017, 22:38:11
mit "ls -laR /opt/fhem" wollte ich nicht nur owner und group sehen, sondern auch die Timestamps der jeweiligen Dateien.
Titel: Antw:FHEM startet nicht
Beitrag von: bastelfeak am 25 Juni 2017, 10:21:09
Hallo,

also zum Thema demo: gleicher Fehler.

Starting fhem...
2017.06.25 10:15:02 1: PERL WARNING: Smartmatch is experimental at ./FHEM/99_cleanUtils.pm line 25.
2017.06.25 10:15:02 1: PERL WARNING: Smartmatch is experimental at ./FHEM/99_cleanUtils.pm line 125.
2017.06.25 10:15:02 1: Including fhem.cfg.demo
2017.06.25 10:15:02.143 3: telnetPort: port 7072 opened
2017.06.25 10:15:02.325 3: WEB: port 8083 opened
2017.06.25 10:15:02.329 3: WEBphone: port 8084 opened
2017.06.25 10:15:02.331 3: WEBtablet: port 8085 opened
2017.06.25 10:15:02.376 1: define Logfile FileLog ./log/fhem-%Y-%m.log fakelog: Can't open ./log/fhem-2017-06.log: Permission denied
2017.06.25 10:15:02.416 2: eventTypes: loaded 109 events from demolog/eventTypes.txt
2017.06.25 10:15:02.459 1: CUL_0 device is none, commands will be echoed only
Undefined subroutine &main::RESIDENTStk_Define called at fhem.pl line 3412, <$fh> line 204.



Ich poste mal die infrage kommenden Dateien:


-rwxrwxrwx  1 fhem dialout 134695 May 29 16:25 fhem.pl

-rw-rwxrw-   1 fhem dialout  71321 May 29 16:25 10_RESIDENTS.pm

-rw-rwxrw-   1 fhem dialout  67492 Apr  6 23:18 RESIDENTStk.pm
Titel: Antw:FHEM startet nicht
Beitrag von: KölnSolar am 25 Juni 2017, 10:58:01
Zitat-rw-rwxrw-   1 fhem dialout  67492 Apr  6 23:18 RESIDENTStk.pm
Warum auch immer ist meine jünger
Zitat# $Id: RESIDENTStk.pm 14160 2017-05-01 19:43:40Z loredo $
ein update kriegst Du ja nicht hin, mangels Start. Entweder händisch kopieren(Berechtigungen beachten) oder die fhem.cfg.demo um die RESIDENTS devices reduzieren, dann (hoffe ich) läuft FHEM (demo)und Du kannst das update ausführen. Danach dann Deine Inst. starten und  ? ? ?
Grüße Markus
Oder Du wartest noch etwas bis ein Vollprofi einen eleganteren Weg vorschlägt  ;)
Titel: Antw:FHEM startet nicht
Beitrag von: Otto123 am 25 Juni 2017, 12:00:41
Hi,

meine ist vor allem wesentlich größer:  :-[
-rw-r--r-- 1 fhem dialout 138443 Mai 13 19:18 RESIDENTStk.pm

Und mit einer quasi leeren cfg (https://svn.fhem.de/fhem/trunk/fhem/fhem.cfg) starten?

Gruß Otto
Titel: Antw:FHEM startet nicht
Beitrag von: DeeSPe am 25 Juni 2017, 12:05:12
Zitat von: bastelfeak am 25 Juni 2017, 10:21:09
Starting fhem...
2017.06.25 10:15:02 1: PERL WARNING: Smartmatch is experimental at ./FHEM/99_cleanUtils.pm line 25.
2017.06.25 10:15:02 1: PERL WARNING: Smartmatch is experimental at ./FHEM/99_cleanUtils.pm line 125.
2017.06.25 10:15:02 1: Including fhem.cfg.demo
2017.06.25 10:15:02.143 3: telnetPort: port 7072 opened
2017.06.25 10:15:02.325 3: WEB: port 8083 opened
2017.06.25 10:15:02.329 3: WEBphone: port 8084 opened
2017.06.25 10:15:02.331 3: WEBtablet: port 8085 opened
2017.06.25 10:15:02.376 1: define Logfile FileLog ./log/fhem-%Y-%m.log fakelog: Can't open ./log/fhem-2017-06.log: Permission denied
2017.06.25 10:15:02.416 2: eventTypes: loaded 109 events from demolog/eventTypes.txt
2017.06.25 10:15:02.459 1: CUL_0 device is none, commands will be echoed only
Undefined subroutine &main::RESIDENTStk_Define called at fhem.pl line 3412, <$fh> line 204.


Die angezeigten Fehler sollten mal primär angegangen werden.
2017.06.25 10:15:02 1: PERL WARNING: Smartmatch is experimental at ./FHEM/99_cleanUtils.pm line 25.
2017.06.25 10:15:02 1: PERL WARNING: Smartmatch is experimental at ./FHEM/99_cleanUtils.pm line 125.


und
2017.06.25 10:15:02.376 1: define Logfile FileLog ./log/fhem-%Y-%m.log fakelog: Can't open ./log/fhem-2017-06.log: Permission denied

Was ist diese "99_cleanUtils.pm" ?

Gruß
Dan
Titel: Antw:FHEM startet nicht
Beitrag von: bastelfeak am 25 Juni 2017, 21:27:32
Danke für die ganzen Hinweise und die ausführliche Hilfe.

Ich habe wie von @KölnSolar vorgeschlagen, die fhem.cfg.demo um die RESIDENT-Devices reduziert und dann gestartet. Anschließend das Update durchgeführt und über die Konsole neu gestartet.

Außerdem habe ich diese CleanUtils rausgeworfen, ich habe die irgendwann mal abgelegt, aber weiß nicht mehr so genau warum  :-[

Jetzt läuft es wieder!
Titel: Antw:FHEM startet nicht
Beitrag von: Otto123 am 25 Juni 2017, 21:42:26
Sorry, der von mir gepostete Link war alt und ich habe den nicht geprüft.  :-[

Ich habe es der vollständigkeithalber editiert und korrigiert  8)
Titel: Antw:FHEM startet nicht
Beitrag von: KölnSolar am 26 Juni 2017, 07:55:17
Schön, dass es wieder läuft. Ich würde jedoch gucken, was die Ursache war. Betrifft es mehrere Module, nur merkst Du es nicht, weil keine schwerwiegenden Fehler auftraten ? Dazu mal den Ordner restoreDir prüfen. Da gewinnst Du einige Erkenntnisse.
Wieso war das Modul veraltet ?
- Im device global das update mit excludefromupdate ausgeschlossen ?
- Doch manuell etwas gemacht ?
- Das letzte Update ist nicht komplett durchgelaufen ?
- Gar SD kaputt ?
.....
Titel: Antw:FHEM startet nicht
Beitrag von: bjoernbo am 21 Juli 2017, 19:37:16
ich habe selbige Problem:
Habe den Pi jetzt an den TV angeschlossen, da ich auch nicht via ssh drauf komme. Wenn ich FEHM starte
erhalte ich die Meldung
ZitatString found where operator expected at /usr/share/perl/5.20/warnings.pm line 129, near  "0"
und
ZitatBad name after 'o at /usr/share/oerl/5.20/warnings.pm line 135
ZitatCompilation failed in require at fhem.pm line 34

Seit heute morgen 10:21 habe ich das Problem. Habe kein Update etc. durchgeführt. Ich hatte aufeinmal nur DHCP aktiv und das ganz nun wieder angepasst. Was da genau passiert ist, weiß ich nicht
Titel: Antw:FHEM startet nicht
Beitrag von: bjoernbo am 21 Juli 2017, 19:44:26
 :-\ und jetzt gibt es eine andere Meldung : hänge ich als Foto mal bei ....

Titel: Antw:FHEM startet nicht
Beitrag von: Otto123 am 21 Juli 2017, 21:44:00
Hi,

da Du ja selbst sagst, selbiges Problem, da kannst Du ja auch direkt die schon gegeben Tipps in der Reihenfolge abarbeiten.

Gibt es da schon Ergebnisse?

Gruß Otto