Orthanc (SQLite: unable to open database)

Hello!
Running Orthanc v1.9.7 on ubuntu 18.04.

When I start Orthanc (via the /etc/init.d/orthanc startup script), it exists due to a SQL database error. Can somebody provide a pointer on what is wrong?

/etc/orthanc/OrthancStorage is an empty folder. Will Orthanc make the database? Should there be a file it expects? Or am I missing a (database?) library?

Thanks for your help,
Log below.
Jonathan.

Hi,

Orthanc will create the DB when starting. Here, I see it’s trying to create it in /etc/orthanc/OrthancStorage and might not have the correct rights to do so.

I would advise you to use an absolute path for the “StorageDirectory” in your orthanc.json file.

HTH

Alain

Thanks!
I figured it out, the OrthancStorage directory needs orthanc:orthanc user:group permissions, not root:root!
Thanks for your help,

Outlook-uyxtfcam.png

Hi Jonathan and Alain,

Can you elaborate a little more on the solution as I am also facing the same error on some machines when starting Orthanc from docker-compose.yml using command docker-compose up

SQLite index directory: “/etc/orthanc/OrthancStorage”
Uncaught exception, stopping now: [SQLite: Unable to open the database] (code 1002)
Orthanc has stopped

Thanks

Hi Dinesh,

Likely an invalid path or permission issues.

I would advise you to start from this working example and then modify it step by step: https://bitbucket.org/osimis/orthanc-setup-samples/src/master/docker/postgresql/

HTH

Alain.