Page 1 of 1

Error : "Error: Error opening SQLite3 database: unable to open database file"

Posted: Monday 02 September 2024 13:18
by reza
hi guys
version 2024.4
raspberry pi 4

some times when i unplug/plug power supply of raspberry , domoticz go to offline , when i want run this manually with this command "./domoticz" i have this error :
Error opening SQLite3 database: unable to open database file
Of course, I have made a change in Raspberry. After all the settings in domoticz, I put my sd card in read-only mode. Could it be because of this or is the problem from somewhere else?

Re: Error : "Error: Error opening SQLite3 database: unable to open database file"

Posted: Monday 02 September 2024 14:30
by willemd
reza wrote: Monday 02 September 2024 13:18 hi guys
version 2024.4
raspberry pi 4

some times when i unplug/plug power supply of raspberry , domoticz go to offline , when i want run this manually with this command "./domoticz" i have this error :
Error opening SQLite3 database: unable to open database file
Of course, I have made a change in Raspberry. After all the settings in domoticz, I put my sd card in read-only mode. Could it be because of this or is the problem from somewhere else?
I don't think "./domoticz" is the way to start domoticz.
Try "sudo service domoticz start"
(not sure of the sudo is needed)

Re: Error : "Error: Error opening SQLite3 database: unable to open database file"

Posted: Monday 02 September 2024 15:41
by reza
[/quote]

I don't think "./domoticz" is the way to start domoticz.
Try "sudo service domoticz start"
(not sure of the sudo is needed)
[/quote]

my domoticz is in startup and always auto start. but some time with unplug/plug or reboot can not auto start and i check with ./domoticz for see errors. i see i have this error . after several reboot or several unplug/plug again auto startup domoticz and worked. but this is not true and Annoying

Re: Error : "Error: Error opening SQLite3 database: unable to open database file"

Posted: Monday 02 September 2024 20:29
by waltervl
reza wrote: Monday 02 September 2024 13:18 hi guys
version 2024.4
raspberry pi 4

some times when i unplug/plug power supply of raspberry , domoticz go to offline , when i want run this manually with this command "./domoticz" i have this error :
Error opening SQLite3 database: unable to open database file
Of course, I have made a change in Raspberry. After all the settings in domoticz, I put my sd card in read-only mode. Could it be because of this or is the problem from somewhere else?
If your Domoticz database is also on that read-only sd card than this probably is the reason your Domoticz will not work....

Re: Error : "Error: Error opening SQLite3 database: unable to open database file"

Posted: Thursday 05 September 2024 16:09
by reza
waltervl wrote: Monday 02 September 2024 20:29
If your Domoticz database is also on that read-only sd card than this probably is the reason your Domoticz will not work....
[/quote]

I do read-only for protect sd card (stop crash SD)
so are there any solution for protect sd card?

Re: Error : "Error: Error opening SQLite3 database: unable to open database file"

Posted: Thursday 05 September 2024 16:44
by waltervl
The database needs to be updated somehow on a disk. So you need a writable disk. You could invest in adding an SSD to your Pi. Or use an high quality SD