Skip to content

Document that CALLING_AE_TITLE / RECEIVER_AE_TITLE must also be whitelisted in the Orthanc test server configs #406

Description

@medihack

Problem

The bundled Orthanc test servers only accept DIMSE requests from the AE title ADIT1DEV, which is the example.env default:

"DicomModalities": {
  "ORTHANC2": ["ORTHANC2", "orthanc2", 7502],
  "ADIT": ["ADIT1DEV", "receiver", 11112]
}

Every real deployment changes CALLING_AE_TITLE (the hospital PACS has to know ADIT's AE title). Nothing in example.env or the admin guide says that orthanc/orthanc1.json and orthanc/orthanc2.json must follow, so the Orthanc test servers silently stop working in such a deployment:

  • Orthanc accepts the association (C-ECHO works, the admin proxy to the Orthanc UI works) but aborts every C-FIND / C-GET / C-MOVE from the unknown AE title.
  • In ADIT this surfaces as RetriableDicomError("Connection timed out, was aborted or received invalid response.") after ~80 s of retries (Selective Transfer, DICOMweb API, adit-client). That reads like a network problem and sends people debugging Docker networking.
  • The real cause is only visible in the Orthanc log:
    DICOM authorization rejected for AET ADIT1 on IP ...: This AET is not listed in configuration option "DicomModalities"
    Rejected Find request from remote DICOM modality with AET "ADIT1" and hostname "..."
    

Reproduced with jodogne/orthanc-plugins:1.13.0 and the config from this repo:

Calling AE title Result
ADIT1DEV association established, C-FIND 0x0000
ADIT1 association established, C-FIND immediately aborted (empty status)

The same coupling exists for RECEIVER_AE_TITLE: the ADIT entry doubles as the C-MOVE destination, so a changed receiver AE title breaks C-MOVE from the test servers as well.

On a Swarm deployment fixing it is not just an edit: the JSON files are Swarm configs, which are immutable, so the two Orthanc services and their configs have to be removed and the stack redeployed.

Suggestion

At minimum, a hint in the docs:

  • In example.env next to CALLING_AE_TITLE / RECEIVER_AE_TITLE: "The Orthanc test servers only accept the AE titles listed in orthanc/orthanc*.json (DicomModalities). Update them when you change these values."
  • In the admin guide (Environment Variables / DICOM section), including how to apply it on Swarm (remove <stack>_orthanc1/_orthanc2 services and their *_config objects, then stack-deploy).

Alternatives that would remove the trap entirely

  1. Derive the Orthanc config from .env. Render orthanc*.json from a template in cli compose-up / cli stack-deploy, substituting CALLING_AE_TITLE and RECEIVER_AE_TITLE. Or switch the test servers to the orthancteam/orthanc image, which supports configuration through environment variables (ORTHANC__DICOM_MODALITIES=...), so the compose file can inject ${CALLING_AE_TITLE} directly.
  2. Relax the test servers. They are test-only, so "DicomAlwaysAllowFind": true, "DicomAlwaysAllowGet": true, "DicomAlwaysAllowMove": true, "DicomAlwaysAllowStore": true would accept any calling AE title. The DicomModalities entry would then only matter as C-MOVE destination (host/port of the receiver), keyed by RECEIVER_AE_TITLE.
  3. Preflight check in the CLI, like the existing check for quoted .env values: warn in compose-up / stack-deploy when CALLING_AE_TITLE or RECEIVER_AE_TITLE does not appear in orthanc/orthanc*.json.
  4. Better error message. In DimseConnector.send_c_find (and the retrieve/store counterparts), an empty status right after a successful association almost always means the peer refused the calling AE title. Adding a hint such as "the DICOM server may not accept the calling AE title settings.CALLING_AE_TITLE; check its modality configuration" would have pointed straight at the cause.

Workaround without redeploying

Orthanc accepts new modalities at runtime via its REST API, e.g. from the web container:

PUT http://orthanc1.local:6501/modalities/ADITPROD  {"AET": "ADIT1", "Host": "receiver", "Port": 11112}
PUT http://orthanc2.local:6502/modalities/ADITPROD  {"AET": "ADIT1", "Host": "receiver", "Port": 11112}

This takes effect immediately but is lost on the next Orthanc restart, because DicomModalitiesInDatabase is left at its default false.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions