I installed the dashboard and the installation was successful. However, I get this message: “[SQLITE_CANTOPEN] Unable to open the database file (unable to open database file)” when I try to view the data.
We dont offer support directly with metabase since its a metabase issue. However, my advice would be follow the error message, exec into the container and check the path:
is the database mounted?
what are permissions on database? should be 0640 .rw-r-----
check the permissions outside the container /var/lib/crowdsec/data/crowdsec.db
I don’t use the metabase directly. I installed it using the “cscli dashboard setup” command. And yes, there was an error with the database file, I fixed it in the way you suggested. However, the “[SQLITE_CANTOPEN] Unable to open the database file (unable to open database file)” error did not go away.
This worked for me. Specifically, I am using both Crowdsec & Metabase in docker containers. So Crowdsec runs as root while Metabase runs as user metabase (UID = 1000).
I had a shared static volume with the Crowdsec database. Since Crowdsec is running as roote, Metabase couldn’t access the DB files.
The directory with the crowdsec database was ./crowdsec-db (relative to the docker compose yml file) so sudo chown 2000:1000 ./crowdsec-db -R from that same directory allowed both Crowdsec & Metabase access to the files.