configdb in "rescue" mode

Begonnen von amenomade, 01 Juli 2020, 11:34:30

Vorheriges Thema - Nächstes Thema

amenomade

Ich wollte mal fhem mit configdb im "rescue" Modus starten (da ich eine in der Db gespeicherte Datei exportieren wollte - Grund ist, meine SD-Karte hat eine Macke). Fhem ist aber damit nicht erreichbar.

Ich habe meine configDB.conf Datei mit entspr. "rescue => "1"," ergänzt und fhem mit "perl fhem.pl configDB" gestartet.

configDB.conf:
%dbconfig= (
connection => "SQLite:dbname=/opt/fhem/configDB.db",
user => "",
password => "",
rescue => "1"
);


Ausgabe in debug Modus (-d):
pi@raspberrypi:/opt/fhem $ perl fhem.pl -d configDB
2020.07.01 11:18:33 5: Cmd: >attr global userattr ASC:0,1,2 alexaName alexaRoom cmdIcon devStateIcon devStateIcon:textField-long devStateStyle genericDeviceType:security,ignore,switch,outlet,light,blind,thermometer,thermostat,contact,garage,window,lock homebridgeMapping:textField-long icon sortby webCmd webCmdLabel:textField-long widgetOverride<
2020.07.01 11:18:33 5: Cmd: >attr global autoload_undefined_devices 1<
2020.07.01 11:18:33 5: Cmd: >attr global autosave 0<
2020.07.01 11:18:33 5: Cmd: >attr global backupdir /net/backup<
2020.07.01 11:18:33 5: Cmd: >attr global dnsServer 192.168.178.1<
2020.07.01 11:18:33 5: Cmd: >attr global holiday2we he<
2020.07.01 11:18:33 5: Cmd: >attr global logfile ./log/fhem-%Y-%m-%d.log<
2020.07.01 11:18:33 5: Cmd: >attr global modpath .<
2020.07.01 11:18:33 5: Loading ./FHEM/99_SUNRISE_EL.pm
2020.07.01 11:18:33 5: Loading ./FHEM/99_Utils.pm
2020.07.01 11:18:33 5: Loading ./FHEM/99_myUtils.pm
2020.07.01 11:18:33 5: Cmd: >attr global motd SecurityCheck:\  WEBshow is not password protected\  TELNET is not password protected\  WEBtab is not password protected\\Protect this FHEM installation by configuring the allowed device allowed_WEB\You can disable this message with attr global motd none<
2020.07.01 11:18:33 5: Cmd: >attr global nofork 1<
2020.07.01 11:18:33 5: Cmd: >attr global showInternalValues 1<
2020.07.01 11:18:33 5: Cmd: >attr global sslVersion TLSv12:!SSLv3<
2020.07.01 11:18:33 5: Cmd: >attr global stacktrace 0<
2020.07.01 11:18:33 5: Cmd: >attr global statefile ./log/fhem.save<
2020.07.01 11:18:33 5: Cmd: >attr global updateInBackground 1<
2020.07.01 11:18:33 5: Cmd: >attr global verbose 1<
2020.07.01 11:18:33 5: Cmd: >attr global widgetOverride column:textFieldNL-long<
2020.07.01 11:18:33 5: Initializing Type Library:
2020.07.01 11:18:33 0: configDB starting in rescue mode!
2020.07.01 11:18:33 5: Cmd: >attr global modpath .<
2020.07.01 11:18:33 5: Cmd: >attr global verbose 3<
2020.07.01 11:18:33 5: Cmd: >define telnetPort telnet 7072 global<
2020.07.01 11:18:33 5: Loading ./FHEM/98_telnet.pm
2020.07.01 11:18:33 4: configDB reading file: ./FHEM/FhemUtils/uniqueID
2020.07.01 11:18:33 3: telnetPort: port 7072 opened
2020.07.01 11:18:33 5: Cmd: >define web FHEMWEB 8083 global<
2020.07.01 11:18:33 5: Loading ./FHEM/01_FHEMWEB.pm
2020.07.01 11:18:33 4: configDB reading file: ./FHEM/FhemUtils/uniqueID
2020.07.01 11:18:33 3: web: port 8083 opened
2020.07.01 11:18:33 5: Cmd: >attr web allowfrom .*<
2020.07.01 11:18:33 5: Cmd: >define Logfile FileLog ./log/fhem-%Y-%m-%d.log fakelog<
2020.07.01 11:18:33 5: Loading ./FHEM/92_FileLog.pm
2020.07.01 11:18:33 4: configDB reading file: ./FHEM/FhemUtils/uniqueID
2020.07.01 11:18:33 1: define Logfile FileLog ./log/fhem-%Y-%m-%d.log fakelog: Can't open ./log/fhem-2020-07-01.log: Permission denied
2020.07.01 11:18:33 1: configDB: Can't open ./log/fhem-2020-07-01.log: Permission denied

2020.07.01 11:18:33 5: Starting notify loop for global, 1 event(s), first is INITIALIZED
2020.07.01 11:18:33 5: createNotifyHash
2020.07.01 11:18:33 5: End notify loop for global
2020.07.01 11:18:33 0: Featurelevel: 5.9
2020.07.01 11:18:33 0: Server started with 3 defined entities (fhem.pl:20069/2019-08-27 perl:5.024001 os:linux user:pi pid:30297)
2020.07.01 11:18:45 4: Connection accepted from web_192.168.178.50_63369


Trotzdem ist fhem über https://192.168.178.24:8083/ nicht erreichbar. (http geht auch nicht)
Was habe ich übersehen?

Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

CoolTux

Du rufst den Start Befehl als falschen User auf
Zitatpi@raspberrypi:/opt/fhem $ perl fhem.pl -d configDB
Du musst das ganze als User fhem und nicht als User pi machen.
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

rudolfkoenig

- allowfrom ist nicht notwendig, wenn man vom lokal kommt. Wenn wegen fehlenden passwort und allowfrom der Zugriff verweigert wird, dann steht eine verbose 3 Meldung im Log (Connection refused from the non-local address $caddr:$port... )
- https kriegt man dann, wenn man das HTTPS Attribut gesetzt hat, das sehe ich aber nicht.
- laut Log wurde eine Verbindung aufgebaut (Connection accepted), aber darueber keine requests abgesetzt.

Ich kann mir nicht so recht vorstellen, dass das Problem von configDB verursacht wird.
Funktioniert der telnet Zugang?

ZitatDu musst das ganze als User fhem und nicht als User pi machen.
Das ist vermutlich richtig (siehe Permission denied), sollte aber beim FHEMWEB Zugriff keinen Unterschied machen.

betateilchen

#3
Im Beispiel wird jedenfalls nicht die rescue-Variante gestartet.
Erkennbar ist das an den viel zu vielen Attributen, die da gesetzt werden.

Bei einem rescue Start passierte genau folgendes:


attr global modpath .
attr global verbose 3
define telnetPort telnet 7072 global
define web FHEMWEB 8083 global
attr web allowfrom .*
define Logfile FileLog ./log/fhem-%Y-%m-%d.log fakelog


Meine Vermutung ist auch ein falscher User beim Starten von FHEM.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

betateilchen

Zitat von: rudolfkoenig am 01 Juli 2020, 11:57:46
- allowfrom ist nicht notwendig, wenn man vom lokal kommt.

Die FHEM-eigene (besser: eigenwillige) Interpretation dessen, was "von lokal" bedeutet, möchte ich jetzt nicht diskutieren.
Das allowfrom in der rescue Variante ist jedenfalls nicht ohne Grund vorhanden.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

rudolfkoenig

Kannst Du bitte konkreter werden?

betateilchen

Ja, das gehört aber nicht hier in den Thread, weil es mit dem beschriebenen Problem nichts zu tun hat.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

amenomade

Natürlich ging es besser unter User fhem!

Danke Euch!
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus