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

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
reza
Posts: 112
Joined: Tuesday 13 September 2016 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:

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

Post 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?
willemd
Posts: 621
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

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

Post 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)
reza
Posts: 112
Joined: Tuesday 13 September 2016 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:

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

Post 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
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

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

Post 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....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
reza
Posts: 112
Joined: Tuesday 13 September 2016 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:

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

Post 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?
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

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

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest