Re: Domoticz database check script
Posted: Wednesday 08 January 2020 23:38
PS: also works like a charm for me - thx!
Open source Home Automation System
https://forum.domoticz.com/
Sorry - you still have 'afterSuccesCommand' in 'main program' - single, not double, 's'.MikeF wrote: Wednesday 08 January 2020 17:07 Hi waaren,
In your script, you have 'afterSuccesCommand' in 'main program', but 'aftersuccessCommand in 'Settings'
Thx again. Two typo's in one wordMikeF wrote: Wednesday 08 January 2020 23:42 Sorry - you still have 'afterSuccesCommand' in 'main program' - single, not double, 's'.
If you set the scriptlogging to DEBUG and share the loglines maybe we can help ?
It seems it was easy to fix
Code: Select all
2020-01-14 14:05:11.232 Error: dzVents: Error: (2.5.5) DB check: pragma integrity_check; result ==>> Failed: The database disk image is malformed*** in database main ***
2020-01-14 14:05:11.232 Page 226: btreeInitPage() returns error code 11
2020-01-14 14:05:11.232 Page 263: btreeInitPage() returns error code 11
2020-01-14 14:05:11.232 Page 223: btreeInitPage() returns error code 11
2020-01-14 14:05:11.232 Page 225: btreeInitPage() returns error code 11
2020-01-14 14:05:11.232 Page 222: btreeInitPage() returns error code 11
2020-01-14 14:05:11.232 Page 228: btreeInitPage() returns error code 11
2020-01-14 14:05:11.232 Page 227: btreeInitPage() returns error code 11
2020-01-14 14:05:11.232 Page 259: btreeInitPage() returns error code 11
2020-01-14 14:05:11.232 Page 258: btreeInitPage() returns error code 11
2020-01-14 14:05:11.232 On tree page 14 cell 0: 2nd reference to page 66250
2020-01-14 14:05:11.232 On tree page 14 cell 2: 2nd reference to page 66375
2020-01-14 14:05:11.232 On tree page 14 cell 1: 2nd reference to page 14045
2020-01-14 14:05:11.232 On tree page 13314 cell 90: Rowid 235640 out of order
2020-01-14 14:05:11.232 On tree page 98 cell 0: 2nd reference to page 32742
2020-01-14 14:05:11.232 On tree page 98 cell 1: 2nd reference to page 30388
2020-01-14 14:05:11.232 On tree page 98 cell 0: 2nd reference to page 27249
2020-01-14 14:05:11.232 On tree page 39 cell 1: 2nd reference to page 13314
2020-01-14 14:05:11.232 wrong # of entries in index sqlite_autoindex_UserSessions_2
2020-01-14 14:05:11.232 (11)
2020-01-14 14:05:11.234 Error: dzVents: Error: (2.5.5) DB check: ------ Finished DB Check after >11 seconds. (using 0.406 seconds CPU time !)
The script identified some errors in the domoticz database. Best to make a copy now of the database and try to repair asap.EdwinK wrote: Tuesday 14 January 2020 15:52 When looking at the log it now shows:Code: Select all
2020-01-14 14:05:11.232 Error: dzVents: Error: (2.5.5) DB check: pragma integrity_check; result ==>> Failed: The database disk image is malformed*** in database main *** 2020-01-14 14:05:11.234 Error: dzVents: Error: (2.5.5) DB check: ------ Finished DB Check after >11 seconds. (using 0.406 seconds CPU time !)
You left alert = true on line 42 but have not defined a device with devicetype alert and/or used a wrong name in line 43
If you have active = true in line 42, you need to create an alert device with the name you entered in line 43.salopette wrote: Monday 06 July 2020 20:44 2020-07-06 20:42:02.371 Error: dzVents: Error: (3.0.10) DB check: .../domoticz/scripts/dzVents/generated_scripts/DB_Check.lua:159: attempt to index a nil value
Code: Select all
pi@raspberrypi4:~ $ sudo systemctl status domoticz.service
* domoticz.service - LSB: Home Automation System
Loaded: loaded (/etc/init.d/domoticz.sh; generated)
Active: active (running) since Tue 2021-01-05 10:38:40 GMT; 24h ago
Docs: man:systemd-sysv-generator(8)
Process: 474 ExecStart=/etc/init.d/domoticz.sh start (code=exited, status=0/SUCCESS)
Tasks: 26 (limit: 4915)
CGroup: /system.slice/domoticz.service
`-583 /home/pi/domoticz/domoticz -daemon -www 8090 -sslwww 443
Jan 06 11:00:00 raspberrypi4 sudo[17794]: pam_unix(sudo:session): session closed for user root
Jan 06 11:00:00 raspberrypi4 sudo[17797]: root : TTY=unknown ; PWD=/home/pi/domoticz ; USER=root ; COMMAND=/usr/bin/sqlite3 /home/pi/domoticz/domoticz.db .
Jan 06 11:00:00 raspberrypi4 sudo[17797]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 06 11:00:00 raspberrypi4 sudo[17797]: pam_unix(sudo:session): session closed for user root
Jan 06 11:00:00 raspberrypi4 sudo[17800]: root : TTY=unknown ; PWD=/home/pi/domoticz ; USER=root ; COMMAND=/usr/bin/sqlite3 /home/pi/domoticz/domoticz.db p
Jan 06 11:00:00 raspberrypi4 sudo[17800]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 06 11:00:00 raspberrypi4 sudo[17800]: pam_unix(sudo:session): session closed for user root
Jan 06 11:00:00 raspberrypi4 sudo[17803]: root : TTY=unknown ; PWD=/home/pi/domoticz ; USER=root ; COMMAND=/usr/bin/sqlite3 /home/pi/domoticz/domoticz.db p
Jan 06 11:00:00 raspberrypi4 sudo[17803]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 06 11:00:00 raspberrypi4 sudo[17803]: pam_unix(sudo:session): session closed for user root
Seems quite legit to me. The log is showing what the script does.Calzor Suzay wrote: Wednesday 06 January 2021 12:15 Everything is running but I see the session open session closed messages and have to Ctrl-C out of the query now.
Code: Select all
2021-01-27 11:10:01.487 Error: dzVents: Error: (3.0.2) DB check: Method updateAlertSensor is not available for device "dbCheckResult" (deviceType=General, deviceSubType=Text). If you believe this is not correct, please report.You created device "dbCheckResult" as a type text device and it should be a type alert devicebertbigb wrote: Wednesday 27 January 2021 11:45 I have installed this script but it reports the following error.Code: Select all
2021-01-27 11:10:01.487 Error: dzVents: Error: (3.0.2) DB check: Method updateAlertSensor is not available for device "dbCheckResult" (deviceType=General, deviceSubType=Text). If you believe this is not correct, please report.