Builtin HTTPS not working on Ubuntu 22.04?

Dear Orthanc community,
I am facing problems with Orthancs builtin HTTPS server on Debian/Ubuntu.
Running Orthanc with gdb gives “Thread 11 “civetweb-worker” received signal SIGSEGV, Segmentation fault.” even if I increase my VMs memory to 4 GB.
I created a minimal scenario for reproducing this on Ubuntu 22.04:

sudo apt update && sudo apt install -y libssl-dev orthanc
sudo -i
cat /etc/ssl/private/ssl-cert-snakeoil.key /etc/ssl/certs/ssl-cert-snakeoil.pem > /etc/orthanc/certificate.pem
nano /etc/orthanc/orthanc.json: Set "SslEnabled" : true & "SslCertificate" : "/etc/orthanc/certificate.pem", save & close
systemctl stop orthanc
su orthanc -c "Orthanc /etc/orthanc/"

Runs fine until getting accessed:
Open https://localhost:8042/ in Firefox: Terminal shows Segmentation fault

Version: 1.10.0+dfsg-1

Did somebody else run into this and knows how to resolve it?
Greets
Gerald

Hi Gerald,

I had a quick look and, when I launch Orthanc with strace without installing libssl-dev, I see that Orthanc fails to start because it does not find libcrypto.so. Hence the reason why you installed libssl-dev manually I guess !

This sounds weird that a dependency is not installed automatically (BTW, it seems that libssl3.0 is installed but Orthanc can not find the .so file) and therefore, I’m afraid there might be some incompatibilities when you use the libssl-dev version !?! (I don’t know anything about ubuntu packages and dependencies).

Maybe you should ask the package maintainers for more insight ?

As a workaround, I think you can download the LSB binaries and replace the executable from the package.

HTH,

Alain.


Reminder: to test it inside Docker:

docker run -it --entrypoint=bash -p 8045:8042 ubuntu:22.04

apt update && apt install -y orthanc vim strace wget
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /tmp/private.key -out /tmp/certificate.crt && cat /tmp/private.key /tmp/certificate.crt > /tmp/certificate.pem
vi /etc/orthanc/orthanc.json: Set "SslEnabled" : true & "SslCertificate" : "/tmp/certificate.pem", save & close

strace Orthanc /etc/orthanc/orthanc.json

Hello,

I confirm Alain’s interpretation. This issue was fixed in release 1.12.1+dfsg-1 of the Orthanc package, as can be seen in the changelog: debian/changelog · master · Debian Med / orthanc · GitLab

Here is the direct link to the patch: https://salsa.debian.org/med-team/orthanc/-/commit/f7caa5d2511188cf23e092a6d48ce712c0d0e607

Kind Regards,
Sébastien-

1 Like