Author |
Message
|
venumadhavp |
Posted: Wed Aug 08, 2012 4:01 am Post subject: TCPIPClientReceive node - Sync request reply on TCP IP |
|
|
Newbie
Joined: 25 Jul 2012 Posts: 5
|
Hi,
I am trying to establish a connection to a TCP IP Server using TCPIPClientOutput and TCPIPClientReceive nodes in a synchronous way.
The below are the settings on the TCPIPClientOutput Node
1) Advanced Tab -> Output Stream -> reserve output stream and release at the end of the flow
2) Advanced Tab -> Input Stream -> Leave Unchanged
3) Records and Elements tab -> -> Record Definition -> Record is Unmodified data
The below are the settings on the TCPIPClientReceive Node
1) Advanced Tab -> Input and Output Streams -> Leave unchanged
2) Request Tab -> Id Location -> $LocalEnvironment/WrittenDestination/TCPIP/Output/ConnectionDetails[1]/Id
3) Records and Elements tab -> -> Record Definition -> Connection Closed
I am getting a 3552 - timed out waiting for data error with the above settings.
On the TCPIPClientReceive node if I change the Input Stream setting to Close input stream after record has been received, I am still getting a 3552 - timed out waiting for data error. Can anyone please advise as to how to implement a sync TCP IP request response. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 08, 2012 4:51 am Post subject: Re: TCPIPClientReceive node - Sync request reply on TCP IP |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
venumadhavp wrote: |
I am getting a 3552 - timed out waiting for data error with the above settings. |
From whatever you're sending data to, or from the receive? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
McueMart |
Posted: Wed Aug 08, 2012 5:26 am Post subject: |
|
|
 Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
@Vitor - Im going to assume that its the TCPIPClientReceive node which is having the issue....
@venumadhavp - Firstly - can you confirm with your TCP server application that it is successfully receiving the data sent from the TCPIPClientOutput node? Can you also confirm that the server is sending the reply over TCP (maybe there is a log or something recording this?)?
If the server is sending the reply, is it then correctly closing the TCP connection to force broker to detect the end of record (As mentioned by your 'Records and Elements tab -> -> Record Definition -> Connection Closed' setting).
If you could answer those things we might be able to help more. |
|
Back to top |
|
 |
venumadhavp |
Posted: Wed Aug 08, 2012 5:37 am Post subject: |
|
|
Newbie
Joined: 25 Jul 2012 Posts: 5
|
@McueMart - Thank you for the reply.
The server is receiving the request and sending the response back. I have a wireshark trace that was run on the server to confirm this. The thing is when I run the flow in debug mode, I can see the response from the server on the connector between TCPIPClientOutput node and the TCPIPClientReceive node which means that the response is getting to the input terminal of the receive node but it is not propagating to the out terminal.
Coming to the connection closing, it is broker which initiates the connection and holds the handle and the server cannot close it (as it will throw an exception of Connect Reset). From a TCP IP perspective, I see that there is a ACK packet sent back to the server after the response is received.
Hence my assumption is that the settings on the Receive node should be set to a combination where the received message on the IN terminal be propagated to OUT terminal properly. |
|
Back to top |
|
 |
McueMart |
Posted: Wed Aug 08, 2012 5:50 am Post subject: |
|
|
 Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
Quote: |
The thing is when I run the flow in debug mode, I can see the response from the server on the connector between TCPIPClientOutput node and the TCPIPClientReceive node which means that the response is getting to the input terminal of the receive node but it is not propagating to the out terminal. |
That is not what I would have expected. The TCPIPClientOutput node should only be sending data over the wire - it should not be receiving it and putting the response in its output message tree. I would have expected the only to see the response data AFTER the TCPIPClientReceive node. Maybe someone could comment on why the OP could be seeing this behavior?
My understanding was that either end of the Socket connection could close it (From java clients I have written, either end can call close() on their socket...) - I could well be wrong though! |
|
Back to top |
|
 |
salam salem |
Posted: Sat Nov 30, 2013 9:05 am Post subject: Re: TCPIPClientReceive node - Sync request reply on TCP IP |
|
|
Newbie
Joined: 24 Sep 2013 Posts: 6
|
venumadhavp wrote: |
Hi,
I am trying to establish a connection to a TCP IP Server using TCPIPClientOutput and TCPIPClientReceive nodes in a synchronous way.
The below are the settings on the TCPIPClientOutput Node
1) Advanced Tab -> Output Stream -> reserve output stream and release at the end of the flow
2) Advanced Tab -> Input Stream -> Leave Unchanged
3) Records and Elements tab -> -> Record Definition -> Record is Unmodified data
The below are the settings on the TCPIPClientReceive Node
1) Advanced Tab -> Input and Output Streams -> Leave unchanged
2) Request Tab -> Id Location -> $LocalEnvironment/WrittenDestination/TCPIP/Output/ConnectionDetails[1]/Id
3) Records and Elements tab -> -> Record Definition -> Connection Closed
I am getting a 3552 - timed out waiting for data error with the above settings.
On the TCPIPClientReceive node if I change the Input Stream setting to Close input stream after record has been received, I am still getting a 3552 - timed out waiting for data error. Can anyone please advise as to how to implement a sync TCP IP request response. |
This problem mean the channel will still open until finished from receiving you can solve it by change the properties from Record and element set the fixed size option and set the size of acknowledgment back after that will solve automatically |
|
Back to top |
|
 |
smdavies99 |
Posted: Sat Nov 30, 2013 10:41 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
could you care to explain why you re-opened a post that is more than a year old? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|