TLS [Inexistent file] (code 13)

Hi OrthanC community,

When trying to do a “retrieve” from a Phillips workstation it fails and got the following error:

OrthancException.cpp:58] Bad sequence of calls: DICOM TLS - No path to the private key of the local certificate was provided

I though it was something from the workstation, but I got same error from Weasis trying to import the study from OrthanC.

On Phillips workstation, query and image viewing are fine. Only the retrieve raise the error.

Viewing images from OHIF or Oviyam2 are fine.

I tried to enable TLS on OrthanC config file:
“DicomTlsEnabled” : true,
“DicomTlsCertificate” : “orthanc.crt”,
“DicomTlsPrivateKey” : “/etc/orthanc/orthanc.key”,
“DicomTlsTrustedCertificates” : “dcmtk.crt”,
“DicomTlsRemoteCertificateRequired” : false,

Generating the certificates as specified in https://book.orthanc-server.com/faq/dicom-tls.html and placing them in /etc/orthanc/ but service stop ending with the error “Inexistent file: orthanc.crt”.

W0321 14:18:42.478669 HttpClient.cpp:1178] HTTPS will use the CA certificates from this file: /etc/orthanc
E0321 14:18:42.478692 OrthancException.cpp:58] Inexistent file: Inexistent file: orthanc.crt

elJefe:/etc/orthanc # l
total 88
drwxr-xr-x 3 orthanc orthanc 4096 mar 21 14:17 ./
drwxr-xr-x 157 root root 12288 mar 21 12:26 …/
-rw-r–r-- 1 orthanc orthanc 2851 mar 21 13:48 certificate.pem
-rwxr-x— 1 orthanc orthanc 23520 mar 21 14:17 Configuration.json*
-rw-r–r-- 1 orthanc orthanc 1147 mar 21 13:31 dcmtk.crt
-rw------- 1 orthanc orthanc 1704 mar 21 13:31 dcmtk.key
-rw-r–r-- 1 orthanc orthanc 981 mar 18 09:13 extraTags.json
-rw-r–r-- 1 orthanc orthanc 867 mar 21 13:42 mysql.json
-rw-r–r-- 1 orthanc orthanc 1147 mar 21 13:31 orthanc.crt
-rw-r–r-- 1 orthanc orthanc 1704 mar 21 13:31 orthanc.key
-rwxr-x— 1 orthanc orthanc 538 feb 2 14:37 server-folders.json*
-rwxr-x— 1 orthanc orthanc 395 feb 2 14:37 worklists.json*

I tried to change owner and access right of .crt and .key file, but could not solve it.

  1. Is /etc/orthanc/ the correct location for those files? I coudl not find that information in the docs.
  2. If yes, what could cause the error?

Many thanks in advance for your help, and greetings from Nicaragua :wink:

Cédric Simon

TSLstart.log (4.98 KB)

nonTLSstart.log (4.85 KB)

Configuration.json (23 KB)

Important note: the original error with Philips workstation occurs in production, while Weasis error is on my local (dev) computer. But since it is the same error message I assume solution might solve both cases…

Also: OS is Linux in both cases.

Root cause “OrthancException.cpp:58] Bad sequence of calls: DICOM TLS - No path to the private key of the local certificate was provided” is now fixed.

Modality in database was defined as [“UseDicomTls”:true]. Setting it to “false” fixed the issue.

The TLS error is still there but I do not require to set it up anymore.

If the certificate file location could be added to the docs, it would be helpfull.

Hi Cédric,

Just added this text in the default configuration file:
As a general recommendation, you should always favour absolute paths when you need to provide a path to a file or a directory. This is not done in this configuration file since we don’t know where Orthanc is going to be installed.

Do you still have the issue if you use an absolute path ?

Best regards,

Alain.