Socket Problem with imagectn

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
flo
Posts: 37
Joined: Fri, 2006-02-24, 09:49

Socket Problem with imagectn

#1 Post by flo » Thu, 2006-04-06, 13:16

Hi,

I'm using imagectn and movescu. It works very good until imagectn wants to
send the requested file to movescu. imagectn wants to create a new socket-connection at socket 384 and then imagectn stops.

The problem is in file dcmtrans.cxx at position
return recv(getSocket(), (char *)buf, nbyte, 0);

getSocket() still work, but then he fails.

What could that be?

greetz flo

flo
Posts: 37
Joined: Fri, 2006-02-24, 09:49

#2 Post by flo » Fri, 2006-04-07, 08:52

The serveroutput is this: (last lines)

Requested Extended Negotiation: none
Accepted Extended Negotiation: none
Requesting Sub-Association
Constructing Associate RQ PDU
_

then nothing happens any more :(

so close to the goal :x

flo
Posts: 37
Joined: Fri, 2006-02-24, 09:49

#3 Post by flo » Fri, 2006-04-07, 11:35

I found the problem in the client:
the client is in an endless loop.
In the file dimmove.cxx in method "selectReadable":

if (!ASC_selectReadableAssociation(assocList, assocCount, timeout)) {
/* none readable */
return 0;
}

So, the associatiion is not readable, but why (?)

pim_philipse
Posts: 11
Joined: Wed, 2004-11-10, 10:17

#4 Post by pim_philipse » Mon, 2006-04-10, 07:12

Are you running movescu on the same machine as imagectn? Then you must decide which one is allowed to listen on port 104. By default, movescu will try to use 104 for incoming assocaitions (even if the move destination is another AET!) so use the --port switch to select another value (and adapt the imagectn configuration accordingly).

Good luck,

Pim.

flo
Posts: 37
Joined: Fri, 2006-02-24, 09:49

#5 Post by flo » Mon, 2006-04-10, 08:00

hi,

client and server are running on different machine (server on virual machine).
I am using the --port-option.

movescu -v -P -k ... --port 10001 -aec DICOMSERVER -aem xxxxx -aet xxxxx 192.168.0.154 10001

my config file:

# Global Configuration Parameters
NetworkType = "tcp"
NetworkTCPPort = 10001
MaxPDUSize = 16384
MaxAssociations = 16
Display = "no"

HostTable BEGIN

vgstd = (xxxxx, Dell28-2, 10001)

HostTable END


AETable BEGIN

DICOMSERVER C:\COMMON R (200, 1024mb) vgstd

AETable END

I tried different different ports,too. But nothing works.
The connection is established. First I do a findscu to find files on the server ( works well ). then I want to get one file and exactly when the server wants to open an second connection for submitting, it stops.

I have no idea any more ...

pim_philipse
Posts: 11
Joined: Wed, 2004-11-10, 10:17

#6 Post by pim_philipse » Mon, 2006-04-10, 08:14

flo wrote: HostTable BEGIN

vgstd = (xxxxx, Dell28-2, 10001)

HostTable END
I've never used imgctn, but this is what I read in ctnconf.txt:

<ctnconf.txt>
1.2. Host Table (AE Title/Presentation Address Mapping)

The Host Table part must be enclosed with the keywords "HostTable
BEGIN" and "HostTable END". It is used to define symbolic names
for a number of DICOM peers. A peer is a structure with the three
values AETitle, HostName, Portnumber seperated with white spaces
and commas and enclosed with "(" and ")".
</ctnconf.txt>

Thus, it appears that the hostname of AET xxxxx is "Dell28-2".

Can you ping Dell28-2 from the CTN VM? If not, try to add a line to the HOSTS file of your system that maps this host name to the IP address where movescu lives. On Windows, HOSTS is located in C:\WINDOWS\system32\drivers\etc.

Pim.

flo
Posts: 37
Joined: Fri, 2006-02-24, 09:49

#7 Post by flo » Mon, 2006-04-10, 08:46

yes, I can ping the client and my findscu-commands works as well.
only the move-command causes a error

when the applications stops:
the server is listening on the socket connection for something and
the client is in a while loop, listening for something, too.
*strange*

pim_philipse
Posts: 11
Joined: Wed, 2004-11-10, 10:17

#8 Post by pim_philipse » Mon, 2006-04-10, 08:52

And what happens in the following scenario?

"client" running storescp -v 10001
CTN VM: echoscu -v Dell28-2 10001

Pim.

flo
Posts: 37
Joined: Fri, 2006-02-24, 09:49

#9 Post by flo » Mon, 2006-04-10, 09:01

works as well

C:\dcmtkserver3.5.3\dcmnet\apps\debug>echoscu -v Dell28-2 10001
Requesting Association
Association Accepted (Max Send PDV: 16372)
Echo [1], Complete [Status: Success]
Releasing Association

..\3.5.4 MAIN\dcmnet\apps\debug>storescp -v 10001
Association Received
Association Acknowledged (Max Send PDV: 16372)
Received C-Echo RQ: MsgID 1
AffectedSOPClassUID: =VerificationSOPClass
Data Set: Not Present
Association Release
Association Received
Association Acknowledged (Max Send PDV: 16372)
Received C-Echo RQ: MsgID 1
AffectedSOPClassUID: =VerificationSOPClass
Data Set: Not Present
Association Release

thx for your help

flo
Posts: 37
Joined: Fri, 2006-02-24, 09:49

#10 Post by flo » Tue, 2006-04-11, 09:58

hi again,

i scaned the ports during the communication and everything seems working fine. the server sends at the seconde connection his request primitiv, get a respones, and so one, but the server still stops and waits for something....

any ideas?

flo

flo
Posts: 37
Joined: Fri, 2006-02-24, 09:49

#11 Post by flo » Tue, 2006-04-11, 15:48

solved it, was my own mistake.

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1292
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#12 Post by Marco Eichelberg » Wed, 2006-04-12, 18:16

solved it, was my own mistake.
Would you mind enlightening the readers of this interesting thread about what the mistake actually was? Maybe somebody else will repeat the same experience and can learn from this.

flo
Posts: 37
Joined: Fri, 2006-02-24, 09:49

#13 Post by flo » Thu, 2006-04-13, 08:06

It was a simple programming-mistake. ( but hard to find :) ) .
I overrided the net-object in the main-method and so was the net-object for
the second connection (move) NULL. That caused a endless loop at the client.

greetz flo

Post Reply

Who is online

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