verbose start not showing basic configuration problem

I am writing this in the hope that it may save another person hours of agony.

I have Orthanc running on an Ubuntu/Linux operating system. Recently, I forgot to mount the storage area after rebooting the VM. The system would start, but would not work at all. I was restarting using the following command:

sudo /etc/init.d/orthanc restart --verbose --trace-dicom

No error message whatsoever EVEN THOUGH the “StorageDirectory” and “IndexDirectory” did not exist. How on earth is it possible to start the service successfully with such a fundamental configuration flaw in place?

It would be nice is some type of error or warning were thrown up.

This is typically the kind of messages that leads to the disgust and burnout of people developing free and open-source software to the benefit of a community. No “hello”, no “thanks”, no kindness, just anonymous complaints in CAPS LOCK for a system you didn’t contribute to in either way.

Back to the content:

1- The average user expects Orthanc to create the index/storage directory if it doesn’t exist. Orthanc is designed to have a fast learning curve, even for people who are not sysadmins. By the way, it is the task of sysadmins to make sure that storage areas are correctly mounted before starting any software.

2- The logs DO show the “StorageDirectory” and “IndexDirectory” in “–verbose” mode:

$ cat nope.json
{
“IndexDirectory” : “nope”,
“StorageDirectory” : “nope2”
}
$ ./Orthanc nope.json --verbose
W0812 07:34:37.716640 main.cpp:1942] Orthanc version: 1.9.6
[…]
W0812 07:34:37.888964 OrthancInitialization.cpp:358] SQLite index directory: “nope”
W0812 07:34:37.889083 OrthancInitialization.cpp:457] Storage directory: “nope2”
[…]

3- If you start Orthanc with an incorrect storage area, Orthanc will clearly log an error message indicating the missing file, which can be used to quickly identify the cause of your problem:

$ ./Orthanc nope.json --verbose
[…]
I0812 07:44:09.083377 HttpServer.cpp:1238] (http) GET /instances/19816330-cb02e1cf-df3a8fe8-bf510623-ccefe9f5/file
I0812 07:44:09.083536 FilesystemStorage.cpp:160] Reading attachment “107316a5-0fd8-41d5-a968-ea88f92298a9” of “DICOM” content type
E0812 07:44:09.083557 OrthancException.cpp:57] The specified path does not point to a regular file: The path does not point to a regular file: nope3/10/73/107316a5-0fd8-41d5-a968-ea88f92298a9

4- The official documentation of Orthanc (the Orthanc Book) clearly explains how to obtain verbose logs using the Ubuntu/Debian services:

https://book.orthanc-server.com/faq/log.html#under-debian-gnu-linux
https://book.orthanc-server.com/users/debian-packages.html

The commands indicated in the Orthanc Book do not correspond to what you used: “–verbose” and “–trace” do not apply to “/etc/init.d/orthanc” service script, but to the main “/usr/sbin/Orthanc” binary.

Regards,

Sébastien-