Hallo,
ich musste meinen Cubitruck leider neu aufsetzen, habe dafür Debian Stretch neu installiert und Fhem runtergeladen und installiert und anschließend mein Backup zurück gespielt, soweit so gut, allerdings bekomme ich im Log jetzt diese Meldungen:
2018.11.22 12:23:43.816 1: PERL WARNING: DBD::SQLite::db do failed: unable to open database file at ./FHEM/93_DbLog.pm line 2442.
2018.11.22 12:23:43.817 1: stacktrace:
2018.11.22 12:23:43.817 1: main::__ANON__ called by ./FHEM/93_DbLog.pm (2442)
2018.11.22 12:23:43.817 1: main::DbLog_ConnectPush called by ./FHEM/93_DbLog.pm (1506)
2018.11.22 12:23:43.818 1: (eval) called by ./FHEM/93_DbLog.pm (1505)
2018.11.22 12:23:43.818 1: main::DbLog_Push called by ./FHEM/93_DbLog.pm (1462)
2018.11.22 12:23:43.818 1: main::DbLog_Log called by fhem.pl (3603)
2018.11.22 12:23:43.818 1: main::CallFn called by fhem.pl (3523)
2018.11.22 12:23:43.818 1: main::DoTrigger called by fhem.pl (4574)
2018.11.22 12:23:43.819 1: main::readingsEndUpdate called by FHEM/ABFALL_setUpdate.pm (220)
2018.11.22 12:23:43.819 1: main::ABFALL_setUpdate called by fhem.pl (3146)
2018.11.22 12:23:43.819 1: main::HandleTimeout called by fhem.pl (649)
2018.11.22 12:23:43.888 3: DbLog myDbLog - Creating Push-Handle to database SQLite:dbname=/media/Platte/home/fhem.db with user
2018.11.22 12:23:43.896 3: DbLog myDbLog - Push-Handle to db SQLite:dbname=/media/Platte/home/fhem.db created
2018.11.22 12:23:43.932 1: PERL WARNING: DBD::SQLite::db do failed: unable to open database file at ./FHEM/93_DbLog.pm line 2438.
2018.11.22 12:23:43.932 1: stacktrace:
2018.11.22 12:23:43.933 1: main::__ANON__ called by ./FHEM/93_DbLog.pm (2438)
2018.11.22 12:23:43.933 1: main::DbLog_ConnectPush called by fhem.pl (3146)
2018.11.22 12:23:43.933 1: main::HandleTimeout called by fhem.pl (649)
2018.11.22 12:23:43.935 1: PERL WARNING: DBD::SQLite::db do failed: unable to open database file at ./FHEM/93_DbLog.pm line 2441.
2018.11.22 12:23:43.935 1: stacktrace:
2018.11.22 12:23:43.935 1: main::__ANON__ called by ./FHEM/93_DbLog.pm (2441)
2018.11.22 12:23:43.936 1: main::DbLog_ConnectPush called by fhem.pl (3146)
2018.11.22 12:23:43.936 1: main::HandleTimeout called by fhem.pl (649)
2018.11.22 12:23:43.937 1: PERL WARNING: DBD::SQLite::db do failed: unable to open database file at ./FHEM/93_DbLog.pm line 2442.
2018.11.22 12:23:43.937 1: stacktrace:
2018.11.22 12:23:43.938 1: main::__ANON__ called by ./FHEM/93_DbLog.pm (2442)
2018.11.22 12:23:43.938 1: main::DbLog_ConnectPush called by fhem.pl (3146)
2018.11.22 12:23:43.938 1: main::HandleTimeout called by fhem.pl (649)
Was hab ich vergessen /falsch gemacht?
Danke
Der wesentliche Hinweis ist der:
PERL WARNING: DBD::SQLite::db do failed: unable to open database file
D.h. ist das File dort zu finden (ist in der .conf Datei definiert) ? Hat der fhem-User die Rechte das File zu öffnen ?
Grüße
Heiko
Alos das list der dblog sieht so aus:
Internals:
COLUMNS field length used for Device: 64, Type: 64, Event: 512, Reading: 64, Value: 128, Unit: 32
CONFIGURATION /opt/fhem/db.conf
DEF /opt/fhem/db.conf .*:.*
MODE synchronous
MODEL SQLITE
NAME myDbLog
NR 244
NTFY_ORDER 50-myDbLog
PID 4206
REGEXP .*:.*
STATE DBD::SQLite::db prepare failed: unable to open database file at ./FHEM/93_DbLog.pm line 1572.
TYPE DbLog
VERSION 3.13.0
dbconn SQLite:dbname=/media/Platte/home/fhem.db
dbuser
HELPER:
COLSET 1
DEVICECOL 64
EVENTCOL 512
OLDSTATE DBD::SQLite::db prepare failed: unable to open database file at ./FHEM/93_DbLog.pm line 1572.
READINGCOL 64
TYPECOL 64
UNITCOL 32
VALUECOL 128
Helper:
DBLOG:
state:
myDbLog:
TIME 1542890955.06124
VALUE DBD::SQLite::db prepare failed
READINGS:
2018-01-10 22:12:29 CacheUsage 33
2018-01-10 22:12:29 NextSync 2018-01-10 22:12:59 or if CacheUsage 500 reached
2018-01-12 18:42:42 countCurrent 1695
2018-01-12 18:42:42 countHistory 259075
2016-03-02 18:45:47 lastReduceLogResult Rows processed: 1028663, deleted: 978048, time: 528.78sec
2018-11-12 02:02:11 lastRowsDeleted 214243
2018-01-11 06:07:47 reduceLogState Rows processed: 0, deleted: 0, time: 0.01sec
2018-11-22 13:50:41 state DBD::SQLite::db prepare failed: unable to open database file at ./FHEM/93_DbLog.pm line 1572.
cache:
index 0
Attributes:
DbLogType Current/History
asyncMode 0
group Info
room Zentral
Die db.conf in meinem Fhem Verzeichniss hat den Inhalt
%dbconfig= (
connection => "SQLite:dbname=/media/Platte/home/fhem.db",
user => "",
password => ""
);
die Berechtigung ist:
-rw-r--r-- 1 fhem dialout 102 Jan 10 2018 db.conf
die fhem.db unter /media/Platte/home/ hat die Berechtigung
-rw-r--r-- 1 fhem dialout 472109056 Nov 21 21:47 fhem.db
Ich seh den Fehler nicht...
Um dieses File geht es:
/media/Platte/home/fhem.db
Ist es vorhanden mit den nötigen Zugriffsberechtigungen ?
Setzt mal bitte auch die Schreibberechtigung für alle. Nur zum Test, später wieder rückgängig machen.
Zitat von: Tommy82 am 22 November 2018, 13:54:45
die fhem.db unter /media/Platte/home/ hat die Berechtigung
-rw-r--r-- 1 fhem dialout 472109056 Nov 21 21:47 fhem.db
Ich seh den Fehler nicht...
Hi, so sieht die aus, würde sagen die berechtigung passt
siehe oben .. "Setzt mal bitte auch die Schreibberechtigung für alle. Nur zum Test, später wieder rückgängig machen."
Hab jetzt mal 777 gesetzt, aber keine besserung, kann ich die fhem.db nicht einfach neu anlegen? Auch wenn dann die alten Daten weg sind?
root@cubietruck /media/Platte/home
-rwxrwxrwx 1 fhem dialout 472109056 Nov 21 21:47 fhem.db
erstmal versucht die DB manuell zu öffnen?
in der Konsole sqlite3 /media/Platte/home/fhem.db
Zitat von: Frank_Huber am 22 November 2018, 16:56:58
erstmal versucht die DB manuell zu öffnen?
in der Konsole sqlite3 /media/Platte/home/fhem.db
Das funktioniert, .dbinfo bringt dann:
.dbinfo
database page size: 4096
write format: 2
read format: 2
reserved bytes: 0
file change counter: 84956
database page count: 115261
freelist page count: 89916
schema cookie: 4
schema format: 4
default cache size: 0
autovacuum top root: 0
incremental vacuum: 0
text encoding: 1 (utf8)
user version: 0
application id: 0
software version: 3016002
number of tables: 3
number of indexes: 1
number of triggers: 0
number of views: 0
schema size: 512
Mach mal mal ein set configCheck und poste die Ausgaben.
Ich glaub jetzt läufts plötzlich, bekomme jetzt ein "connected"
Hier die gewünschte Ausgabe
Result of DbLog version check
Used DbLog version: 3.13.0
Recommendation: Your running version may be the current one. Please check for updates of DbLog periodically.
Result of configuration read check
Connection parameter store type: file
Connection parameter: Connection -> SQLite:dbname=/media/Platte/home/fhem.db, User -> , Password -> read o.k.
Result of connection check
Connection to database /media/Platte/home/fhem.db successfully done.
Recommendation: settings o.k.
Result of encoding check
Encoding used by DB /media/Platte/home/fhem.db: UTF-8
Recommendation: This is only an information about text encoding used by the main database.
Result of logmode check
Logmode of DbLog-device myDbLog is: synchronous
Recommendation: Switch myDbLog to the asynchronous logmode by setting the 'asyncMode' attribute. The advantage of this mode is to log events non-blocking.
There are attributes 'syncInterval' and 'cacheLimit' relevant for this working mode.
Please refer to commandref for further information about these attributes.
Result of plot generation method check
WARNING - at least one of your FHEMWEB devices have attribute "plotfork = 1" not set. This may cause blocking situations when creating plots.
WEB: plotfork=0
WEBphone: plotfork=0
WEBtablet: plotfork=0
Recommendation: You should set attribute "plotfork = 1" in relevant devices
Result of table 'history' check
Column width set in DB /media/Platte/home/fhem.db.history: 'DEVICE' = 32, 'TYPE' = 32, 'EVENT' = 512, 'READING' = 32, 'VALUE' = 32, 'UNIT' = 32
Column width used by myDbLog: 'DEVICE' = 64, 'TYPE' = 64, 'EVENT' = 512, 'READING' = 64, 'VALUE' = 128, 'UNIT' = 32
Recommendation: WARNING - The relation between column width in table history and the field width used by device myDbLog should be equal but it differs.The field width used by myDbLog can be adjusted by setting attributes 'colEvent', 'colReading', 'colValue'. (pls. refer to commandref)Because you use SQLite this is only a warning. Normally the database can handle these differences.
Result of table 'current' check
Column width set in DB /media/Platte/home/fhem.db.current: 'DEVICE' = 32, 'TYPE' = 32, 'EVENT' = 512, 'READING' = 32, 'VALUE' = 32, 'UNIT' = 32
Column width used by myDbLog: 'DEVICE' = 64, 'TYPE' = 64, 'EVENT' = 512, 'READING' = 64, 'VALUE' = 128, 'UNIT' = 32
Recommendation: WARNING - The relation between column width in table current and the field width used by device myDbLog should be equal but it differs. The field width used by myDbLog can be adjusted by setting attributes 'colEvent', 'colReading', 'colValue'. (pls. refer to commandref)Because you use SQLite this is only a warning. Normally the database can handle these differences.
Result of check 'Search_Idx' availability
Index 'Search_Idx' exists and contains recommended fields 'DEVICE', 'READING', 'TIMESTAMP'.
Recommendation: settings o.k.
Result of check 'Report_Idx' availability for DbRep-devices
No DbRep-device assigned to myDbLog is used. Hence an index for DbRep isn't needed.
Recommendation: settings o.k.
Ausgabe sieht gut aus. War da eine Zauberhand im Spiel ? ;)
Zitat von: DS_Starter am 22 November 2018, 17:42:36
Ausgabe sieht gut aus. War da eine Zauberhand im Spiel ? ;)
Seltsam ist es..... der Schritt bevor es plötzlich ging war das öffnen der DB auf der kommandozeile, plötzlich war die Verbindung da.
Naja wenigstens es läuft wieder:-)
Vielen Dank für die Hilfe
War da evtl eine Sperre auf der Datei die dadurch gelöst wurde?
Was ist denn vor dem Neuaufsetzen zuletzt passiert?
Gesendet von meinem Doogee S60 mit Tapatalk
Zitat von: Frank_Huber am 22 November 2018, 18:20:40
War da evtl eine Sperre auf der Datei die dadurch gelöst wurde?
Was ist denn vor dem Neuaufsetzen zuletzt passiert?
Gesendet von meinem Doogee S60 mit Tapatalk
Speere?
Also in Fhem dürfte vor dem neuaufsetzen nichts besonderes passiert sein, ich hatte bei einem "bisschen rumspielen" mein Armbian zerschossen, so das ich alles neu aufsetzen musste