Orthanc won't start with "SslEnabled" : true

Hi everyone,

When I enable SSL on Orthanc version: 1.11.0
Service will not start and error:
E0703 02:57:41.262924 main.cpp:2063] Uncaught exception, stopping now: [The TCP port of the HTTP server is privileged or already in use] (code 2003)
W0703 02:57:41.262924 main.cpp:2094] Orthanc has stopped

Confirmed that nothing else is using port 8042
plus Orthanc working great with SslEnabled false.

I saw some old posts that there was a bug that fixed long time ago… so why is it happening on latest version??
Help!
anat

PS - The version I installed is latest Windows 64 BIT by Osimis

Hi,

I’ve just tested Orthanc with the attached configuration files and a self-signed certificate. Started it with this command:
C:\Program Files\Orthanc Server>Orthanc.exe --verbose C:\Users\Alain\Downloads\test-tls-orthanc\orthanc.json

Note that, at that time, my Orthanc running as a Windows Service is stopped → it works fine.
If my Orthanc Service is running, I get an error stating that the TCP port is already in use (which is expected).

You may also try with another “HttpPort” in your configuration file to check if it helps or not…

HTH,

Alain.

certificate.pem (5.19 KB)

orthanc.json (176 Bytes)

Alain,
I’m getting this same error. I’m not doing anything special other than enabling “SslEnabled” from false → true. I’ve created the private.key, public.crt and combined.pem files as outlined in The Book. It’s as if Orthanc loads up it’s HTTP service on the default “HttpPort” of 8042, sees that it’s config should be using https and not http, therefore restarts as HTTPS, but doesn’t shut down the HTTP port beforehand. I’ve even changed the HttpPort from 8042 to 8443 and restarted Orthanc to see if it’s specific to a port, but I get the error The TCP port of the HTTP server is privileged or already in use: (port = 8443).

If it helps, I’m using Version 1.10.0, ApiVersion 16 (as shown in the /system endpoint)

Thoughts?

(this was running under Ubuntu 22.04)

Using the docker container (version 1.11.0) this works…

Hello,

I have just run the exact instructions from the Orthanc Book:
https://book.orthanc-server.com/faq/https.html#examples

Everything works properly on Ubuntu 20.04, using the mainline of Orthanc, dynamically linked against the system-wide OpenSSL libraries.

Please share a minimal working example:

https://book.orthanc-server.com/users/support.html#discussing-a-minimal-working-example

Regards,
Sébastien-

Sebastien,

I hope everything is here. I’ve completely rebuilt my test VM this morning to get you everything you need:

orthanc.json (37.3 KB)

(and the version reported in the log file which wasn’t included in the copy is 1.10.0)

Hello,

I have found the culprit using the “strace” tool.

The embedded Web server of Orthanc (i.e. civetweb) requires “/usr/lib/x86_64-linux-gnu/libcrypto.so” to be present on the system, but this symbolic link is part of the “libssl-dev” package, which is not a dependency of the “orthanc” package:
https://packages.ubuntu.com/jammy/amd64/libssl-dev/filelist

You can simply solve the issue by running:

$ sudo apt install -y libssl-dev

HTH,
Sébastien-

For further reference, I have just added the dependency in the source code of the Debian package:
https://salsa.debian.org/med-team/orthanc/-/commit/f7caa5d2511188cf23e092a6d48ce712c0d0e607

This modification will be part of future versions of the package.

Sebastien,
Thanks for working so diligently on this and for finding that little nugget of information.

Merry Christmas to you and the team!