Echo is successful and Query/Retrieve is Failed

Here are the logs

====================== BEGIN A-ASSOCIATE-RQ =====================
Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.6
Our Implementation Version Name: OFFIS_DCMTK_366
Their Implementation Class UID:
Their Implementation Version Name:
Application Context Name: 1.2.840.10008.3.1.1.1
Calling Application Name: ORTHANC
Called Application Name: PACSGEAR
Responding Application Name: PACSGEAR
Our Max PDU Receive Size: 16384
Their Max PDU Receive Size: 0
Presentation Contexts:
Context ID: 1 (Proposed)
Abstract Syntax: =VerificationSOPClass
Proposed SCP/SCU Role: Default
Proposed Transfer Syntax(es):
=LittleEndianImplicit
=LittleEndianExplicit
=BigEndianExplicit
Context ID: 3 (Proposed)
Abstract Syntax: =FINDPatientRootQueryRetrieveInformationModel
Proposed SCP/SCU Role: Default
Proposed Transfer Syntax(es):
=LittleEndianImplicit
=LittleEndianExplicit
=BigEndianExplicit
Context ID: 5 (Proposed)
Abstract Syntax: =FINDStudyRootQueryRetrieveInformationModel
Proposed SCP/SCU Role: Default
Proposed Transfer Syntax(es):
=LittleEndianImplicit
=LittleEndianExplicit
=BigEndianExplicit
Context ID: 7 (Proposed)
Abstract Syntax: =MOVEStudyRootQueryRetrieveInformationModel
Proposed SCP/SCU Role: Default
Proposed Transfer Syntax(es):
=LittleEndianImplicit
=LittleEndianExplicit
=BigEndianExplicit
Context ID: 9 (Proposed)
Abstract Syntax: =FINDModalityWorklistInformationModel
Proposed SCP/SCU Role: Default
Proposed Transfer Syntax(es):
=LittleEndianImplicit
=LittleEndianExplicit
=BigEndianExplicit
Requested Extended Negotiation: none
Accepted Extended Negotiation: none
Requested User Identity Negotiation: none
User Identity Negotiation Response: none
======================= END A-ASSOCIATE-RQ ======================
D: setting network send timeout to 60 seconds
D: setting network receive timeout to 60 seconds
D: DULFSM: disabling Nagle algorithm as defined at compilation time (DISABLE_NAGLE_ALGORITHM)
D: Constructing Associate RQ PDU
D: PDU Type: Associate Accept, PDU Length: 288 + 6 bytes PDU header
D: 02 00 00 00 01 20 00 01 00 00 50 41 43 53 47 45
D: 41 52 20 20 20 20 20 20 20 20 4f 52 54 48 41 4e
D: 43 20 20 20 20 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 19 01 00 00 00 40 00 00 11 31
D: 2e 32 2e 38 34 30 2e 31 30 30 30 38 2e 31 2e 32
D: 21 00 00 19 03 00 03 00 40 00 00 11 31 2e 32 2e
D: 38 34 30 2e 31 30 30 30 38 2e 31 2e 32 21 00 00
D: 19 05 00 03 00 40 00 00 11 31 2e 32 2e 38 34 30
D: 2e 31 30 30 30 38 2e 31 2e 32 21 00 00 19 07 00
D: 03 00 40 00 00 11 31 2e 32 2e 38 34 30 2e 31 30
D: 30 30 38 2e 31 2e 32 21 00 00 19 09 00 00 00 40
D: 00 00 11 31 2e 32 2e 38 34 30 2e 31 30 30 30 38
D: 2e 31 2e 32 50 00 00 2e 51 00 00 04 00 00 40 00
D: 52 00 00 13 31 2e 33 2e 36 2e 31 2e 34 2e 31 2e
D: 32 33 38 34 39 2e 31 55 00 00 0b 50 41 43 53 47
D: 45 41 52 5f 76 33
D: Parsing an A-ASSOCIATE PDU
T0207 19:38:57.943097 DicomAssociation.cpp:372] (dicom) Connection Parameters: Transport connection: TCP/IP, unencrypted.
T0207 19:38:57.951130 DicomAssociation.cpp:374] (dicom) Association Parameters Negotiated:
====================== BEGIN A-ASSOCIATE-AC =====================
Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.6
Our Implementation Version Name: OFFIS_DCMTK_366
Their Implementation Class UID: 1.3.6.1.4.1.23849.1
Their Implementation Version Name: PACSGEAR_v3
Application Context Name: 1.2.840.10008.3.1.1.1
Calling Application Name: ORTHANC
Called Application Name: PACSGEAR
Responding Application Name: PACSGEAR
Our Max PDU Receive Size: 16384
Their Max PDU Receive Size: 16384
Presentation Contexts:
Context ID: 1 (Accepted)
Abstract Syntax: =VerificationSOPClass
Proposed SCP/SCU Role: Default
Accepted SCP/SCU Role: Default
Accepted Transfer Syntax: =LittleEndianImplicit
Context ID: 3 (Abstract Syntax Not Supported)
Abstract Syntax: =FINDPatientRootQueryRetrieveInformationModel
Proposed SCP/SCU Role: Default
Accepted SCP/SCU Role: Default
Context ID: 5 (Abstract Syntax Not Supported)
Abstract Syntax: =FINDStudyRootQueryRetrieveInformationModel
Proposed SCP/SCU Role: Default
Accepted SCP/SCU Role: Default
Context ID: 7 (Abstract Syntax Not Supported)
Abstract Syntax: =MOVEStudyRootQueryRetrieveInformationModel
Proposed SCP/SCU Role: Default
Accepted SCP/SCU Role: Default
Context ID: 9 (Accepted)
Abstract Syntax: =FINDModalityWorklistInformationModel
Proposed SCP/SCU Role: Default
Accepted SCP/SCU Role: Default
Accepted Transfer Syntax: =LittleEndianImplicit
Requested Extended Negotiation: none
Accepted Extended Negotiation: none
Requested User Identity Negotiation: none
User Identity Negotiation Response: none
======================= END A-ASSOCIATE-AC ======================
E0207 19:38:58.237479 OrthancException.cpp:57] DicomUserConnection: The C-FIND command is not supported by the remote SCP: Remote AET is PACSGEAR

Anyone has idea?

Just found that it is possible the SCP side only supports DMWL, but not study/image retrieval
In this case, any way to configure Orthanc to just send DMWL queries??

Your question makes no sense. If you want to search the content of a remote DICOM server (PACS), the remote SCP must support C-FIND requests for query/retrieve.

You cannot search the content of a remote server through C-FIND requests for worklists.

Thanks.
How to distinguish C-FIND requests for worklists and C-FIND requests for query/retrieve? By SOP Class?

This is answered in the other thread you started:
https://groups.google.com/g/orthanc-users/c/acHosvFaWNw/m/Vw6borOcAAAJ