Can S3 and Postgres both be configured?

Having worked with many imaging system I carry the assumption that we can store pixel data on S3 while non-pixel data (e.g. demographics) in database (e.g. Postgres). This other thread seems to support this.

As I continuing with my infra project, with that model in mind, i made to the point the s3 library is loaded (along with postgres) as i bring up docker container. However S3 is not being used. i noticed the following line in the log:

You can certainly load the PostgreSQL index plugin (to store the database) together with the AWS S3 storage area plugin (to store the files).

In your case, you are visibly simultaneously enabling two plugins to store the files: the PostgreSQL storage area plugin together with the AWS S3 storage area plugin. Obviously, it only makes sense to have one single storage area, and Orthanc cannot start.

You should either not load the PostgreSQL storage area plugin in the “Plugins” configuration option of Orthanc, or set the “EnableStorage” configuration option of PostgreSQL to “false”:

https://book.orthanc-server.com/plugins/postgresql.html#usage

Regarding the “curlCode” error, this question was already asked before:
https://groups.google.com/g/orthanc-users/c/qEfeh5yVrdk/m/2F1nDN2iAQAJ

Sébastien-

Thanks for the tips Sébastien. I put EnableStorage back to false and it now attempts to store to S3.
As with the curlCode error, it may have to do with the STATIC_BUILD=ON switch:

With STATIC_BUILD=ON, I came across the error above when it tries to write to S3, even though I’ve installed related package in the target environment (libcurl4 libssl-dev libssl1.1 curl libcurl4-openssl-dev)
Without STATIC_BUILD=ON, a different error occurs when loading the library:

orthweb | W0529 03:53:51.133116 main.cpp:864] Loading plugin(s) from: /usr/local/share/orthanc/plugins/libOrthancAwsS3Storage.so
orthweb | W0529 03:53:51.306785 PluginsManager.cpp:269] Registering plugin ‘AWS S3 Storage’ (version mainline)
orthweb | free(): invalid pointer

Forgive my lack of knowledge on cmake, is there anything i’m missing? This is where i’m running the build.

  • Yi

Hello,

From what I see in your GitHub repository, your Docker image seems to derive from the “jodogne/orthanc-plugins” image:
https://github.com/digihunch/orthweb/blob/main/orthanc-builder/Dockerfile

The “jodogne/orthanc-plugins” image uses the Linux Standard Base (LSB) binaries available at:
https://lsb.orthanc-server.com/

But, an executable compiled using the LSB SDK cannot load a plugin that is not fully statically linked:
https://groups.google.com/g/orthanc-users/c/AZ804k8ba1A/m/0SYaKibBBAAJ

The AWS S3 plugin is currently not designed to be entirely statically linked (it still dynamically links against libcrypto). This is why Osimis provides Docker images that don’t use any LSB binaries, but are fully recompiled on a given GNU/Linux distribution. You should do the same, or simply get in touch with Osimis to request access to their Docker “pro” images (that already contains all the object storage plugins properly compiled):
https://book.orthanc-server.com/plugins/object-storage.html#pre-compiled-binaries

Sébastien-