DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Mon, 2017-12-18, 21:16

All times are UTC + 1 hour




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu, 2012-02-02, 03:36 
Offline

Joined: Wed, 2012-02-01, 09:29
Posts: 8
Hi, all
I am using storescu utility brought with dcmtk 3.6 to do some test.
1. Start a "storage SCP emulator" utility from DVT tool on Windows 7;
2. Start storescu on Linux to export an image to Windows, and unplugged the network cable while data tranferring:

~/dcmtk/bin $date&&./storescu -v -to 30 3.35.63.54 1026 /media/sf_share/d7/sample_files/IM1 ||date
Thu Feb 2 09:30:43 CST 2012
I: checking input files ...
I: Requesting Association
I: Association Accepted (Max Send PDV: 16372)
I: Sending file: /media/sf_share/d7/sample_files/IM1
I: Transfer Syntax: LittleEndianExplicit -> LittleEndianExplicit
I: Sending Store Request: MsgID 1, (RF)
XMIT: ..................................................................................E: Store Failed, file: /media/sf_share/d7/sample_files/IM1:
E: 0006:020e DIMSE Failed to send message
E: 0006:031d TCP I/O Error (Operation now in progress) occurred in routine: writeDataPDU
E: Store SCU Failed: 0006:020e DIMSE Failed to send message
E: 0006:031d TCP I/O Error (Operation now in progress) occurred in routine: writeDataPDU
I: Aborting Association
E: Association Abort Failed: 0006:031d TCP I/O Error (No route to host) occurred in routine: sendAbortTCP
Thu Feb 2 09:46:12 CST 2012

So, if I only specify -to option, it will wait about 16 minutes to report the broken network.

3. this time, I specify -to, -ta, -td option:
~/dcmtk/bin $date&&./storescu -v -to 30 -ta 50 -td 50 3.35.63.54 1026 /media/sf_share/d7/sample_files/IM1 ||date
Thu Feb 2 09:53:50 CST 2012
I: checking input files ...
I: Requesting Association
I: Association Accepted (Max Send PDV: 16372)
I: Sending file: /media/sf_share/d7/sample_files/IM1
I: Transfer Syntax: LittleEndianExplicit -> LittleEndianExplicit
I: Sending Store Request: MsgID 1, (RF)
XMIT: ........................................................................................................E: Store Failed, file: /media/sf_share/d7/sample_files/IM1:
E: 0006:020e DIMSE Failed to send message
E: 0006:031d TCP I/O Error (Operation now in progress) occurred in routine: writeDataPDU
E: Store SCU Failed: 0006:020e DIMSE Failed to send message
E: 0006:031d TCP I/O Error (Operation now in progress) occurred in routine: writeDataPDU
I: Aborting Association
E: Association Abort Failed: 0006:031d TCP I/O Error (No route to host) occurred in routine: sendAbortTCP
Thu Feb 2 10:09:25 CST 201

Again, it also wait about 16 minutes.

My Linux:
~/dcmtk/bin $uname -a
Linux localhost.localdomain 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux

Any suggestion how can I specify a timeout when the network suddenly becomes unavailable such as cable is unplugged while data transferring?


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 2012-02-02, 16:42 
Offline
DCMTK Developer

Joined: Fri, 2004-11-05, 13:47
Posts: 1651
Location: Oldenburg, Germany
Hi,

if you pull out the network cable or disconnect from the network in any other way you will have a complete network failure and there will be no way with DCMTK to continue where you have been stopped (e.g. in the middle of sending a DICOM dataset) -- you just have to send again. I guess (however, I might be wrong...) that this is not possible with any DICOM application.

Best regards,
Michael


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2012-02-03, 03:33 
Offline

Joined: Wed, 2012-02-01, 09:29
Posts: 8
Michael Onken wrote:
Hi,

if you pull out the network cable or disconnect from the network in any other way you will have a complete network failure and there will be no way with DCMTK to continue where you have been stopped (e.g. in the middle of sending a DICOM dataset) -- you just have to send again. I guess (however, I might be wrong...) that this is not possible with any DICOM application.

Best regards,
Michael


Thanks.
Yes, I agree that I should re-send my data in that case. But, I do not want to wait so long - 16 minutes to get aware of something wrong, do you have any idea that I can specify a timeout for that?


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2012-02-03, 09:02 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1882
Location: Oldenburg, Germany
Do you know where the time is spent? For example, you could enable the timestamp output of the logger, so you can see the exact time when a log message is reported.

I remember that we added a fixed timeout of 60 seconds for the receiving part (SCP) in order to make sure that the association is terminated if the receiver looses the connection to the sender. This patch is already part of DCMTK 3.6.0.

Maybe, it is also worth to test the current snapshot in order to see whether the behavior you've observed has changed since last release ...


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 2012-02-09, 09:04 
Offline

Joined: Wed, 2012-02-01, 09:29
Posts: 8
J. Riesmeier wrote:
Do you know where the time is spent? For example, you could enable the timestamp output of the logger, so you can see the exact time when a log message is reported.

I remember that we added a fixed timeout of 60 seconds for the receiving part (SCP) in order to make sure that the association is terminated if the receiver looses the connection to the sender. This patch is already part of DCMTK 3.6.0.

Maybe, it is also worth to test the current snapshot in order to see whether the behavior you've observed has changed since last release ...


Yes, after digging into source codes, I locate the function ::write(...) called in DcmTCPConnection::write() function, which may wait about 16 minutes if the network cable unplugged while data transferring.

I saw the code you mentioned about fixed timeout of 60 seconds, but that seems to be useless, as if I specify -ta and -td option in command line, storescu utility still waits 16 minutes to report error if I unplug the cable.

So, my question is, first why -ta and -td options have no effect and second, how can I specify a timeout for a SCU application when the cable is unplugged if I do want to wait 16 minutes to know something is wrong?


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 2012-02-09, 09:57 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1882
Location: Oldenburg, Germany
Quote:
So, my question is, first why -ta and -td options have no effect

The support of timeouts in the network module is still somewhat incomplete. It has been added after the initial design/implementation, so the timeout parameters are not always considered appropriately (see history of changes in the last couple of years).

Quote:
and second, how can I specify a timeout for a SCU application when the cable is unplugged if I do want to wait 16 minutes to know something is wrong?

This is something we would have to investigate ... I'll add this issue to our to-do list.


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2012-02-10, 02:56 
Offline

Joined: Wed, 2012-02-01, 09:29
Posts: 8
J. Riesmeier wrote:
Quote:
So, my question is, first why -ta and -td options have no effect

The support of timeouts in the network module is still somewhat incomplete. It has been added after the initial design/implementation, so the timeout parameters are not always considered appropriately (see history of changes in the last couple of years).

Quote:
and second, how can I specify a timeout for a SCU application when the cable is unplugged if I do want to wait 16 minutes to know something is wrong?

This is something we would have to investigate ... I'll add this issue to our to-do list.


Many thanks for your reply! Now I know some reasons to some level.

Still I consider the document from dcmtk is far away from being perfect...


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2012-02-10, 08:52 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1882
Location: Oldenburg, Germany
Quote:
Still I consider the document from dcmtk is far away from being perfect...

What do you mean by "document from dcmtk"?


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2012-02-10, 09:27 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1882
Location: Oldenburg, Germany
I just checked what a recent Linux system (Ubuntu 11.10) does when the network cable is unplugged during the storage transfer: storescp detects this problem after the specified time-out of 60 seconds, and storescu hangs for a very long time. So, we have a system where we can reproduce the behavior you've described :-) And, maybe we can use the same approach for sending as for receiving data ...


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2012-02-10, 12:20 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1882
Location: Oldenburg, Germany
I guess this issue has been solved with the following commit. Thanks again for reporting this issue to us.

As mentioned before, we are aware of the fact that the support of timeout value in the network module is not yet perfect, but better than nothing. A cleanup of the code is still on our list of things to do ...


Top
 Profile  
 
 Post subject:
PostPosted: Sun, 2012-02-12, 23:02 
Offline

Joined: Fri, 2010-10-29, 21:48
Posts: 19
Sorry, I decided to move this message to a new topic called
storescu TCP/IP error messages - dcmtk error type

Regards,

Nicolás


Last edited by nicolas_dicom on Mon, 2012-02-13, 00:28, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon, 2012-02-13, 00:23 
Offline

Joined: Fri, 2010-10-29, 21:48
Posts: 19
Hi all,

I have the same issue mentioned by Matterhorn

I'm using Ubuntu 11.04 DCMTK 3.6.0

2.6.38-13-generic #54-Ubuntu SMP Tue Jan 3 13:38:12 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux


Have the same issue in Windows 7 professional 64bits with both DCMTK version
3.5.4 and 3.6.0



if you unplug the wire at the time Requesting Association , the -to 5 second takes effect


Code:
}

D:     Abstract Syntax: =XRayRadiofluoroscopicImageStorage
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
F: Association Request Failed: 0006:031b Failed to establish association
F: 0006:0317 Peer aborted Association (or never connected)
F: 0006:031c TCP Initialization Error: Operation now in progress (Timeout)




But once you are here : Constructing Associate RQ PDU
you will have to wait for more than 2 minutes

Code:

D:   Context ID:        253 (Proposed)
D:     Abstract Syntax: =XRayRadiofluoroscopicImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =JPEGLossless:Non-hierarchical-1stOrderPrediction
D:   Context ID:        255 (Proposed)
D:     Abstract Syntax: =XRayRadiofluoroscopicImageStorage
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: Constructing Associate RQ PDU




That was what I could see so far,

Regards,

Nicolás


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 2012-02-13, 13:55 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1882
Location: Oldenburg, Germany
To "nicolas_dicom": Could you please test whether the above mentioned patch also solves your problem?


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2012-02-14, 02:42 
Offline

Joined: Fri, 2010-10-29, 21:48
Posts: 19
Hello ,

I modified the file dcmtrans.cc
from
http://git.dcmtk.org/web?p=dcmtk.git;a= ... 011b954187

After that, I compiled the code -> successfully
dcmtk-3.6.0/dcmnet/libsrc# make clean all and make all
dcmtk-3.6.0/dcmnet# make clean all and male all
I also compiled dcmtk-3.6.0/dcmnet/apps "storescu"

Just to see if the change takes effect I added the line:
DCMNET_INFO("Hi there");
Code:
nicolas@orus:/dcmtk-3.6.0/dcmnet/apps$ ./storescu -v -xs -to 3 -aet SENDER -aec IADCMSERVER 192.168.5.111 110 1.dcm
I: checking input files ...
I: Requesting Association


I: Hi there


I: Association Accepted (Max Send PDV: 16372)
I: Sending file: 1.dcm
I: Transfer Syntax: LittleEndianImplicit -> LittleEndianExplicit
I: Sending Store Request: MsgID 1, (CR)
I: Received Store Response
I: Releasing Association



Did I forget something ? didn't work. Storescu keeps waiting for long time. I guess I did something wrong.
As you can see, the version is dcmtk-3.6.0

Should I also change next files ?
dcmnet/libsrc/dul.cc
dcmnet/libsrc/Makefile.dep


I still can see
setting network send timeout to 60 seconds
Code:

D: ======================= END A-ASSOCIATE-RQ ======================
I: Requesting Association
D: setting network send timeout to 60 seconds
I: Hi there
D: setting network receive timeout to 60 seconds
D: Constructing Associate RQ PDU




I also tried to modify the dul.cc file from
http://git.dcmtk.org/web?p=dcmtk.git;a= ... 2cfa72074d

Code:

99506L -Wall  dul.cc
dul.cc: In function ‘OFCondition DUL_RejectAssociationRQ(DUL_ASSOCIATIONKEY**, DUL_ABORTITEMS*, int)’:
dul.cc:793:20: error: ‘DULC_ILLEGALREJECTSOURCE’ was not declared in this scope
make: *** [dul.o] Error 1


Please, let me know if I need to change another file. Will try again

Regards,
Nicolás


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2012-02-14, 17:49 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1882
Location: Oldenburg, Germany
Quote:
Did I forget something ? didn't work. Storescu keeps waiting for long time. I guess I did something wrong.

Maybe, you should first try to use the current development version from the git repository (i.e. the whole version) and see whether it solves your problem.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group