Error running s3 plugin

I have gone through the plugin and built the libOrthancS3Plugin.so file and have followed the rest of the steps to run the s3 plugin. After doing the necessary imports of .so files into the orthanc/lib folder, I run the script run_othanc_in_docker.sh and the error i get is this.

WARNING: Published ports are discarded when using host network mode
Startup command: Orthanc /etc/orthanc/orthanc.json
W0204 13:31:11.869153 main.cpp:1956] Orthanc version: 1.9.7
W0204 13:31:11.883704 OrthancConfiguration.cpp:66] Reading the configuration from: “/etc/orthanc/orthanc.json”
W0204 13:31:12.132054 main.cpp:878] Loading plugin(s) from: /usr/local/share/orthanc/plugins
E0204 13:31:12.148219 SharedLibrary.cpp:97] dlopen(/usr/local/share/orthanc/plugins/libOrthancS3StoragePlugin.so) failed: Error /usr/local/share/orthanc/plugins/libOrthancS3StoragePlugin.so: cannot open shared object file: No such file or directory
E0204 13:31:12.154895 main.cpp:2013] Uncaught exception, stopping now: [Error while using a shared library (plugin)] (code 25)
W0204 13:31:12.155598 main.cpp:2044] Orthanc has stopped

What am i doing wrong here? The .so file exists in the folder that is being looked at.

The “/usr/local/share/orthanc/plugins/libOrthancS3StoragePlugin.so” shared library is visibly missing in the Docker environment.

Are you sure that this “.so” has been copied from your Docker host to your Docker container?

Are you sure that “libOrthancS3StoragePlugin.so” is statically linked and doesn’t depend on any other shared library?

Sébastien-

Im not too sure what you mean by docker host to docker container, pardon my knowledge on this. I have done steps according to whats given in the radpointhq plugin repo,
This is what i see in the run-orthanc-in-docker.sh file :

docker run --network=host --rm
-v pwd/orthanc/orthanc.json:/etc/orthanc/orthanc.json:ro
-v pwd/orthanc/log/:/var/log/orthanc/
-v pwd/orthanc/orthanc-db/:/var/lib/orthanc/db/
-v pwd/orthanc/lib:/usr/local/lib
-v pwd/orthanc/plugins:/usr/local/share/orthanc/plugins
-v pwd/orthanc/scripts:/etc/orthanc/scripts
-e LD_LIBRARY_PATH=/usr/local/lib
–platform linux/amd64
-p 4242:4242
-p 8042:8042
orthanc-s3 /etc/orthanc/orthanc.json

I have placed the s3 plugin libOrthancS3StoragePlugin.so and the systemlinks in the orthanc/plugins folder. I have also copied the required libaws-* files into orthanc/lib, but the repo says that the lib files have .so extensions but some of those files have .a extension for me and I am not sure if that could be a problem. I am sorry If this answer is not clear enough. Let me know if I need to provide something and I shall do that

Sorry, on this forum, we’re not really familiar with the RadpointHQ plugin (you should try their github issue tracker).

But we are maintaining another S3 plugin: https://book.orthanc-server.com/plugins/object-storage.html

HTH,

Alain.

Hello,
That makes sense, I did take a look at this s3 plugin as well but due to my limited knowledge of docker I am not too sure how I would create a dockerfile for this in order to build and add this plugin to my running orthanc in docker. Any pointers?

You can probably get some inspiration from this project: https://github.com/aws-samples/research-pacs-on-aws/blob/main/dockerfile/orthanc.Dockerfile

HTH,

Alain

I finally got my s3 plugin to run, but it saves files with no organization. is that normal or am i supposed to do something to add structure to it? What I want is to actually index the files in s3 according to this folder structure - patient_id/study_id/series_id/instances and also be able to show these files in orthanc without storing in my efs. Any thoughts on this? I have been struggling with this plugin for a while now because of my limited knowledge on this. I would appreciate any suggesion. Thank you for taking your time to answer my questions, Love what orthanc has been doing. Keep the great work up.

Hi,

This page explains how the Orthanc Storage is organized and recommends to use the Rest API to access the files: https://book.orthanc-server.com/faq/orthanc-storage.html

You can also browse the Orthanc Storage with WebDav that exposes a more structured file structure: https://book.orthanc-server.com/users/webdav.html

HTH,

Alain