Errors trying to start the osimis/orthanc docker

Hi all

I’m considering a switch from the OHIF viewer to the osimis plugin. I’ve been running my setup with docker-compose and I’m using version 3, but all of the examples I can find are for docker-compose version 2. So I thought I would just try swapping the images. I’ve got my dicom data in a postgres database. My docker-compose file looks like

version: ‘3.6’
services:

orthanc:
image: osimis/orthanc
container_name: orthanc
depends_on:

  • postgres
    volumes:
  • ${ORTHANC_CONFIG:-./config/orthanc.json}:/etc/orthanc/orthanc.json:ro

postgres:
image: postgres:11
container_name: postgres
volumes:

  • ${POSTGRES_DATA_MNT:-/orthadb/postgresql/data/pgdata}:${PGDATA:-/var/lib/postgresql/data}
    environment:
  • POSTGRES_USER=${POSTGRES_USER:-postgres}
  • POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-NOT_MY_ACTUAL_PASSWORD}
  • PGDATA=${PGDATA:-/var/lib/postgresql/data}
  • POSTGRES_DB=orthanc

When I run it, orthanc dies as follows:

orthanc | STORAGE: Generating ‘/etc/orthanc/storage.json’…
orthanc | AC: Generating ‘/etc/orthanc/remote-access.json’…
orthanc | HTTP: Generating ‘/etc/orthanc/http.json’…
orthanc | GENERAL: ‘/etc/orthanc/orthanc.json’ taking precendence over related env vars (file might have been generated from env vars during a previous run)
orthanc | PLUGINS: Generating ‘/etc/orthanc/plugins.json’…
orthanc | Startup command: Orthanc /etc/orthanc
orthanc | W1002 19:43:25.663580 main.cpp:1442] Orthanc version: 1.5.7
orthanc | W1002 19:43:25.665055 OrthancConfiguration.cpp:113] Scanning folder “/etc/orthanc” for configuration files
orthanc | W1002 19:43:25.665169 OrthancConfiguration.cpp:61] Reading the configuration from: “/etc/orthanc/http.json”
orthanc | W1002 19:43:25.665380 OrthancConfiguration.cpp:61] Reading the configuration from: “/etc/orthanc/remote-access.json”
orthanc | W1002 19:43:25.665496 OrthancConfiguration.cpp:61] Reading the configuration from: “/etc/orthanc/plugins.json”
orthanc | W1002 19:43:25.665596 OrthancConfiguration.cpp:61] Reading the configuration from: “/etc/orthanc/orthanc.json”
orthanc | E1002 19:43:25.666141 OrthancException.h:85] Bad file format: The configuration section “AuthenticationEnabled” is defined in 2 different configuration files
orthanc | E1002 19:43:25.666271 main.cpp:1468] Uncaught exception, stopping now: [Bad file format] (code 15)
orthanc | W1002 19:43:25.666387 main.cpp:1501] Orthanc has stopped

Any suggestions would be much appreciated. Pointers to working docker-compose version 3 examples would also be helpful. I apologize if this is the wrong place to post this question.

Thanks
Howard

Hi,

Could you please provide your ./config/orthanc.json file?

Also please note if you wish to use the Postgres plugin, you need to enable it in Orthanc environment variables. Please see https://osimis.atlassian.net/wiki/spaces/OKB/pages/26738689/How+to+use+osimis+orthanc+Docker+images

Kind regards,

Michel

Hi Michael

I’ve attached my orthanc.json file. I followed the link you referenced, but I ended up here https://bitbucket.org/osimis/orthanc-setup-samples/src/24e7e460b67951d80f682927d07e129827652e99/docker/postgresql/docker-compose.yml and didn’t see which environment variables I need to set. I’m clearly looking in the wrong place. Ah perhaps I need to be looking at this? https://osimis.atlassian.net/wiki/spaces/OKB/pages/26738689/How+to+use+osimis+orthanc+Docker+images#Howtouseosimis/orthancDockerimages?-PostgreSQL

Howard

orthanc.json (20.8 KB)

Hi,

Yes, you should look indeed at this.

I’ll have a look at your config file and docker-compose.yml and revert back to you soon.

Cheers,

Michel

Hi,

I understand now better what’s going on when you use the osimis/orthanc image.

It’s perhaps not explained good enough, but the Osimis Orthanc Bundle runs “Setup Procedures” before starting Orthanc which will either read the different plugin json files (http.json, remote-access.json, plugins.json) or create them with default values.
The problem is you are binding only an orthanc.json file that contains for instance the setup of AuthenticationEnabled which is also setup in the generated remote-access.json file.
So you have different possibilities, for instance:

  1. do not use a configuration file but environment variables as described on the wiki page I provided to configure your Orthanc
  2. split your orthanc.json file in the different plugin related json files (http.json, remote-access.json, plugins.json) where you will set the values you wish to override
  3. do not setup in your orthanc.json file redundant sections that will be setup in the generated plugin json files (http.json, remote-access.json, plugins.json)

I hope this helps.

Cheers,

Michel