Jobs API: The DicomMoveScu job doesn't seems to track progress

Hello !

We are using Orthanc job API to keep track of the different “in progress” tasks. There is a “Prgoress” property in the Job payload. We are polling the Job API to check for progress.

On an ArchiveJob, we have a valid computed progression which move from 0 to 100%. However on a DicomMoveScu job, the progress is stuck at 0 during the whole job execution then it moves to 100% whenever the transfer is done.

Is it a normal behavior ? Maybe it’s not possible to compute progress for such transfer ?

Thanks !
Stéphane

Hi Stéphane,

Without digging into the code, I’m not surprised that the C-Move progress is not reported.
The C-Move is actually an order for another modality to perform a C-Store and I don’t think there are any mechanisms to report the progress to the C-Move initiator.

HTH,

Alain.

Hello Alain,

Thank you for your quick answer !
Seems legit if Orthanc hasn’t the ability to compute the progress. In such case, is it relevant to have a “Progress” indicator in the job ? I mean that maybe the API can “omit” this field whenever the progress can’t be computed to let the final user know that we haven’t any indication ? Do you know if there are others jobs that can encounter the same limitation ?

Thanks
Stéphane

Hello Alain,

I viewed that Orthanc doesn’t support C-Get as SCU (only as SCP). However, do you think using C-Get might help computing a progress ? Is there any plan to implement C-Get as SCU ?

Thanks
Stéphane

Hi Stéphane,

I have never really played with C-Get but as I read it in the doc, the C-Get simply triggers a C-Store inside the same TCP connection and therefore, we are back to C-Store and its lack of progress report so I’m not expecting any improvements from there.

To me, to get a progress report, the only “option” would be to perform a C-Find to list the instances that are available for transfer and then, trigger the transfer. But still, new instances might have been received by the PACS in the meantime … so it’s really not ideal.

Note that it might be better to discuss these low level topics on the DICOM users group, they sure have deeper knowledge there.

And yes, the C-Get SCU is in the TODO list with no current plan for the implementation.

Best regards,

Alain.

Hi Stéphane,

Just noticed that DCMTK provides callbacks that we could use to report progress in the future. I have added a TODO in Orthanc to look into it. Not sure it would work in all cases but it’s probably worth to try.

Best regards,

Alain

Question related to DCMTK. Is it possible to call DCMTK (the one baked into the Orthanc Build) from a Python Plug-in, either via the executable in an Osimis Docker Build or via an SDK to Orthanc ? I don’t recall seeing the executable in an OSIMIS Docker build and presumed you had to use the SDK to call the DCMTK that is packaged in Orthanc ?

Thanks.

Hi @shulard

Going back to this old thread to inform you that, while working on C-Get SCU, I have also worked on progress reporting in the DicomMoveScu jobs.

So this will be available once get-scu is integrated in a next release (don’t know yet if it will be 1.12.5 or 1.12.6).

Docker images are being built right now so a pre-release will soon be available in orthancteam/orthanc-pre-release:get-scu-unstable

Best regards,

Alain.

1 Like

That’s an awesome news, thank you for that update !

Hello @alainmazy !

Quick question - do you know what has been implemented so far on the progress piece of the job?

We have seen a regression where the progress percentage is not always reaching 100, and sometimes stays at zero (which we were relying upon in the past and had to make quick fixes after upgrading to version 1.12.9).

Curious to see if there seems to be a bug? Was progress reporting for DicomMoveScu jobs implemented recently?

Edit: looks like when performing a C-MOVE, when the progress is 0%, the data (for our case this was a series) did not get moved to the Orthanc instance. Might it be an issue with our VNA we’re trying to pull the data from?

Thank you!

Best,

Sylvain

Hi @sylvainadam

I have recently reworked the “Retrieve SCU jobs” (= C-Get or C-Move to Orthanc itself).

I have notably added more details about the DIMSE Error status and the list of received instances.

There was also an issue, at least with the C-Get jobs where it could return a success while nothing was actually received (which looks similar to what you are experiencing with C-Move).

So, before investigating any further, I thing that would be very interesting to test with the mainline binaries (I have tagged orthancteam/orthanc-pre-release:2025.11.18 that should be a good candidate).

Hope this helps,

Alain.

Hello @alainmazy !

Thank you for your feedback, we’ll test it asap and we’ll keep you informed :slight_smile:

Hello @alainmazy ! Thank you very much. I deployed the fix to some of our instances. We performed the test and it looks like we still have the same issue with a DicomMoveScu job. Status is success, it ran for 5.96 seconds but completion is at zero percent, and the series that was supposed to be moved has not been moved and isn’t in Orthanc’s database.

I know for a fact that the DICOM workstation we’re pulling from has a tendency to timeout from time to time, but Orthanc usually captures this and we can retry once we know there was a timeout.

Hi @sylvainadam & @shulard

Could you provide us with logs (ideally at trace level to clearly see what’s going on at the DICOM level) ?

Thanks,

Alain

Hello @alainmazy

Please find the dump below (I had to truncate due to the sheer size but the main events are here). Looks like indeed there is an error that may be unrelated to the C-Move job. I have seen it in the past but never got a chance to communicate this with you guys.

orthanc-1   | T1121 15:05:54.566727     DICOM-SERVER CommandDispatcher.cpp:293] (dicom) Received Association Parameters:
orthanc-1   | ====================== BEGIN A-ASSOCIATE-RQ =====================
orthanc-1   | Our Implementation Class UID:      1.2.276.0.7230010.3.0.3.6.9
orthanc-1   | Our Implementation Version Name:   OFFIS_DCMTK_369
orthanc-1   | Their Implementation Class UID:    1.2.528.1.1001.2.800.8.41.11215.12344
orthanc-1   | Their Implementation Version Name: EA8 11215.12344
orthanc-1   | Application Context Name:    1.2.840.10008.3.1.1.1
orthanc-1   | Calling Application Name:    VNA_SOURCE_AET
orthanc-1   | Called Application Name:     ORTHANC_DEST_AET
orthanc-1   | Responding Application Name:
orthanc-1   | Our Max PDU Receive Size:    16384
orthanc-1   | Their Max PDU Receive Size:  65536
orthanc-1   | Presentation Contexts:
orthanc-1   |   Context ID:        1 (Proposed)
orthanc-1   |     Abstract Syntax: =MRImageStorage
orthanc-1   |     Proposed SCP/SCU Role: Default
orthanc-1   |     Proposed Transfer Syntax(es):
orthanc-1   |       =JPEGLossless:Non-hierarchical-1stOrderPrediction
orthanc-1   |   Context ID:        3 (Proposed)
orthanc-1   |     Abstract Syntax: =MRImageStorage
orthanc-1   |     Proposed SCP/SCU Role: Default
orthanc-1   |     Proposed Transfer Syntax(es):
orthanc-1   |       =LittleEndianExplicit
orthanc-1   |   Context ID:        5 (Proposed)
orthanc-1   |     Abstract Syntax: =MRImageStorage
orthanc-1   |     Proposed SCP/SCU Role: Default
orthanc-1   |     Proposed Transfer Syntax(es):
orthanc-1   |       =LittleEndianImplicit
orthanc-1   |   Context ID:        7 (Proposed)
orthanc-1   |     Abstract Syntax: =StorageCommitmentPushModelSOPClass
orthanc-1   |     Proposed SCP/SCU Role: Default
orthanc-1   |     Proposed Transfer Syntax(es):
orthanc-1   |       =LittleEndianExplicit
orthanc-1   |       =LittleEndianImplicit
orthanc-1   | Requested Extended Negotiation: none
orthanc-1   | Accepted Extended Negotiation:  none
orthanc-1   | Requested User Identity Negotiation: none
orthanc-1   | User Identity Negotiation Response:  none
orthanc-1   | ======================= END A-ASSOCIATE-RQ ======================
orthanc-1   | I1121 15:05:54.566807     DICOM-SERVER CommandDispatcher.cpp:334] (dicom) Association Received from AET VNA_SOURCE_AET on IP 10.100.200.8
orthanc-1   | I1121 15:05:54.566979     DICOM-SERVER main.cpp:337] Incoming connection from AET VNA_SOURCE_AET on IP 10.100.200.8, calling AET ORTHANC_DEST_AET
orthanc-1   | D: Constructing Associate AC PDU
orthanc-1   | I1121 15:05:54.567148     DICOM-SERVER CommandDispatcher.cpp:675] (dicom) Association Acknowledged (Max Send PDV: 65524) to AET VNA_SOURCE_AET on IP 10.100.200.8
orthanc-1   | T1121 15:05:54.567177     DICOM-SERVER CommandDispatcher.cpp:681] (dicom) Association Acknowledged Details:
orthanc-1   | ====================== BEGIN A-ASSOCIATE-AC =====================
orthanc-1   | Our Implementation Class UID:      1.2.276.0.7230010.3.0.3.6.9
orthanc-1   | Our Implementation Version Name:   OFFIS_DCMTK_369
orthanc-1   | Their Implementation Class UID:    1.2.528.1.1001.2.800.8.41.11215.12344
orthanc-1   | Their Implementation Version Name: EA8 11215.12344
orthanc-1   | Application Context Name:    1.2.840.10008.3.1.1.1
orthanc-1   | Calling Application Name:    VNA_SOURCE_AET
orthanc-1   | Called Application Name:     ORTHANC_DEST_AET
orthanc-1   | Responding Application Name: ORTHANC_DEST_AET
orthanc-1   | Our Max PDU Receive Size:    16384
orthanc-1   | Their Max PDU Receive Size:  65536
orthanc-1   | Presentation Contexts:
orthanc-1   |   Context ID:        1 (Accepted)
orthanc-1   |     Abstract Syntax: =MRImageStorage
orthanc-1   |     Proposed SCP/SCU Role: Default
orthanc-1   |     Accepted SCP/SCU Role: Default
orthanc-1   |     Accepted Transfer Syntax: =JPEGLossless:Non-hierarchical-1stOrderPrediction
orthanc-1   |   Context ID:        3 (Accepted)
orthanc-1   |     Abstract Syntax: =MRImageStorage
orthanc-1   |     Proposed SCP/SCU Role: Default
orthanc-1   |     Accepted SCP/SCU Role: Default
orthanc-1   |     Accepted Transfer Syntax: =LittleEndianExplicit
orthanc-1   |   Context ID:        5 (Accepted)
orthanc-1   |     Abstract Syntax: =MRImageStorage
orthanc-1   |     Proposed SCP/SCU Role: Default
orthanc-1   |     Accepted SCP/SCU Role: Default
orthanc-1   |     Accepted Transfer Syntax: =LittleEndianImplicit
orthanc-1   |   Context ID:        7 (Accepted)
orthanc-1   |     Abstract Syntax: =StorageCommitmentPushModelSOPClass
orthanc-1   |     Proposed SCP/SCU Role: Default
orthanc-1   |     Accepted SCP/SCU Role: SCP/SCU
orthanc-1   |     Accepted Transfer Syntax: =LittleEndianExplicit
orthanc-1   | Requested Extended Negotiation: none
orthanc-1   | Accepted Extended Negotiation:  none
orthanc-1   | Requested User Identity Negotiation: none
orthanc-1   | User Identity Negotiation Response:  none
orthanc-1   | ======================= END A-ASSOCIATE-AC ======================
orthanc-1   | T1121 15:05:54.571090          DICOM-2 CommandDispatcher.cpp:769] (dicom) Received Command:
orthanc-1   | ===================== INCOMING DIMSE MESSAGE ====================
orthanc-1   | Message Type                  : C-STORE RQ
orthanc-1   | Presentation Context ID       : 1
orthanc-1   | Message ID                    : 51737
orthanc-1   | Affected SOP Class UID        : MRImageStorage
orthanc-1   | Affected SOP Instance UID     : 1.2.840.1139.2.541.9403444.97648.187151.8152
orthanc-1   | Data Set                      : present
orthanc-1   | Priority                      : medium
orthanc-1   | Move Originator AE Title      : ORTHANC_DEST_AET
orthanc-1   | Move Originator ID            : 1001
orthanc-1   | ======================= END DIMSE MESSAGE =======================
orthanc-1   | I1121 15:05:54.571132          DICOM-2 main.cpp:372] Incoming Store request from AET VNA_SOURCE_AET on IP 10.100.200.8, calling AET ORTHANC_DEST_AET
orthanc-1   | I1121 15:05:54.575411          DICOM-2 FilesystemStorage.cpp:128] Creating attachment "e1663de8-8edf-4138-969e-b0eae24f7af6" of "DICOM" type
orthanc-1   | I1121 15:05:54.578640          DICOM-2 FilesystemStorage.cpp:176] Created attachment "e1663de8-8edf-4138-969e-b0eae24f7af6" (201.27KB in 3.25ms = 506.85Mbps)
orthanc-1   | T1121 15:05:54.579104          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.583366          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.584209          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.584315          DICOM-2 ServerIndex.cpp:169] Change related to resource 148de902-38740a18-4ea4f2f9-d2594708-bbc641f7 of type Instance: NewInstance
orthanc-1   | T1121 15:05:54.584733          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.584827          DICOM-2 ServerIndex.cpp:169] Change related to resource c25c4bf9-bd453406-6e8249f7-b50b7f0c-758eb2dd of type Series: NewSeries
orthanc-1   | T1121 15:05:54.585063          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.585159          DICOM-2 ServerIndex.cpp:169] Change related to resource f50bd63e-cd0262ac-1252b557-9d9ae51e-faa44969 of type Study: NewStudy
orthanc-1   | T1121 15:05:54.585389          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.585480          DICOM-2 ServerIndex.cpp:169] Change related to resource 5569eb8d-edb131a0-578f92f8-a6e22380-4b3fa1b9 of type Patient: NewPatient
orthanc-1   | T1121 15:05:54.585974          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.586772          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
database-1  | 2025-11-21 15:05:54.590 UTC [11959] ERROR:  duplicate key value violates unique constraint "maindicomtags_pkey"
database-1  | 2025-11-21 15:05:54.590 UTC [11959] DETAIL:  Key (id, taggroup, tagelement)=(278316, 8, 513) already exists.
database-1  | 2025-11-21 15:05:54.590 UTC [11959] STATEMENT:  INSERT INTO MainDicomTags VALUES ($1, $2, $3, $4), ($5, $6, $7, $8), ($9, $10, $11, $12), ($13, $14, $15, $16), ($17, $18, $19, $20), ($21, $22, $23, $24), ($25, $26, $27, $28), ($29, $30, $31, $32), ($33, $34, $35, $36), ($37, $38, $39, $40), ($41, $42, $43, $44), ($45, $46, $47, $48), ($49, $50, $51, $52), ($53, $54, $55, $56), ($57, $58, $59, $60), ($61, $62, $63, $64), ($65, $66, $67, $68), ($69, $70, $71, $72), ($73, $74, $75, $76), ($77, $78, $79, $80), ($81, $82, $83, $84), ($85, $86, $87, $88), ($89, $90, $91, $92), ($93, $94, $95, $96), ($97, $98, $99, $100), ($101, $102, $103, $104), ($105, $106, $107, $108), ($109, $110, $111, $112), ($113, $114, $115, $116), ($117, $118, $119, $120), ($121, $122, $123, $124), ($125, $126, $127, $128), ($129, $130, $131, $132), ($133, $134, $135, $136), ($137, $138, $139, $140), ($141, $142, $143, $144), ($145, $146, $147, $148), ($149, $150, $151, $152), ($153, $154, $155, $156), ($157, $158, $159, $160), ($161, $162, $163, $164), ($165, $166, $167, $168), ($169, $170, $171, $172), ($173, $174, $175, $176), ($177, $178, $179, $180), ($181, $182, $183, $184), ($185, $186, $187, $188), ($189, $190, $191, $192), ($193, $194, $195, $196), ($197, $198, $199, $200), ($201, $202, $203, $204), ($205, $206, $207, $208), ($209, $210, $211, $212), ($213, $214, $215, $216), ($217, $218, $219, $220), ($221, $222, $223, $224), ($225, $226, $227, $228), ($229, $230, $231, $232), ($233, $234, $235, $236), ($237, $238, $239, $240), ($241, $242, $243, $244)
orthanc-1   | W1121 15:05:54.591131          DICOM-2 postgresql-index:/DatabaseBackendAdapterV4.cpp:1483] An SQL transaction failed and will likely be retried: ERROR:  duplicate key value violates unique constraint "maindicomtags_pkey"
orthanc-1   | DETAIL:  Key (id, taggroup, tagelement)=(278316, 8, 513) already exists.
orthanc-1   |
orthanc-1   | T1121 15:05:54.591366          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.591474          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.726913          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.730225          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.730967          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.731072          DICOM-2 ServerIndex.cpp:169] Change related to resource 148de902-38740a18-4ea4f2f9-d2594708-bbc641f7 of type Instance: NewInstance
orthanc-1   | T1121 15:05:54.731343          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.731440          DICOM-2 ServerIndex.cpp:169] Change related to resource c25c4bf9-bd453406-6e8249f7-b50b7f0c-758eb2dd of type Series: NewSeries
orthanc-1   | T1121 15:05:54.731673          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.731770          DICOM-2 ServerIndex.cpp:169] Change related to resource f50bd63e-cd0262ac-1252b557-9d9ae51e-faa44969 of type Study: NewStudy
orthanc-1   | T1121 15:05:54.732010          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.732110          DICOM-2 ServerIndex.cpp:169] Change related to resource 5569eb8d-edb131a0-578f92f8-a6e22380-4b3fa1b9 of type Patient: NewPatient
orthanc-1   | T1121 15:05:54.732630          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.733378          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
database-1  | 2025-11-21 15:05:54.736 UTC [11960] ERROR:  duplicate key value violates unique constraint "maindicomtags_pkey"
database-1  | 2025-11-21 15:05:54.736 UTC [11960] DETAIL:  Key (id, taggroup, tagelement)=(278320, 8, 513) already exists.
database-1  | 2025-11-21 15:05:54.736 UTC [11960] STATEMENT:  INSERT INTO MainDicomTags VALUES ($1, $2, $3, $4), ($5, $6, $7, $8), ($9, $10, $11, $12), ($13, $14, $15, $16), ($17, $18, $19, $20), ($21, $22, $23, $24), ($25, $26, $27, $28), ($29, $30, $31, $32), ($33, $34, $35, $36), ($37, $38, $39, $40), ($41, $42, $43, $44), ($45, $46, $47, $48), ($49, $50, $51, $52), ($53, $54, $55, $56), ($57, $58, $59, $60), ($61, $62, $63, $64), ($65, $66, $67, $68), ($69, $70, $71, $72), ($73, $74, $75, $76), ($77, $78, $79, $80), ($81, $82, $83, $84), ($85, $86, $87, $88), ($89, $90, $91, $92), ($93, $94, $95, $96), ($97, $98, $99, $100), ($101, $102, $103, $104), ($105, $106, $107, $108), ($109, $110, $111, $112), ($113, $114, $115, $116), ($117, $118, $119, $120), ($121, $122, $123, $124), ($125, $126, $127, $128), ($129, $130, $131, $132), ($133, $134, $135, $136), ($137, $138, $139, $140), ($141, $142, $143, $144), ($145, $146, $147, $148), ($149, $150, $151, $152), ($153, $154, $155, $156), ($157, $158, $159, $160), ($161, $162, $163, $164), ($165, $166, $167, $168), ($169, $170, $171, $172), ($173, $174, $175, $176), ($177, $178, $179, $180), ($181, $182, $183, $184), ($185, $186, $187, $188), ($189, $190, $191, $192), ($193, $194, $195, $196), ($197, $198, $199, $200), ($201, $202, $203, $204), ($205, $206, $207, $208), ($209, $210, $211, $212), ($213, $214, $215, $216), ($217, $218, $219, $220), ($221, $222, $223, $224), ($225, $226, $227, $228), ($229, $230, $231, $232), ($233, $234, $235, $236), ($237, $238, $239, $240), ($241, $242, $243, $244)
orthanc-1   | W1121 15:05:54.737198          DICOM-2 postgresql-index:/DatabaseBackendAdapterV4.cpp:1483] An SQL transaction failed and will likely be retried: ERROR:  duplicate key value violates unique constraint "maindicomtags_pkey"
orthanc-1   | DETAIL:  Key (id, taggroup, tagelement)=(278320, 8, 513) already exists.
orthanc-1   |
orthanc-1   | T1121 15:05:54.737350          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.737454          DICOM-2 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.785925  DB HOUSEKEEPING OrthancPlugins.cpp:6299] (plugins) Calling service 31 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:05:54.873719          HTTP-16 HttpServer.cpp:1238] (http) HTTP header: [host]: [10.100.120.10:8042]
orthanc-1   | T1121 15:05:54.873756          HTTP-16 HttpServer.cpp:1238] (http) HTTP header: [authorization]: [Basic c2hlcmxvY2s6c2hlcmxvY2tPcnRoYW5j]
orthanc-1   | T1121 15:05:54.873769          HTTP-16 HttpServer.cpp:1238] (http) HTTP header: [content-type]: [application/json]
orthanc-1   | T1121 15:05:54.873780          HTTP-16 HttpServer.cpp:1238] (http) HTTP header: [expect]: []
orthanc-1   | T1121 15:05:54.873791          HTTP-16 HttpServer.cpp:1238] (http) HTTP header: [baggage]: [sentry-trace_id=5a7c1ec3dd7749c491bb81ff01b41b00,sentry-sample_rand=0.817942,sentry-public_key=aa11131740d4e6da50ca989a28e52500,sentry-release=v1.8.0,sentry-environment=prod]
orthanc-1   | T1121 15:05:54.873803          HTTP-16 HttpServer.cpp:1238] (http) HTTP header: [sentry-trace]: [5a7c1ec3dd7749c491bb81ff01b41b00-09a793611bab475b]
orthanc-1   | T1121 15:05:54.873815          HTTP-16 HttpServer.cpp:1238] (http) HTTP header: [accept]: [*/*]
orthanc-1   | T1121 15:05:54.873829          HTTP-16 HttpServer.cpp:1238] (http) HTTP header: [user-agent]: [Symfony HttpClient (Curl)]
orthanc-1   | T1121 15:05:54.873841          HTTP-16 HttpServer.cpp:1238] (http) HTTP header: [accept-encoding]: [gzip]
orthanc-1   | T1121 15:05:54.873852          HTTP-16 HttpServer.cpp:1238] (http) HTTP header: [content-length]: [181]
orthanc-1   | I1121 15:05:54.873874          HTTP-16 Toolbox.cpp:2782] (http) POST /modalities/RESEARCH-STUDY-1fab02e6/query
orthanc-1   | I1121 15:05:54.875111          HTTP-16 DicomAssociation.cpp:272] (dicom) Opening a DICOM SCU connection without DICOM TLS from AET "ORTHANC_DEST_AET" to AET "VNA_SOURCE_AET" on host 10.100.200.8:104 (manufacturer: Generic, timeout: 60s)
orthanc-1   | T1121 15:05:54.875167          HTTP-16 DicomAssociation.cpp:370] (dicom) Request Parameters:

[...]

orthanc-1   |
orthanc-1   | T1121 15:06:00.762820          DICOM-1 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:06:00.762925          DICOM-1 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | E1121 15:06:00.763022          DICOM-1 StatelessDatabaseOperations.cpp:489] Maximum transactions retries reached
orthanc-1   | E1121 15:06:00.763046          DICOM-1 ServerContext.cpp:801] Unexpected error while storing an instance in DB, cancelling and deleting the attachments:
orthanc-1   | I1121 15:06:00.763104          DICOM-1 FilesystemStorage.cpp:290] Deleting attachment "42889455-45d1-4930-bf25-77b209de4e8c" of type 1
orthanc-1   | E1121 15:06:00.763690          DICOM-1 StoreScp.cpp:199] Exception while storing DICOM: Database could not serialize access due to concurrent update, the transaction should be retried
orthanc-1   | T1121 15:06:00.769299    JOBS-WORKER-1 DicomControlUserConnection.cpp:500] (dicom) Received Final Move Response:
orthanc-1   | ===================== INCOMING DIMSE MESSAGE ====================
orthanc-1   | Message Type                  : C-MOVE RSP
orthanc-1   | Message ID Being Responded To : 1002
orthanc-1   | Affected SOP Class UID        : none
orthanc-1   | Remaining Suboperations       : none
orthanc-1   | Completed Suboperations       : 0
orthanc-1   | Failed Suboperations          : 0
orthanc-1   | Warning Suboperations         : 0
orthanc-1   | Data Set                      : none
orthanc-1   | DIMSE Status                  : 0x0000: Success: Sub-operations complete - No failures or warnings
orthanc-1   | ======================= END DIMSE MESSAGE =======================
orthanc-1   | I1121 15:06:00.769359    JOBS-WORKER-1 DicomAssociation.cpp:112] (dicom) Closing DICOM association
orthanc-1   | I1121 15:06:00.770079    JOBS-WORKER-1 JobsRegistry.cpp:540] Job has completed with success: 176bf991-84a2-4f43-a411-e3d1527517e2
orthanc-1   | T1121 15:06:00.774800        SAVE-JOBS ServerContext.cpp:326] Serializing the content of the jobs engine
orthanc-1   | T1121 15:06:00.775564        SAVE-JOBS OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:06:00.776933        SAVE-JOBS OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:06:00.777804        SAVE-JOBS OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:06:00.777914        SAVE-JOBS OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:06:00.800803  DB HOUSEKEEPING OrthancPlugins.cpp:6299] (plugins) Calling service 31 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:06:00.977674          DICOM-0 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:06:00.981419          DICOM-0 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:06:00.982548          DICOM-0 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:06:00.982649          DICOM-0 ServerIndex.cpp:169] Change related to resource c75e6f04-5f1d64e9-91b4c2e8-3633db37-46a0a2f1 of type Instance: NewInstance
orthanc-1   | T1121 15:06:00.983105          DICOM-0 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:06:00.983197          DICOM-0 ServerIndex.cpp:169] Change related to resource 019c8e78-b271029a-a4c04b3f-dccba38e-e7090e34 of type Series: NewSeries
orthanc-1   | T1121 15:06:00.983463          DICOM-0 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:06:00.983588          DICOM-0 ServerIndex.cpp:169] Change related to resource f50bd63e-cd0262ac-1252b557-9d9ae51e-faa44969 of type Study: NewStudy
orthanc-1   | T1121 15:06:00.983951          DICOM-0 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:06:00.984087          DICOM-0 ServerIndex.cpp:169] Change related to resource 5569eb8d-edb131a0-578f92f8-a6e22380-4b3fa1b9 of type Patient: NewPatient
orthanc-1   | T1121 15:06:00.984718          DICOM-0 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:06:00.985649          DICOM-0 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
database-1  | 2025-11-21 15:06:00.988 UTC [11954] ERROR:  duplicate key value violates unique constraint "maindicomtags_pkey"
database-1  | 2025-11-21 15:06:00.988 UTC [11954] DETAIL:  Key (id, taggroup, tagelement)=(278444, 8, 513) already exists.
database-1  | 2025-11-21 15:06:00.988 UTC [11954] STATEMENT:  INSERT INTO MainDicomTags VALUES ($1, $2, $3, $4), ($5, $6, $7, $8), ($9, $10, $11, $12), ($13, $14, $15, $16), ($17, $18, $19, $20), ($21, $22, $23, $24), ($25, $26, $27, $28), ($29, $30, $31, $32), ($33, $34, $35, $36), ($37, $38, $39, $40), ($41, $42, $43, $44), ($45, $46, $47, $48), ($49, $50, $51, $52), ($53, $54, $55, $56), ($57, $58, $59, $60), ($61, $62, $63, $64), ($65, $66, $67, $68), ($69, $70, $71, $72), ($73, $74, $75, $76), ($77, $78, $79, $80), ($81, $82, $83, $84), ($85, $86, $87, $88), ($89, $90, $91, $92), ($93, $94, $95, $96), ($97, $98, $99, $100), ($101, $102, $103, $104), ($105, $106, $107, $108), ($109, $110, $111, $112), ($113, $114, $115, $116), ($117, $118, $119, $120), ($121, $122, $123, $124), ($125, $126, $127, $128), ($129, $130, $131, $132), ($133, $134, $135, $136), ($137, $138, $139, $140), ($141, $142, $143, $144), ($145, $146, $147, $148), ($149, $150, $151, $152), ($153, $154, $155, $156), ($157, $158, $159, $160), ($161, $162, $163, $164), ($165, $166, $167, $168), ($169, $170, $171, $172), ($173, $174, $175, $176), ($177, $178, $179, $180), ($181, $182, $183, $184), ($185, $186, $187, $188), ($189, $190, $191, $192), ($193, $194, $195, $196), ($197, $198, $199, $200), ($201, $202, $203, $204), ($205, $206, $207, $208), ($209, $210, $211, $212), ($213, $214, $215, $216), ($217, $218, $219, $220), ($221, $222, $223, $224), ($225, $226, $227, $228), ($229, $230, $231, $232), ($233, $234, $235, $236), ($237, $238, $239, $240), ($241, $242, $243, $244)
orthanc-1   | W1121 15:06:00.989119          DICOM-0 postgresql-index:/DatabaseBackendAdapterV4.cpp:1483] An SQL transaction failed and will likely be retried: ERROR:  duplicate key value violates unique constraint "maindicomtags_pkey"
orthanc-1   | DETAIL:  Key (id, taggroup, tagelement)=(278444, 8, 513) already exists.
orthanc-1   |
orthanc-1   | T1121 15:06:00.989311          DICOM-0 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | T1121 15:06:00.989433          DICOM-0 OrthancPlugins.cpp:6299] (plugins) Calling service 40 from plugin "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
orthanc-1   | E1121 15:06:00.989538          DICOM-0 StatelessDatabaseOperations.cpp:489] Maximum transactions retries reached
orthanc-1   | E1121 15:06:00.989580          DICOM-0 ServerContext.cpp:801] Unexpected error while storing an instance in DB, cancelling and deleting the attachments:
orthanc-1   | I1121 15:06:00.989702          DICOM-0 FilesystemStorage.cpp:290] Deleting attachment "5862e600-6c63-4c57-9db4-ebd30748f992" of type 1
orthanc-1   | E1121 15:06:00.990252          DICOM-0 StoreScp.cpp:199] Exception while storing DICOM: Database could not serialize access due to concurrent update, the transaction should be retried
orthanc-1   | I1121 15:06:00.990859          DICOM-0 CommandDispatcher.cpp:940] (dicom) Finishing association with AET VNA_SOURCE_AET on IP 10.100.200.8: DUL Peer Requested Release
orthanc-1   | I1121 15:06:00.990883          DICOM-0 CommandDispatcher.cpp:948] (dicom) Association Release with AET VNA_SOURCE_AET on IP 10.100.200.8
orthanc-1   | T1121 15:06:00.995804    JOBS-WORKER-2 DicomControlUserConnection.cpp:500] (dicom) Received Final Move Response:
orthanc-1   | ===================== INCOMING DIMSE MESSAGE ====================
orthanc-1   | Message Type                  : C-MOVE RSP
orthanc-1   | Message ID Being Responded To : 1003
orthanc-1   | Affected SOP Class UID        : none
orthanc-1   | Remaining Suboperations       : none
orthanc-1   | Completed Suboperations       : 0
orthanc-1   | Failed Suboperations          : 0
orthanc-1   | Warning Suboperations         : 0
orthanc-1   | Data Set                      : none
orthanc-1   | DIMSE Status                  : 0x0000: Success: Sub-operations complete - No failures or warnings
orthanc-1   | ======================= END DIMSE MESSAGE =======================
orthanc-1   | I1121 15:06:00.995855    JOBS-WORKER-2 DicomAssociation.cpp:112] (dicom) Closing DICOM association
orthanc-1   | I1121 15:06:00.996482    JOBS-WORKER-2 JobsRegistry.cpp:540] Job has completed with success: c2e1e197-e7dc-4b6e-be40-7b9973065222

Here is our configuration that’s optimized for fast DICOMweb exchanges for visualization purposes:

{
  "StorageDirectory": "/var/lib/orthanc/db",
  "StorageCompression": false,
  "ConcurrentJobs": 4,
  "HttpCompressionEnabled": true,
  "WebDavEnabled": false,
  "DicomPort": 104,
  "RemoteAccessAllowed": true,
  "AuthenticationEnabled": false,
  "DicomModalitiesInDatabase": true,
  "DicomScuTimeout": 60,
  "OrthancPeersInDatabase": true,
  "HttpTimeout": 120,
  "SynchronousCMove": false,
  "JobsHistorySize": 200,
  "MediaArchiveSize": 4,
  "StorageAccessOnFind": "Never",
  "HttpRequestTimeout": 60,
  "IngestTranscoding": "1.2.840.10008.1.2.4.70",
  "DeidentifyLogs": false,
  "DatabaseServerIdentifier": "orthanc-dest",
  "ExtraMainDicomTags": {
    "Instance": [
      "BitsAllocated",
      "BitsStored",
      "Columns",
      "ContentDate",
      "ContentTime",
      "CurrentPatientLocation",
      "FrameOfReferenceUID",
      "ImagerPixelSpacing",
      "ImageType",
      "IssuerOfPatientID",
      "PerformedProcedureStepStartDate",
      "PerformedProcedureStepStartTime",
      "PhotometricInterpretation",
      "PixelRepresentation",
      "PixelSpacing",
      "ReferencedSOPClassUID",
      "ReferencedSOPInstanceUID",
      "RequestAttributesSequence",
      "RescaleIntercept",
      "RescaleSlope",
      "Rows",
      "SliceLocation",
      "SliceThickness",
      "SOPClassUID",
      "SpecificCharacterSet",
      "TimezoneOffsetFromUTC",
      "WindowCenter",
      "WindowWidth"
    ],
    "Patient": [
      "TimezoneOffsetFromUTC"
    ]
  }
}

I wonder if the extra DICOM tags are at play here given the error we see in there.

database-1  | 2025-11-21 15:05:54.590 UTC [11959] ERROR:  duplicate key value violates unique constraint "maindicomtags_pkey"
database-1  | 2025-11-21 15:05:54.590 UTC [11959] DETAIL:  Key (id, taggroup, tagelement)=(278316, 8, 513) already exists.
database-1  | 2025-11-21 15:05:54.590 UTC [11959] STATEMENT:  INSERT INTO MainDicomTags VALUES ($1, $2, $3, $4), ($5, $6, $7, $8), ($9, $10, $11, $12), ($13, $14, $15, $16), ($17, $18, $19, $20), ($21, $22, $23, $24), ($25, $26, $27, $28), ($29, $30, $31, $32), ($33, $34, $35, $36), ($37, $38, $39, $40), ($41, $42, $43, $44), ($45, $46, $47, $48), ($49, $50, $51, $52), ($53, $54, $55, $56), ($57, $58, $59, $60), ($61, $62, $63, $64), ($65, $66, $67, $68), ($69, $70, $71, $72), ($73, $74, $75, $76), ($77, $78, $79, $80), ($81, $82, $83, $84), ($85, $86, $87, $88), ($89, $90, $91, $92), ($93, $94, $95, $96), ($97, $98, $99, $100), ($101, $102, $103, $104), ($105, $106, $107, $108), ($109, $110, $111, $112), ($113, $114, $115, $116), ($117, $118, $119, $120), ($121, $122, $123, $124), ($125, $126, $127, $128), ($129, $130, $131, $132), ($133, $134, $135, $136), ($137, $138, $139, $140), ($141, $142, $143, $144), ($145, $146, $147, $148), ($149, $150, $151, $152), ($153, $154, $155, $156), ($157, $158, $159, $160), ($161, $162, $163, $164), ($165, $166, $167, $168), ($169, $170, $171, $172), ($173, $174, $175, $176), ($177, $178, $179, $180), ($181, $182, $183, $184), ($185, $186, $187, $188), ($189, $190, $191, $192), ($193, $194, $195, $196), ($197, $198, $199, $200), ($201, $202, $203, $204), ($205, $206, $207, $208), ($209, $210, $211, $212), ($213, $214, $215, $216), ($217, $218, $219, $220), ($221, $222, $223, $224), ($225, $226, $227, $228), ($229, $230, $231, $232), ($233, $234, $235, $236), ($237, $238, $239, $240), ($241, $242, $243, $244)
orthanc-1   | W1121 15:05:54.591131          DICOM-2 postgresql-index:/DatabaseBackendAdapterV4.cpp:1483] An SQL transaction failed and will likely be retried: ERROR:  duplicate key value violates unique constraint "maindicomtags_pkey"
orthanc-1   | DETAIL:  Key (id, taggroup, tagelement)=(278316, 8, 513) already exists.

Thank you!

Hello !

Also some questions based on what we saw in the logs.

There are mentions of sentry in some traces, is there a Sentry.io hidden somewhere ? That would help catching some errors in production…

Also regarding the log format, we saw that the time isn’t using the same format in all places. Sometimes we have the day, sometimes only the time… That’s not a big deal but we are working to build a log aggregation for the production infrastructure and normalizing the logs could help.

I can open another thread to discuss those elements if it’s better :smiley:.

Hi @sylvainadam

Looks like there is a duplicate insertion of the TimezoneOffsetFromUTC.
Since 1.12.5, the TimezoneOffsetFromUTC is now in the default main dicomtags at study and series level and you are adding it at instance and patient level too. Since some of the patient tags are copied at study level, maybe that’s the reason of the failure …

Could you repeat your test by removing alternatively TimezoneOffsetFromUTC from the patient level and the instance level ExtraMainDicomTags so we can try to, hopefully, isolate the culprit ?

Hope this helps,

Alain

Hi @shulard

The sentry entries are part of the HTTP headers so they are probably added by “something” on top of Orthanc, not Orthanc itself.

For the format, there is a difference between the format from the PostgreSQL container vs Orthanc container but, inside Orthanc logs, I’m not expecting to have different formats. Can you check ?

And, yes, if this side conversation needs to go on, let’s move it to another topic.

Best,

Alain.

Ah, good catch @alainmazy ! Looks like this was overlooked during our upgrades…

I removed it from the Patient level but it didn’t seem to change the error, I then removed it from the Instance level (as well, didn’t try with the Patient level left on) and it now works!

Would it make sense to check and output a warning or simply ignore the DICOM tags that already exist in the Main Dicom Tags in the future?

Thanks a bunch for your support, much appreciated as always!

PS: I confirm I had to remove both entries from Instance and Patient.

I just have an extra question, since I’m a little confused regarding the level of tags where these were configured. For our instance, it was configured at the Instance and Patient level.

When I read the 1.12.5 release notes or the link you sent, the tags exist at the Study and Series level, but not at the Patient or Instance level as we had it configured.

Is this regardless an expected behavior?

I haven’t seen any errors, but we also have, at the instance level, the following tags configured:

  • PerformedProcedureStepStartDate
  • PerformedProcedureStepStartTime
  • RequestAttributesSequence

Since they were at the instance level, I never thought of removing them but given what we saw with the TimezoneOffsetFromUTC tags, I wonder how it might affect Orthanc.