Dicom image archive node stop working with error BadAppContext

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
himanshu.mistri
Posts: 18
Joined: Tue, 2018-06-05, 10:21

Dicom image archive node stop working with error BadAppContext

#1 Post by himanshu.mistri »

Below is my PACS Node running.

It version is below:-
$dcmtk: dcmqrscp v3.6.4+ DEV $

dcmqrscp: DICOM image archive (central test node)

Host type: x86_64-Linux
Character encoding: system default (unknown)

External libraries used:
- ZLIB, Version 1.2.8
- LIBWRAP
- GNU C library (iconv), version 2.23

Code: Select all

dcmqrscp -v -d -c dcmqrscp.cfg -xf storescp.cfg Default Default
D: $dcmtk: dcmqrscp v3.6.4+ DEV $
D: 
D: DcmDataDictionary: Loading file: /usr/local/share/dcmtk/dicom.dic
D: Association Received: 10
D: setting network send timeout to 60 seconds
D: setting network receive timeout to 60 seconds
I: Association Received (10: -> )
D: 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:    
D: Calling Application Name:    
D: Called Application Name:     
D: Responding Application Name: 
D: Our Max PDU Receive Size:    16384
D: Their Max PDU Receive Size:  0
D: Presentation Contexts:
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: Bad AppContextName: 
I: Refusing Association (BadAppContext)
E: Association Reject Failed: 0006:0303 DUL Finite State Machine Error: No action defined, state 1 event 7
Below is Error i am getting from DcmSCU is below:
I/dcmtk::: Unable to negotiate association: Failed to establish association
0006:0317 Peer aborted Association (or never connected)
0006:031c TCP Initialization Error: Operation now in progress (Timeout)
How to resolved BadAppContext issue for dicom image node. Is there was to fix this without clear index.dat file?

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Dicom image archive node stop working with error BadAppContext

#2 Post by J. Riesmeier »

How did you set up the DcmSCU? The following fields should not be empty:

Code: Select all

D: Their Implementation Class UID:    
D: Their Implementation Version Name: 
D: Application Context Name:    
D: Calling Application Name:    
D: Called Application Name:     
D: Responding Application Name: 

himanshu.mistri
Posts: 18
Joined: Tue, 2018-06-05, 10:21

Re: Dicom image archive node stop working with error BadAppContext

#3 Post by himanshu.mistri »

Hi @J. Riesmeier

I have observed that when I set setConnectionTimeout than I am facing error which I mention in this post.

mDcmScu.setConnectionTimeout(connectionTimeOut);

Below is my DcmSCU.

For Setup my DcmSCu i have used this sample https://support.dcmtk.org/redmine/proje ... wto_DcmSCU

Here are my code for the setup of DcmSCU.

Code: Select all

 LOGI(" AE_TITLE_NAME: %s ",mAeCallingTitleName);
    LOGI(" AE_PEER_HOST_NAME: %s ",mPeerHostName);
    LOGI(" AE_PEER_AE_TITLE: %s ",mPeerAETitle);
    LOGI(" AE_PEER_HOST_PORT: %d ",peerPortNumber);
    DcmClient mDcmScu;
    OFLog::configure(OFLogger::DEBUG_LOG_LEVEL);
    mDcmScu.setAETitle(std::string(mAeCallingTitleName));
    mDcmScu.setPeerHostName(std::string(mPeerHostName));
    mDcmScu.setPeerPort(peerPortNumber);
    mDcmScu.setPeerAETitle(std::string(mPeerAETitle));
    //mDcmScu.setConnectionTimeout(connectionTimeOut);
I am using this on the android. My concern is when is enable the last line from the code which is mDcmScu.setConnectionTimeout(connectionTimeOut); app store working for sending C-Store.

Server-side(Imaging node): Error:-
D: setting network send timeout to 60 seconds
D: setting network receive timeout to 60 seconds
I: Failed to receive association: 0006:031a DUL network read timeout

App side Error:-
DIMSE Error Unable to negotiate association:Peer aborted Association (or never connected)

Basically, I am to set SCU timeout.

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Dicom image archive node stop working with error BadAppContext

#4 Post by J. Riesmeier »

What is the value of "connectionTimeOut" when calling setConnectionTimeout()?

himanshu.mistri
Posts: 18
Joined: Tue, 2018-06-05, 10:21

Re: Dicom image archive node stop working with error BadAppContext

#5 Post by himanshu.mistri »

Hi @J. Riesmeier

I am passing the following value:-

Code: Select all

const Sint32 connectionTimeOut=60;
mDcmScu.setConnectionTimeout(connectionTimeOut);

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Dicom image archive node stop working with error BadAppContext

#6 Post by J. Riesmeier »

Could you please post the complete logs of both client and server, preferably with timestamps for each line (see logger configuration).

himanshu.mistri
Posts: 18
Joined: Tue, 2018-06-05, 10:21

Re: Dicom image archive node stop working with error BadAppContext

#7 Post by himanshu.mistri »

Hi,
Just for your information @J. Riesmeier

My server-side code is same as dcmtk V3.6.4+ Dev https://github.com/DCMTK/dcmtk/blob/DCM ... cmqrscp.cc

and my client-side code is running on android so I will add more logs, will share an update here.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Google [Bot] and 1 guest