openwrt / openwrt/packages

domoticz: Crashes with custom userdata path

Open
#24,743 0 comments 0 reactions 1 assignee View on GitHub

@dwmw2 is already working on this.

Since May 23, 2025.

release/23.05 stale
Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Maintainer: @dwmw2
Environment: arch: mips_24kc, model: Netgear WNDR4300, OpenWrt version: 23.05.4 r24012-d8dd03c46f
(I also tried with version 22.03)

Description:
After newly installing 'domoticz', changing the default 'userdata' path in /etc/config/domoticz to a path (with the trailing slash) on persistent external usb storage (fs type: ext4) causes Domoticz to enter a crash loop when started with either service domoticz start or /etc/init.d domoticz start.

When using the default userdata path, a 'domoticz.db' is created in that path with size a size of 4096 while domoticz is running and a size of 401408 after domoticz is stopped. With the custom userdata path, no db is created.

With the 'loglevel' set to 'error' and using the custom userdata path, the following is generated in the system log:

logread -f
Sun Aug  4 15:16:30 2024 daemon.info domoticz: Domoticz is starting up....
Sun Aug  4 15:16:30 2024 daemon.info domoticz: Domoticz running...
Sun Aug  4 15:16:30 2024 daemon.err domoticz: Error opening SQLite3 database: unable to open database file
Sun Aug  4 15:16:30 2024 daemon.err domoticz: Domoticz(pid:6246, tid:6246('-')) received fatal signal 6 (Aborted)
Sun Aug  4 15:16:30 2024 daemon.err domoticz: siginfo address=0x1866
Sun Aug  4 15:16:30 2024 daemon.err domoticz: Failed to start gdb, will use backtrace() for printing stack frame
Sun Aug  4 15:16:36 2024 daemon.info domoticz: Domoticz is starting up....
Sun Aug  4 15:16:36 2024 daemon.info domoticz: Domoticz running...
Sun Aug  4 15:16:36 2024 daemon.err domoticz: Error opening SQLite3 database: unable to open database file
Sun Aug  4 15:16:36 2024 daemon.err domoticz: Domoticz(pid:6276, tid:6276('-')) received fatal signal 6 (Aborted)
Sun Aug  4 15:16:36 2024 daemon.err domoticz: siginfo address=0x1884
Sun Aug  4 15:16:36 2024 daemon.err domoticz: Failed to start gdb, will use backtrace() for printing stack frame
Sun Aug  4 15:16:41 2024 daemon.info domoticz: Domoticz is starting up....
Sun Aug  4 15:16:41 2024 daemon.info domoticz: Domoticz running...
Sun Aug  4 15:16:41 2024 daemon.err domoticz: Error opening SQLite3 database: unable to open database file
Sun Aug  4 15:16:41 2024 daemon.err domoticz: Domoticz(pid:6282, tid:6282('-')) received fatal signal 6 (Aborted)
Sun Aug  4 15:16:41 2024 daemon.err domoticz: siginfo address=0x188a
Sun Aug  4 15:16:41 2024 daemon.err domoticz: Failed to start gdb, will use backtrace() for printing stack frame
Sun Aug  4 15:16:47 2024 daemon.info domoticz: Domoticz is starting up....
Sun Aug  4 15:16:47 2024 daemon.info domoticz: Domoticz running...
Sun Aug  4 15:16:47 2024 daemon.err domoticz: Error opening SQLite3 database: unable to open database file
Sun Aug  4 15:16:47 2024 daemon.err domoticz: Domoticz(pid:6288, tid:6288('-')) received fatal signal 6 (Aborted)
Sun Aug  4 15:16:47 2024 daemon.err domoticz: siginfo address=0x1890
Sun Aug  4 15:16:47 2024 daemon.err domoticz: Failed to start gdb, will use backtrace() for printing stack frame
Sun Aug  4 15:16:52 2024 daemon.info domoticz: Domoticz is starting up....
Sun Aug  4 15:16:52 2024 daemon.info domoticz: Domoticz running...
Sun Aug  4 15:16:52 2024 daemon.err domoticz: Error opening SQLite3 database: unable to open database file
Sun Aug  4 15:16:52 2024 daemon.err domoticz: Domoticz(pid:6294, tid:6294('-')) received fatal signal 6 (Aborted)
Sun Aug  4 15:16:52 2024 daemon.err domoticz: siginfo address=0x1896
Sun Aug  4 15:16:52 2024 daemon.err domoticz: Failed to start gdb, will use backtrace() for printing stack frame
Sun Aug  4 15:16:58 2024 daemon.info domoticz: Domoticz is starting up....
Sun Aug  4 15:16:58 2024 daemon.info domoticz: Domoticz running...
Sun Aug  4 15:16:58 2024 daemon.err domoticz: Error opening SQLite3 database: unable to open database file
Sun Aug  4 15:16:58 2024 daemon.err domoticz: Domoticz(pid:6300, tid:6300('-')) received fatal signal 6 (Aborted)
Sun Aug  4 15:16:58 2024 daemon.err domoticz: siginfo address=0x189c
Sun Aug  4 15:16:58 2024 daemon.err domoticz: Failed to start gdb, will use backtrace() for printing stack frame
Sun Aug  4 15:16:58 2024 daemon.info procd: Instance domoticz::instance1 s in a crash loop 6 crashes, 0 seconds since last crash

Running either:
su -s /bin/ash -c "/usr/bin/domoticz -loglevel error -syslog daemon -userdata /mnt/share/storage/domoticz/ -sslwww 0 -noupdates -approot /usr/share/domoticz/ -pidfile '/var/run/domoticz.pid'" domoticz

or (specifying the actual dbase location):
su -s /bin/ash -c "/usr/bin/domoticz -loglevel error -syslog daemon -userdata /mnt/share/storage/domoticz/ -dbase /mnt/share/storage/domoticz/domoticz.db -sslwww 0 -noupdates -approot /usr/share/domoticz/ -pidfile '/var/run/domoticz.pid'" domoticz

from the command line produces similar output:

domoticz: Domoticz is starting up....
domoticz: Domoticz running...
domoticz: Error opening SQLite3 database: unable to open database file
2024-08-04 15:24:56.213  Error: Error opening SQLite3 database: unable to open database file
terminate called without an active exception
domoticz: Domoticz(pid:6454, tid:6454('-')) received fatal signal 6 (Aborted)
2024-08-04 15:24:56.217  Error: Domoticz(pid:6454, tid:6454('-')) received fatal signal 6 (Aborted)
domoticz: siginfo address=0x1936
2024-08-04 15:24:56.220  Error: siginfo address=0x1936
domoticz: Failed to start gdb, will use backtrace() for printing stack frame
2024-08-04 15:24:56.232  Error: Failed to start gdb, will use backtrace() for printing stack frame

Aborted

And in the log:

Sun Aug  4 15:24:55 2024 authpriv.info su[6454]: Successful su for domoticz by root
Sun Aug  4 15:24:55 2024 authpriv.info su[6454]: + /dev/pts/0 root:domoticz
Sun Aug  4 15:24:56 2024 daemon.info domoticz: Domoticz is starting up....
Sun Aug  4 15:24:56 2024 daemon.info domoticz: Domoticz running...
Sun Aug  4 15:24:56 2024 daemon.err domoticz: Error opening SQLite3 database: unable to open database file
Sun Aug  4 15:24:56 2024 daemon.err domoticz: Domoticz(pid:6454, tid:6454('-')) received fatal signal 6 (Aborted)
Sun Aug  4 15:24:56 2024 daemon.err domoticz: siginfo address=0x1936
Sun Aug  4 15:24:56 2024 daemon.err domoticz: Failed to start gdb, will use backtrace() for printing stack frame

BTW, when searching for related issues, I found issue #22469 which can probably be closed as it appears the Python issue has been resolved.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.