Bug 137 - C-STORE fails for unknown SOP Class although server is configured to accept any
Summary: C-STORE fails for unknown SOP Class although server is configured to accept any
Status: RESOLVED FIXED
Alias: None
Product: Orthanc
Classification: Unclassified
Component: Orthanc Core (show other bugs)
Version: unspecified
Hardware: All All
: --- normal
Assignee: Sébastien Jodogne
URL:
Depends on:
Blocks:
 
Reported: 2020-06-29 15:15 CEST by Sébastien Jodogne
Modified: 2020-06-29 15:25 CEST (History)
0 users

See Also:


Attachments
766191774-2019-03-12_08-38-17.png (81.20 KB, image/png)
2020-06-29 15:15 CEST, Sébastien Jodogne
Details
stl.dcm (954 bytes, application/dicom)
2020-06-29 15:17 CEST, Sébastien Jodogne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien Jodogne 2020-06-29 15:15:24 CEST
[BitBucket user: Harald Köstinger]
[BitBucket date: 2019-03-12.07:51:07]

Hello,

I just updated to Orthanc server 1.5.5 by using the contents of package 19.2.2 from the installers. Contents are:

```
#!java
Content of the package 19.2.2
-----------------------------

Orthanc server                        1.5.5
Osimis Web viewer plugin              1.2.0
Modality worklists plugin             1.5.5
Serve folders plugin                  1.5.5
Orthanc Web viewer plugin             2.4
DICOMweb plugin                       0.5
PostgreSQL plugin                     3.1
MySQL plugin                          2.0
WSI Web viewer plugin                 0.5
```

I am dealing with custom DICOM files, which have "private" SOP classes assigned, e.g. "Encapsulated STL storage". I want Orthanc to accept those files. In the older version of package 18.9.3 with Orthanc 1.4.2 integrated, I could enable this by using the "UnknownSopClassAccepted" switch in the configuration file.

```
#!java
  // Whether Orthanc accepts to act as C-Store SCP for unknown storage
  // SOP classes (aka. "promiscuous mode")
  "UnknownSopClassAccepted"            : true,
```

However, on the new server, this does not seem to work anymore. Although having this enabled, Orthanc is rejecting my file on upload through a C-Store. On the web UI however, I can upload the file and even browse it afterwards, but not C-Find it anymore (see #136)

![2019-03-12_08-38-17.png](766191774-2019-03-12_08-38-17.png)

Is this configuration option gone or not working anymore?

Kind regards,
Harald
Comment 1 Sébastien Jodogne 2020-06-29 15:15:26 CEST
Created attachment 10 [details]
766191774-2019-03-12_08-38-17.png
Comment 2 Sébastien Jodogne 2020-06-29 15:17:45 CEST
Created attachment 53 [details]
stl.dcm
Comment 3 Sébastien Jodogne 2020-06-29 15:25:08 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2019-03-12.08:09:49]

First of all, please use the latest version of Docker image by Osimis, that is "osimis/orthanc:19.3.2".
https://hub.docker.com/r/osimis/orthanc/tags

If this does not solve the issue, please provide a sample DICOM file so that we can reproduce your problem.
Comment 4 Sébastien Jodogne 2020-06-29 15:25:10 CEST
[BitBucket user: Harald Köstinger]
[BitBucket date: 2019-03-12.08:16:26]

I tried to download the latest version 19.3.2 of the installer with Orthanc 1.5.6 integrated from https://www.orthanc-server.com/download-windows.php already several times, but did not receive any download link so far. Haven't thought about the Docker image though. Will give that a try.
Comment 5 Sébastien Jodogne 2020-06-29 15:25:11 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2019-03-12.08:23:00]

Just manually forwarded you the download e-mail that the Orthanc web site sent to you earlier this morning.
Comment 6 Sébastien Jodogne 2020-06-29 15:25:12 CEST
[BitBucket user: Harald Köstinger]
[BitBucket date: 2019-03-12.09:39:49]

Thank you for the download link. I could not use Docker btw, as it is a Linux image and I did not want to set-up a new Linux env. Have Docker for Windows so far.

Nevertheless, I gave the new version of package 19.3.2 with Orthanc 1.5.6 a try ... still the same behavior.
I double-checked the configuration and restarted the service several times. Does not work. 
Still, on the web UI I can upload the file though.
Comment 7 Sébastien Jodogne 2020-06-29 15:25:13 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2019-03-12.10:04:06]

As written above, please provide a sample DICOM file.
Comment 8 Sébastien Jodogne 2020-06-29 15:25:15 CEST
[BitBucket user: Harald Köstinger]
[BitBucket date: 2019-03-12.12:18:56]

STL DICOM file (which is actually a known SOP class by now)

See http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_b.5.html for SOP Class "Encapsulated STL Storage" with UID "1.2.840.10008.5.1.4.1.1.104.3" and its IOD in http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_A.85.html#sect_A.85.1

Upload was tried using storescu from dcmtk 3.6.4 with

```
#!python
storescu PEER PORT -v -aet INNOFORCE88 -aec ORTHANC -d -xf storescu.cfg p: Default c:\stl.dcm
```

You need to add the presentation context in the config though. (I just did so as 7th context and commented all the others)

```
#!python
PresentationContext7 = EncapsulatedSTLStorage\Uncompressed
```

Output from the toolkit storescu


```
#!python

D: $dcmtk: storescu v3.6.4 2018-11-29 $
D:
I: checking input files ...
D: Request Parameters:
D: ====================== BEGIN A-ASSOCIATE-RQ =====================
D: Our Implementation Class UID:      1.2.276.0.7230010.3.0.3.6.4
D: Our Implementation Version Name:   OFFIS_DCMTK_364
D: Their Implementation Class UID:
D: Their Implementation Version Name:
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    INNOFORCE88
D: Called Application Name:     ORTHANC
D: Responding Application Name: ORTHANC
D: Our Max PDU Receive Size:    16384
D: Their Max PDU Receive Size:  0
D: Presentation Contexts:
D:   Context ID:        1 (Proposed)
D:     Abstract Syntax: =ComputedRadiographyImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =JPEGBaseline
D:   Context ID:        3 (Proposed)
D:     Abstract Syntax: =ComputedRadiographyImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =JPEGLossless:Non-hierarchical-1stOrderPrediction
D:   Context ID:        5 (Proposed)
D:     Abstract Syntax: =ComputedRadiographyImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =LittleEndianExplicit
D:       =BigEndianExplicit
D:       =LittleEndianImplicit
D:   Context ID:        7 (Proposed)
D:     Abstract Syntax: =CTImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =JPEGBaseline
D:   Context ID:        9 (Proposed)
D:     Abstract Syntax: =CTImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =JPEGLossless:Non-hierarchical-1stOrderPrediction
D:   Context ID:        11 (Proposed)
D:     Abstract Syntax: =CTImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =LittleEndianExplicit
D:       =BigEndianExplicit
D:       =LittleEndianImplicit
D:   Context ID:        13 (Proposed)
D:     Abstract Syntax: =EncapsulatedSTLStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =LittleEndianExplicit
D:       =BigEndianExplicit
D:       =LittleEndianImplicit
D: Requested Extended Negotiation: none
D: Accepted Extended Negotiation:  none
D: Requested User Identity Negotiation: none
D: User Identity Negotiation Response:  none
D: ======================= END A-ASSOCIATE-RQ ======================
I: Requesting Association
D: setting network send timeout to 60 seconds
D: setting network receive timeout to 60 seconds
D: Constructing Associate RQ PDU
D: PDU Type: Associate Accept, PDU Length: 382 + 6 bytes PDU header
D:   02  00  00  00  01  7e  00  01  00  00  4f  52  54  48  41  4e
D:   43  20  20  20  20  20  20  20  20  20  49  4e  4e  4f  46  4f
D:   52  43  45  38  38  20  20  20  20  20  00  00  00  00  00  00
D:   00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
D:   00  00  00  00  00  00  00  00  00  00  10  00  00  15  31  2e
D:   32  2e  38  34  30  2e  31  30  30  30  38  2e  33  2e  31  2e
D:   31  2e  31  21  00  00  1e  01  00  00  00  40  00  00  16  31
D:   2e  32  2e  38  34  30  2e  31  30  30  30  38  2e  31  2e  32
D:   2e  34  2e  35  30  21  00  00  1e  03  00  00  00  40  00  00
D:   16  31  2e  32  2e  38  34  30  2e  31  30  30  30  38  2e  31
D:   2e  32  2e  34  2e  37  30  21  00  00  1b  05  00  00  00  40
D:   00  00  13  31  2e  32  2e  38  34  30  2e  31  30  30  30  38
D:   2e  31  2e  32  2e  31  21  00  00  1e  07  00  00  00  40  00
D:   00  16  31  2e  32  2e  38  34  30  2e  31  30  30  30  38  2e
D:   31  2e  32  2e  34  2e  35  30  21  00  00  1e  09  00  00  00
D:   40  00  00  16  31  2e  32  2e  38  34  30  2e  31  30  30  30
D:   38  2e  31  2e  32  2e  34  2e  37  30  21  00  00  1b  0b  00
D:   00  00  40  00  00  13  31  2e  32  2e  38  34  30  2e  31  30
D:   30  30  38  2e  31  2e  32  2e  31  21  00  00  19  0d  00  03
D:   00  40  00  00  11  31  2e  32  2e  38  34  30  2e  31  30  30
D:   30  38  2e  31  2e  32  50  00  00  3a  51  00  00  04  00  00
D:   40  00  52  00  00  1b  31  2e  32  2e  32  37  36  2e  30  2e
D:   37  32  33  30  30  31  30  2e  33  2e  30  2e  33  2e  36  2e
D:   34  55  00  00  0f  4f  46  46  49  53  5f  44  43  4d  54  4b
D:   5f  33  36  34
D: Parsing an A-ASSOCIATE PDU
D: Transport connection: TCP/IP, unencrypted.
D: Association Parameters Negotiated:
D: ====================== BEGIN A-ASSOCIATE-AC =====================
D: Our Implementation Class UID:      1.2.276.0.7230010.3.0.3.6.4
D: Our Implementation Version Name:   OFFIS_DCMTK_364
D: Their Implementation Class UID:    1.2.276.0.7230010.3.0.3.6.4
D: Their Implementation Version Name: OFFIS_DCMTK_364
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    INNOFORCE88
D: Called Application Name:     ORTHANC
D: Responding Application Name: ORTHANC
D: Our Max PDU Receive Size:    16384
D: Their Max PDU Receive Size:  16384
D: Presentation Contexts:
D:   Context ID:        1 (Accepted)
D:     Abstract Syntax: =ComputedRadiographyImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =JPEGBaseline
D:   Context ID:        3 (Accepted)
D:     Abstract Syntax: =ComputedRadiographyImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =JPEGLossless:Non-hierarchical-1stOrderPrediction
D:   Context ID:        5 (Accepted)
D:     Abstract Syntax: =ComputedRadiographyImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =LittleEndianExplicit
D:   Context ID:        7 (Accepted)
D:     Abstract Syntax: =CTImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =JPEGBaseline
D:   Context ID:        9 (Accepted)
D:     Abstract Syntax: =CTImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =JPEGLossless:Non-hierarchical-1stOrderPrediction
D:   Context ID:        11 (Accepted)
D:     Abstract Syntax: =CTImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =LittleEndianExplicit
D:   Context ID:        13 (Abstract Syntax Not Supported)
D:     Abstract Syntax: =EncapsulatedSTLStorage
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D: Requested Extended Negotiation: none
D: Accepted Extended Negotiation:  none
D: Requested User Identity Negotiation: none
D: User Identity Negotiation Response:  none
D: ======================= END A-ASSOCIATE-AC ======================
I: Association Accepted (Max Send PDV: 16372)
I: Sending file: c:\Temp\stl.dcm
D: DcmMetaInfo::checkAndReadPreamble() TransferSyntax="Little Endian Explicit"
D: DcmDataset::read() TransferSyntax="Little Endian Explicit"
E: No presentation context for: (STL) 1.2.840.10008.5.1.4.1.1.104.3
E: Store SCU Failed: 0006:0208 DIMSE No valid Presentation Context ID
I: Aborting Association
```
Comment 9 Sébastien Jodogne 2020-06-29 15:25:19 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2019-04-05.13:59:34]

After investigation, this issue is due to a regression when upgrading from DCMTK 3.6.2 to 3.6.4.
Comment 10 Sébastien Jodogne 2020-06-29 15:25:20 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2019-04-05.14:01:52]

Fix issue #137 (C-STORE fails for unknown SOP Class although server is configured to accept any)

→ https://hg.orthanc-server.com/orthanc/changeset/6e42d676401c