[Gelöst] Forbidden command nach RasPi Stromausfall und FHEM Restore

Begonnen von Bracew, 17 Januar 2016, 07:56:22

Vorheriges Thema - Nächstes Thema

Bracew

Hallo,

meinem RasPi mit FHEM ist gestern abend der Strom ausgefallen. Ich habe die SD-Karte mit einem Backup vom Oktober 2015 neu beschrieben, den RasPi neu gestartet, "apt-get update" und "apt-get upgrade" ausgeführt. Auch in FHEM habe ich ein Update gemacht.

Nun läuft FHEM wieder, aber...
  ... bei Restart bekomme ich die Meldung: "Forbidden command shutdown."
  ... bei Update bekomme ich die Meldung: "Forbidden command update."
  ... bei Edit Files bekomme ich keine Meldung und kann nichts mehr bearbeiten
  ... bei Select Style und Event Monitor kommt auch keine Reaktion.

Ich habe nun die ganze Nacht dran gesessen, den RasPi wieder flott zu machen und würde mich über Hilfe freuen, wie ich FHEM wieder so hinbekomme, dass ich die Konfiguration wieder in FHEM in der WEB Instanz bearbeiten, Updaten und Neu starten kann.

Danke Bracew

Übrigens hatte und habe ich "attr WEB editConfig 1" schon in der fhem.cfg
FHEM auf Raspberry Pi
für z.B. Lichtsteuerung, Temperaturmessung, Balkonkraftwerk,
Öltankfüllstandsmessung und für Hühnerstall Hühnerklappe

franky08

Kontrollier mal ob fhem Schreibrechte hat und ob der Benutzer/Gruppe fhem/dialout ist. Sonst die Rechte und Benutzer/Gruppe neu setzen.

VG
Frank
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

Tom111

Zitat von: Bracew am 17 Januar 2016, 07:56:22
[...]Ich habe die SD-Karte mit einem Backup vom Oktober 2015 neu beschrieben[...]

Nur um sicher zu gehen; bei dem "Backup" handelt es sich um ein Image der Karte seinerzeit!?

Gruß
Tom
FHEM 5.9 auf Raspberry Pi - 3B+ - Stretch-5.10.88+ | CUL868 CC1101 - USB - Lite module - V3 FW 1.67
Fritz!Box 7490 OS 07.29 / Fritz!Dect200 / Fritz!Powerline 546E
FS20ST-4/ FS20 DI-5/ FS20LS/ FS20 PIRI-2-KU/ FS20 TFK/ FS20S4A/FS20 SU-3/FS20 S20-3
HMS100TF/FHT80TF-2/ASH2200/S300TH/MiLight-Bridge V

Bracew

Hallo,

also ich habe nun alle Ordner und Dateien, außer den Ordner certs, Rekursiv auf Gruppe: dialout und Eigentümer: fhem mit den Rechten 0775 gesetzt. Dannach "sudo /etc/init.d/fhem stop" und "sudo /etc/init.d/fhem start".
Verhalten ist unverändert.

Ja, das Backup war ein Image der Ursprungs SD-Karte mit Win32DiskImager, welches ich im Oktober auf eine 2. Karte geschrieben hatte und seit dem im Schrank verwahrt hatte. Die 2. Karte habe ich nun in den RasPi getan und wie beschrieben die Updates gemacht.
FHEM auf Raspberry Pi
für z.B. Lichtsteuerung, Temperaturmessung, Balkonkraftwerk,
Öltankfüllstandsmessung und für Hühnerstall Hühnerklappe

franky08

ZitatNun läuft FHEM wieder, aber...

wenn´s kein Image wäre, würde fhem sicher auch nicht starten  ;)
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

franky08

Was passiert wenn du den Host komplett neu durchstartest?

Poste mal den Log vom Neustart
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

Bracew

meinst Du einen "sudo reboot"?

Welches Log benötigst Du?
FHEM auf Raspberry Pi
für z.B. Lichtsteuerung, Temperaturmessung, Balkonkraftwerk,
Öltankfüllstandsmessung und für Hühnerstall Hühnerklappe

franky08

Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

franky08

Falls das nicht einzugrenzen sein sollte, bist du wahrscheinlich schneller in dem du eine Karte mit einem neuen Image beschreibst und deine, vorher gesicherten Dateien, zurück kopierst (fhem.cfg, eigene gplots, 99_myUtils usw.)
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

Bracew

OK, "sudo reboot" ist fertig und das fhem-Log (Auszug seit reboot) ist:
Zitat

2016.01.17 10:10:54 0: Server shutdown
2016.01.17 10:11:08 1: Including fhem.cfg
2016.01.17 10:11:08 3: telnetPort: port 7072 opened
2016.01.17 10:11:08 3: telnetPort: creating device allowed_telnetPort for attribute globalpassword
2016.01.17 10:11:09 3: WEB: port 8083 opened
2016.01.17 10:11:09 3: WEB: creating device allowed_WEB for attribute basicAuth
2016.01.17 10:11:10 3: WEBphone: port 8084 opened
2016.01.17 10:11:10 3: WEBphone: creating device allowed_WEBphone for attribute basicAuth
2016.01.17 10:11:10 3: WEBtablet: port 8085 opened
2016.01.17 10:11:10 3: WEBtablet: creating device allowed_WEBtablet for attribute basicAuth
2016.01.17 10:11:10 3: WEBtv: port 8086 opened
2016.01.17 10:11:10 2: eventTypes: loaded 244 events from ./log/eventTypes.txt
2016.01.17 10:11:13 3: [STV] You are using a deprecated MAC detection mechanism using ifconfig.
2016.01.17 10:11:13 3: [STV] Please install Pearl Modules libnet-address-ip-local-perl and libio-interface-perl
2016.01.17 10:11:17 1: Including ./log/fhem.save
2016.01.17 10:11:18 1: configfile: telnetPort: creating device allowed_telnetPort for attribute globalpassword
WEB: creating device allowed_WEB for attribute basicAuth
WEBphone: creating device allowed_WEBphone for attribute basicAuth
WEBtablet: creating device allowed_WEBtablet for attribute basicAuthstatefile: Please define admin first
Please define admin first
Please define allowedTelnet first
Please define allowedTelnet first
Please define allowedWEB first
Please define allowedWEB first
2016.01.17 10:11:18 1: usb create starting
2016.01.17 10:11:20 3: Probing CUL device /dev/ttyAMA0
2016.01.17 10:11:20 3: Probing TCM_ESP3 device /dev/ttyAMA0
2016.01.17 10:11:21 3: Probing FRM device /dev/ttyAMA0
2016.01.17 10:11:26 1: usb create end
2016.01.17 10:11:26 2: Error messages while initializing FHEM: configfile: telnetPort: creating device allowed_telnetPort for attribute globalpassword WEB: creating device allowed_WEB for attribute basicAuth WEBphone: creating device allowed_WEBphone for attribute basicAuth WEBtablet: creating device allowed_WEBtablet for attribute basicAuthstatefile: Please define admin first Please define admin first Please define allowedTelnet first Please define allowedTelnet first Please define allowedWEB first Please define allowedWEB first
2016.01.17 10:11:26 0: Featurelevel: 5.7
2016.01.17 10:11:26 0: Server started with 87 defined entities (fhem.pl:10510/2016-01-15 perl:5.014002 os:linux user:fhem pid:1991)
FHEM auf Raspberry Pi
für z.B. Lichtsteuerung, Temperaturmessung, Balkonkraftwerk,
Öltankfüllstandsmessung und für Hühnerstall Hühnerklappe

franky08

#10
Jetzt hat er die allowed devices angelegt, mach ein save und nochmals, diesmal fhem shutdown restart, nochmal den Log posten, bitte in code tags

und
Please install Pearl Modules libnet-address-ip-local-perl and libio-interface-perl

Pearl das ist ein Versandhandel, oder ?? Da müsste Perl stehen  ;)
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

Bracew

Also: "...ein save und nochmals, diesmal fhem shutdown restart..." gemacht:

Log:
Zitat
2016.01.17 10:25:21 0: Server shutdown
2016.01.17 10:25:25 1: Including fhem.cfg
2016.01.17 10:25:25 3: telnetPort: port 7072 opened
2016.01.17 10:25:26 3: WEB: port 8083 opened
2016.01.17 10:25:26 3: WEBphone: port 8084 opened
2016.01.17 10:25:26 3: WEBtablet: port 8085 opened
2016.01.17 10:25:26 3: WEBtv: port 8086 opened
2016.01.17 10:25:26 2: eventTypes: loaded 244 events from ./log/eventTypes.txt
2016.01.17 10:25:28 3: [STV] You are using a deprecated MAC detection mechanism using ifconfig.
2016.01.17 10:25:28 3: [STV] Please install Pearl Modules libnet-address-ip-local-perl and libio-interface-perl
2016.01.17 10:25:30 1: Including ./log/fhem.save
2016.01.17 10:25:30 1: usb create starting
2016.01.17 10:25:31 3: Probing CUL device /dev/ttyAMA0
2016.01.17 10:25:31 3: Probing TCM_ESP3 device /dev/ttyAMA0
2016.01.17 10:25:31 3: Probing FRM device /dev/ttyAMA0
2016.01.17 10:25:37 1: usb create end
2016.01.17 10:25:37 2: SecurityCheck:  WEBtv has no associated allowed device with basicAuth.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2016.01.17 10:25:37 0: Featurelevel: 5.7
2016.01.17 10:25:37 0: Server started with 87 defined entities (fhem.pl:10510/2016-01-15 perl:5.014002 os:linux user:fhem pid:3707)

Was meinst Du mit "...bitte in code tags"?
Es steht wirklich dort "Pearl", aber wie kann ich die Perl-Module installieren?
FHEM auf Raspberry Pi
für z.B. Lichtsteuerung, Temperaturmessung, Balkonkraftwerk,
Öltankfüllstandsmessung und für Hühnerstall Hühnerklappe

franky08

sudo apt-get install libnet-address-ip-local-perl && sudo apt-get install libio-interface-perl

Code Tags da hast du beim schreiben oben in der Leiste den # Button
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

Bracew

#13
Ich habe "sudo apt-get install libnet-address-ip-local-perl && sudo apt-get install libio-interface-perl" ausgeführt.

Das Log ist nun:
Zitat
2016.01.17 10:41:10 0: Server shutdown
2016.01.17 10:41:14 1: Including fhem.cfg
2016.01.17 10:41:14 3: telnetPort: port 7072 opened
2016.01.17 10:41:15 3: WEB: port 8083 opened
2016.01.17 10:41:15 3: WEBphone: port 8084 opened
2016.01.17 10:41:15 3: WEBtablet: port 8085 opened
2016.01.17 10:41:15 3: WEBtv: port 8086 opened
2016.01.17 10:41:15 2: eventTypes: loaded 244 events from ./log/eventTypes.txt
2016.01.17 10:41:17 3: [STV] defined with host: 192.168.0.102 port: 55000 MAC: b8:27:eb:b8:53:34
2016.01.17 10:41:19 1: Including ./log/fhem.save
2016.01.17 10:41:19 1: usb create starting
2016.01.17 10:41:20 3: Probing CUL device /dev/ttyAMA0
2016.01.17 10:41:21 3: Probing TCM_ESP3 device /dev/ttyAMA0
2016.01.17 10:41:21 3: Probing FRM device /dev/ttyAMA0

Den "# Button" habe ich nicht gefunden, wo muss ich den suchen? Im Browser-Menü oder im FHEM innerhalb des Browsers?
Ich habe den Log-Auszug mit WinSCP aus der /opt/fhem/log/fhem-2016-01.log Datei kopiert, meinst Du dort einen # Button?

FHEM sagt beim starten:
ZitatSecurityCheck:

WEBtv has no associated allowed device with basicAuth.
WEBtv soll auch ohne Passwort abfrage vom Fernseher mit eingeschrängtem Zugriff (ohne Edit, etc) aus funktioniert.


Nun geht auch der Zugriff auf Restart, Update, Edit Files.... wieder.
Ich bin sehr froh!!! Vielen Dank schon einmal dafür!!!
FHEM auf Raspberry Pi
für z.B. Lichtsteuerung, Temperaturmessung, Balkonkraftwerk,
Öltankfüllstandsmessung und für Hühnerstall Hühnerklappe

franky08

WEBtv has no associated allowed device with basicAuth.

Du kannst für die WEBtv Instanz noch ein Passwort vergeben, must du aber nicht

Der # Button, Code Tag
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1