Published
Never load real patient data, including your own scans, and never point these tools at a hospital system without permission.
What you will do
- Tell a network failure from an association, permissions, or negotiation failure by reading the error.
- Read a rejected association: its result, its source, and its reason.
- Find the cause in the PACS log when the sender's error doesn't name it.
- Explain why a passing C-ECHO doesn't prove a PACS will store your images.
What you need
- Docker: Docker Desktop on Windows 11 or macOS, or Docker Engine with the Compose plugin on Linux. Docker Desktop is free for personal use, education, and small businesses, and larger organizations need a paid subscription, so ask your IT team before you install it on a work computer.
- At least 8 GB of RAM and about 4 GB of free disk space.
- Stop any earlier lab first, with
docker compose downin its folder. All the labs use ports 8042 and 4242.
Where to look first
The first two failures happen on the network, before DICOM starts. The third happens in the association, when the two applications agree to talk. The last two pass C-ECHO and fail only when images are sent.
| Error | Layer | Check |
|---|---|---|
unknown host | Network | The host name, DNS |
Connection refused | Network | The port, the firewall, whether the PACS is running |
Called AE Title Not Recognized | DICOM association | The PACS's AE title |
| Echo passes, store fails, and the PACS log names the AE title | DICOM permissions | The PACS's list of known senders |
No presentation context | DICOM negotiation | The object types (SOP classes) and transfer syntaxes the PACS accepts |
The five failures
The messages come from DCMTK's echoscu and storescu. Other senders word them differently.
1. Wrong host
docker compose run --rm dcmtk echoscu -v -aet CT_LAB -aec ORTHANC pasc 4242F: Association Request Failed: 0006:0320 Attempt to connect to unknown host: pascThe name doesn't resolve, so nothing left the computer.
Fix: Correct the host name or IP address in the sender's settings.
2. Wrong port
docker compose run --rm dcmtk echoscu -v -aet CT_LAB -aec ORTHANC pacs 104F: Association Request Failed: 0006:031c TCP Initialization Error: Connection refusedThe host answered, but nothing listens on port 104. Many hospital PACS use 104 or 11112, and this one uses 4242.
Fix: Correct the port. If the port looks right, check the firewall and whether the PACS is running at all.
3. Wrong called AE title
docker compose run --rm dcmtk echoscu -v -aet CT_LAB -aec PACS pacs 4242F: Association Rejected:
F: Result: Rejected Permanent, Source: Service User
F: Reason: Called AE Title Not RecognizedThe network is fine: the PACS answered, then refused the association. Those words come from the DICOM standard, where this is rejection reason 7. Permanent means that trying again won't help until a setting changes.
Fix: Use the PACS's AE title exactly, here ORTHANC. Orthanc ignores case by default, but many PACS don't.
4. A sender the PACS doesn't know
A new scanner, CT_2, passes C-ECHO, but its images don't go through.
docker compose run --rm dcmtk storescu -v -aet CT_2 -aec ORTHANC +sd +r pacs 4242 PAN_03E: Store Failed, file: PAN_03/...
E: 0006:020e DIMSE Failed to send message
E: 0006:031d TCP I/O Error (...) occurred in routine: writeDataPDUdocker compose logs pacs --tail 3DICOM authorization rejected for AET CT_2 on IP 172.18.0.3: This AET is not listed in configuration option "DicomModalities"The scanner's error doesn't say why, and the text in brackets changes from run to run. The PACS log names the cause.
Fix: Register the sender on the PACS. In this lab, add CT_2 to ORTHANC__DICOM_MODALITIES in compose.yaml, run docker compose up -d, and send again. All 422 images arrive.
5. An object type the PACS doesn't accept
A 3D workstation sends a screenshot back to the PACS as a Secondary Capture. The lab's make-capture script writes one to /work/sc.dcm. C-ECHO still passes, but the send fails.
docker compose run --rm dcmtk make-capturedocker compose run --rm dcmtk storescu -v -aet CT_LAB -aec ORTHANC pacs 4242 /work/sc.dcmE: No presentation context for: (SC) 1.2.840.10008.5.1.4.1.1.7
E: Store SCU Failed: 0006:0208 DIMSE No valid Presentation Context IDDuring association, the PACS turned down Secondary Capture Image Storage, so storescu had no agreed way to send the file.
Fix: Accept the object type on the PACS. In this lab, add 1.2.840.10008.5.1.4.1.1.7 to ORTHANC__ACCEPTED_SOP_CLASSES in compose.yaml, run docker compose up -d, and send again.
What a passing C-ECHO proves
It proves that an association can be opened and verified. It doesn't prove the PACS will store images from you, as failures 4 and 5 show. After a change to a connection, test with a real send.
How this PACS is set up
These settings in the lab's compose.yaml make it strict, where the PACS in the send lab accepts anything.
| Setting | What it does |
|---|---|
ORTHANC__DICOM_CHECK_CALLED_AET: "true" | Refuses an association that calls any AE title but ORTHANC |
ORTHANC__DICOM_ALWAYS_ALLOW_ECHO: "true" | Answers C-ECHO from anyone, as many PACS do |
ORTHANC__DICOM_ALWAYS_ALLOW_STORE: "false" | Stores images only from the senders in ORTHANC__DICOM_MODALITIES |
ORTHANC__DICOM_MODALITIES | The known senders: CT_LAB only |
ORTHANC__ACCEPTED_SOP_CLASSES | The object types it stores: CT Image Storage only |
If the lab itself doesn't work
| What you see | What to do |
|---|---|
docker compose up -d fails after an edit | The JSON in the edited line has a missing quote, comma, or bracket. Compare it with the line in the README. |
cannot access file: PAN_03 from storescu | Download the study first, with docker compose run --rm download. |
cannot access file: /work/sc.dcm from storescu | Run docker compose run --rm dcmtk make-capture first. |
port is already allocated | Another program uses port 8042 or 4242, often the PACS from an earlier lab. Run docker compose down in that lab's folder. |
Sources: DCMTK; Orthanc; The current DICOM standard, PS3.8 for association rejections; Chen, L., et al. (2022). CTpred-Sunitinib-panNET. The Cancer Imaging Archive; Docker Desktop license terms. Polyseminar is an independent publisher. See the independence notice.
