I use dcm4che2 for query

I use dcm4che2 for query

String querystr = “<?xml version=\"1.0\" encoding=\"UTF-8\"?>” + “”

  • “<attr tag="00100020">0”
  • “<attr tag="0020000D">" + "<attr tag="0020000E">
  • “”;

2020-04-06 12:04:06,409 ERROR [main] (DicomNet.java:435) - Dicom Error on query execution:
org.dcm4che2.net.pdu.AAbort: A-ABORT[source=0, reason=0]
at org.dcm4che2.net.PDUDecoder.nextPDU(PDUDecoder.java:197)
at org.dcm4che2.net.Association.run(Association.java:850)
at java.lang.Thread.run(Unknown Source)

Why have A-ABORT[source=0, reason=0]?

Have you checked the Orthanc logs ? (https://book.orthanc-server.com/faq/log.html?highlight=logs)

In the log have this

Rejected Find request from remote DICOM modality with AET “DCMQR” and hostname “127.0.0.1”

Which clearly states that your DICOM client (dcm4che) has not been declared in the “DicomModalities” configuration option of Orthanc, as explained in the FAQ:
https://book.orthanc-server.com/faq/query-retrieve.html

Your configuration should at least contain :

{
[…]
“DicomModalities” : {
“dcm4che” : [ “DCMQR”, “127.0.0.1”, 104 ]
}
}

Thank now works