XML::Simple lässt sich nicht installieren

Begonnen von Diamond_72, 08 März 2019, 10:17:49

Vorheriges Thema - Nächstes Thema

Diamond_72

Hallo zusammen,

ich habe nun den Pi und die SD Karte gecheckt. Beide haben kein defekt. Ich vermute einfach, dass das Dateisystem durch mehrfachem hard rebooten auf der Karte defekt war.
Nun gut, ich habe mir die Zeit genommen die Karte nochmal neu zu bespielen. Auf der Karte ist nun ein sauberes FHEM System mit dem neusten Raspbian Stretch installiert. Die Installation habe ich nach Ottos Anleitung auf seinem Blog vorgenommen. Nun habe ich das FHEM Verzeichnis /opt/fhem aus einem Backup von mir zurückgespielt, welches ist vor kurzem von der Karte gemacht hatte. Leider lässt sich danach der FHEM Dienst nicht starten.

Ein "sudo systemctl status fhem.service" spuckt mir folgendes aus:

Job for fhem.service failed because the control process exited with error code.
See "systemctl status fhem.service" and "journalctl -xe" for details.
root@FHEM:/opt/fhem/log# ^C
root@FHEM:/opt/fhem/log# systemctl status fhem.service
â fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2019-03-25 13:49:37 GMT; 3min 35s ago
  Process: 1017 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=13)

Mär 25 13:49:37 FHEM systemd[1]: Failed to start FHEM Home Automation.
Mär 25 13:49:37 FHEM systemd[1]: fhem.service: Unit entered failed state.
Mär 25 13:49:37 FHEM systemd[1]: fhem.service: Failed with result 'exit-code'.
Mär 25 13:49:37 FHEM systemd[1]: fhem.service: Service hold-off time over, scheduling restart.
Mär 25 13:49:37 FHEM systemd[1]: Stopped FHEM Home Automation.
Mär 25 13:49:37 FHEM systemd[1]: fhem.service: Start request repeated too quickly.
Mär 25 13:49:37 FHEM systemd[1]: Failed to start FHEM Home Automation.
Mär 25 13:49:37 FHEM systemd[1]: fhem.service: Unit entered failed state.
Mär 25 13:49:37 FHEM systemd[1]: fhem.service: Failed with result 'exit-code'.


Kann mir bitte jemand weiterhelfen?
Pi2 + HM-MOD-RPI-PCB, 6x HM-TC-IT-WM-W-EU, 2x HM-LC-SW4-DR

Esjay

Hat sich denn das "saubere" Fhem starten lassen? Sprich vor dem Einspielen deines Backups?
Editierst du die Config von fhem per Hand?
Ansonsten für ein sauberes Fhem sorgen, danach die alte Config Stück für Stück übertragen. Am Besten über den RAW- Befehl.

Was sagt denn dein Log-File? Darauf müsstest du ja Zugriff habe.

Grüße

Diamond_72

#17
Ja, mein sauberes FHEM ließ sich starten. Ich editiere eigentlich nichts direkt in der config.
Das hört sich ja sehr aufwendig an.

Hier das log:

2019.03.25 09:04:25 1: Including fhem.cfg
2019.03.25 09:04:25 3: telnetPort: port 7072 opened
2019.03.25 09:04:26 3: WEB: port 8083 opened
2019.03.25 09:04:26 3: WEBphone: port 8084 opened
2019.03.25 09:04:26 3: WEBtablet: port 8085 opened
2019.03.25 09:04:26 2: eventTypes: loaded 0 events from ./log/eventTypes.txt
2019.03.25 09:04:26 1: usb create starting
2019.03.25 09:04:26 3: Probing CUL device /dev/ttyAMA0
2019.03.25 09:04:26 3: Probing TCM_ESP3 device /dev/ttyAMA0
2019.03.25 09:04:27 3: Probing FRM device /dev/ttyAMA0
2019.03.25 09:04:32 1: usb create end
2019.03.25 09:04:32 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth. telnetPort has no associated allowed device with password/globalpassword.  Restart FHEM for a new check if the problem is fix$
2019.03.25 09:04:32 0: Featurelevel: 5.8
2019.03.25 09:04:32 0: Server started with 9 defined entities (fhem.pl:13447/2017-02-19 perl:5.024001 os:linux user:fhem pid:21582)
2019.03.25 09:04:52 0: Server shutdown
2019.03.25 09:05:08 1: Including fhem.cfg
2019.03.25 09:05:08 3: WEB: port 8083 opened
2019.03.25 09:05:08 2: eventTypes: loaded 0 events from ./log/eventTypes.txt
2019.03.25 09:05:08 1: Including ./log/fhem.save
2019.03.25 09:05:08 1: usb create starting
2019.03.25 09:05:09 3: Probing ZWDongle device /dev/serial0
2019.03.25 09:05:09 3: Probing ZWDongle device /dev/serial1
2019.03.25 09:05:09 3: Probing CUL device /dev/ttyAMA0
2019.03.25 09:05:09 3: Probing TCM_ESP3 device /dev/ttyAMA0
2019.03.25 09:05:10 3: Probing ZWDongle device /dev/ttyAMA0
2019.03.25 09:05:10 3: Probing SIGNALDuino device /dev/ttyAMA0
2019.03.25 09:05:10 3: Probing MYSENSORS device /dev/ttyAMA0
2019.03.25 09:05:10 3: Probing ArduCounter device /dev/ttyAMA0
2019.03.25 09:05:10 3: Probing FRM device /dev/ttyAMA0
2019.03.25 09:05:16 3: Probing CUL device /dev/ttyS0
2019.03.25 09:05:16 1: usb create end
2019.03.25 09:05:16 0: Featurelevel: 5.9
2019.03.25 09:05:16 0: Server started with 6 defined entities (fhem.pl:19006/2019-03-23 perl:5.024001 os:linux user:fhem pid:21963)
2019.03.25 09:10:24 0: Server shutdown
2019.03.25 09:10:48 1: Including fhem.cfg
2019.03.25 09:10:49 3: WEB: port 8083 opened
2019.03.25 09:10:49 2: eventTypes: loaded 0 events from ./log/eventTypes.txt
2019.03.25 09:10:50 1: Including ./log/fhem.save
2019.03.25 09:10:50 0: Featurelevel: 5.9
2019.03.25 09:10:50 0: Server started with 6 defined entities (fhem.pl:19006/2019-03-23 perl:5.024001 os:linux user:fhem pid:511)
2019.03.25 09:39:52 0: Server shutdown

Pi2 + HM-MOD-RPI-PCB, 6x HM-TC-IT-WM-W-EU, 2x HM-LC-SW4-DR

Otto123

Hi,

was sagen die Berechtigungen? Wie hast Du denn das Backup zurückgespielt? War das ein tar File von FHEM erzeugt oder eine anderweitige Kopie?
ls -lha /opt/fhem/

Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Diamond_72

#19
Zitat von: Otto123 am 25 März 2019, 15:22:54
Hi,

was sagen die Berechtigungen? Wie hast Du denn das Backup zurückgespielt? War das ein tar File von FHEM erzeugt oder eine anderweitige Kopie?
ls -lha /opt/fhem/

Gruß Otto

War eine tar von FHEM erzeugt. Hier die Permissions:

drwxr-xr-x 12 root root    4,0K Mär 25 14:20 .
drwxr-xr-x  5 root root    4,0K Mär 25 13:36 ..
drwx--x--x  2 fhem dialout 4,0K Okt 30 09:07 certs
-rwxrwxrwx  1 fhem dialout 273K Feb 15 09:45 CHANGED
-rwxrwxrwx  1 fhem dialout  39K Feb 15 09:45 configDB.pm
drwxrwxrwx 46 fhem dialout 4,0K Jul 17  2017 contrib
drwxrwxrwx  3 fhem dialout 4,0K Jul 17  2017 demolog
drwxrwxrwx  4 fhem dialout 4,0K Jul 17  2017 docs
drwxrwxrwx  6 fhem dialout  20K Feb 15 09:45 FHEM
-rwxrwxrwx  1 fhem dialout  27K Feb 15 22:45 fhem.cfg
-rwxrwxrwx  1 fhem dialout  20K Feb 15 09:45 fhem.cfg.demo
-rwxrwxrwx  1 fhem dialout 153K Feb 15 09:45 fhem.pl
drwxrwxrwx  2 fhem dialout 4,0K Mär 25 14:17 log
-rwxrwxrwx  1 fhem dialout  39K Feb 15 09:45 MAINTAINER.txt
drwxr-xr-x  2 fhem dialout 4,0K Mai 11  2018 ownscripts
-rwxrwxrwx  1 fhem dialout  935 Feb 19  2017 README_DEMO.txt
drwxrwxrwx  7 fhem dialout 4,0K Mai  9  2018 restoreDir
drwxrwxrwx  2 fhem dialout 4,0K Jul 17  2017 unused
drwxrwxrwx  9 fhem dialout 4,0K Jul 27  2017 www


Zurückspielung:

ich habe das saubere fhem Verzeichnis umbenannt und ein neues fhem Verzeichnis angelegt. Danach die tar dahin entpackt.
Pi2 + HM-MOD-RPI-PCB, 6x HM-TC-IT-WM-W-EU, 2x HM-LC-SW4-DR

Otto123

dann mach mal sudo chown fhem: /opt/fhemOb es das Problem löst weiß ich nicht.
Aber normalerweise muss es so sein: /opt/fhem gehört nicht root sondern fhem
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Diamond_72

Habe ich ausprobiert, leider lässt sich der Dienst weiterhin nicht starten.

Ich habe das Gefühl, dass er nach dem Starten des Dienstes keinen richtigen Eintrag in die FHEM log macht, als würde er gar nichts machen...

2019.03.25 09:04:25 1: Including fhem.cfg
2019.03.25 09:04:25 3: telnetPort: port 7072 opened
2019.03.25 09:04:26 3: WEB: port 8083 opened
2019.03.25 09:04:26 3: WEBphone: port 8084 opened
2019.03.25 09:04:26 3: WEBtablet: port 8085 opened
2019.03.25 09:04:26 2: eventTypes: loaded 0 events from ./log/eventTypes.txt
2019.03.25 09:04:26 1: usb create starting
2019.03.25 09:04:26 3: Probing CUL device /dev/ttyAMA0
2019.03.25 09:04:26 3: Probing TCM_ESP3 device /dev/ttyAMA0
2019.03.25 09:04:27 3: Probing FRM device /dev/ttyAMA0
2019.03.25 09:04:32 1: usb create end
2019.03.25 09:04:32 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth. telnetPort has no associated allowed device with password/globalpassword.  Restart FHEM for a new check if the problem is fix$
2019.03.25 09:04:32 0: Featurelevel: 5.8
2019.03.25 09:04:32 0: Server started with 9 defined entities (fhem.pl:13447/2017-02-19 perl:5.024001 os:linux user:fhem pid:21582)
2019.03.25 09:04:52 0: Server shutdown
2019.03.25 09:05:08 1: Including fhem.cfg
2019.03.25 09:05:08 3: WEB: port 8083 opened
2019.03.25 09:05:08 2: eventTypes: loaded 0 events from ./log/eventTypes.txt
2019.03.25 09:05:08 1: Including ./log/fhem.save
2019.03.25 09:05:08 1: usb create starting
2019.03.25 09:05:09 3: Probing ZWDongle device /dev/serial0
2019.03.25 09:05:09 3: Probing ZWDongle device /dev/serial1
2019.03.25 09:05:09 3: Probing CUL device /dev/ttyAMA0
2019.03.25 09:05:09 3: Probing TCM_ESP3 device /dev/ttyAMA0
2019.03.25 09:05:10 3: Probing ZWDongle device /dev/ttyAMA0
2019.03.25 09:05:10 3: Probing SIGNALDuino device /dev/ttyAMA0
2019.03.25 09:05:10 3: Probing MYSENSORS device /dev/ttyAMA0
2019.03.25 09:05:10 3: Probing ArduCounter device /dev/ttyAMA0
2019.03.25 09:05:10 3: Probing FRM device /dev/ttyAMA0
2019.03.25 09:05:16 3: Probing CUL device /dev/ttyS0
2019.03.25 09:05:16 1: usb create end
2019.03.25 09:05:16 0: Featurelevel: 5.9
2019.03.25 09:05:16 0: Server started with 6 defined entities (fhem.pl:19006/2019-03-23 perl:5.024001 os:linux user:fhem pid:21963)
2019.03.25 09:10:24 0: Server shutdown
2019.03.25 09:10:48 1: Including fhem.cfg
2019.03.25 09:10:49 3: WEB: port 8083 opened
2019.03.25 09:10:49 2: eventTypes: loaded 0 events from ./log/eventTypes.txt
2019.03.25 09:10:50 1: Including ./log/fhem.save
2019.03.25 09:10:50 0: Featurelevel: 5.9
2019.03.25 09:10:50 0: Server started with 6 defined entities (fhem.pl:19006/2019-03-23 perl:5.024001 os:linux user:fhem pid:511)
2019.03.25 09:39:52 0: Server shutdown

Pi2 + HM-MOD-RPI-PCB, 6x HM-TC-IT-WM-W-EU, 2x HM-LC-SW4-DR

Otto123

Ich hätte das mit dem Umbenennen des Verzeichnisses nicht gemacht. Wozu? Ne leere cfg oder die demo.cfg hast Du jederzeit...
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Wernieman

2019.03.25 09:10:50 0: Server started with 6 defined entities (fhem.pl:19006/2019-03-23 perl:5.024001 os:linux user:fhem pid:511)
2019.03.25 09:39:52 0: Server shutdown


Der Server beendet sich selber ... lösche (oder umbenenne) mal das "statefile"
rm /opt/fhem/log/fhem.save

Ansonsten hilft nur noch, fhem mal wirklich manuell zu starten ....
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

Diamond_72

Yes, es geht. Also eine fhem.save gab es im Verzeichnis. Ich habe aber nun folgendes gemacht:
Clean Verzeichnis wieder in fhem umbenannt und die tar einfach in das Verzeichnis entpackt und alles ersetzen lassen.
Danach noch ein chown fhem: /opt/fhem und sudo systemctl start fhem.

Das wars es geht!
Danke!
Pi2 + HM-MOD-RPI-PCB, 6x HM-TC-IT-WM-W-EU, 2x HM-LC-SW4-DR

Diamond_72

#25
Vielleicht noch eine Sache, leider gehen die Seiten Everything und Unsorted nicht. Beim Öffnen, öffnet sich leider nur der HTML Code der Seite.

Hat jemand eine Idee warum?
Pi2 + HM-MOD-RPI-PCB, 6x HM-TC-IT-WM-W-EU, 2x HM-LC-SW4-DR