i copied the picture url::https://i.stack.imgur.com/ORq6X.png 1) 53165->8475 Psh,Ack Len 57; 2) 53165->8475 Fin,Ack len 0; 3) 8475 ->53165 Psh,Ack len 0; 4) 53165->8475 Rst,Ack len 0 My scenario:: 53165(windows server) is the source 8475(mainframe -OS/400) is the destination machine 53165(Source) port sending data and waiting for the response from port 8475. 8475(destination) takes 15 minutes to execute and will reply back but unfortunately tcp connection is getting closed after 2 minutes So the source is never getting the result back. I have to correct this. Please explain which system is responsible for closing the connection? Can you explain me what is happening? Why the connection is getting closed? asked 22 Feb '17, 14:25 vaibhav_v edited 23 Feb '17, 14:53 |
One Answer:
The Client (Port 53165) closes the Connection with a FIN packet. That is no problem normally the mainframe is allowed to send his data as long as he sends a FIN, too. But when the Mainframe ACKs the FIN, the Client terminates teh Session with an RST and no more data is allowed to send. answered 22 Feb '17, 14:32 Christian_R showing 5 of 16 show 11 more comments |
"But when the Mainframe ACKs the FIN,"
mainframe cannot send the data until 15 minutes. It takes 15 minutes for mainframe to execute the request. So the underlying protocol TCP(mainframe) do not has any response other than zero bytes.
So mainframe cannot send the data as soon as it recieved FIN.
The mainframe can't send data after it has received the client's Reset.
It appears that your client is timing out the connection - probably due to no activity. You need to be focussing on how to make the client keep the connection open for longer.
Or can you make the PC and/or mainframe keep the connection going by sending Keep-Alive packets.
Thank you, i will try that. Actually I dont know i can do that because i am calling a .net program which is using tcp.
Do you use z/OS or which OS does the Mainframe use?
As it is long time ago I have worked with z/OS, here is what I googled for z/OS at the TCPIP.Profile configuration Reference, but maybe @mrEEde could help you further:
I removed the delay, now the server(mainframe) responds immediately so i got the success.
But in reality, my process will have the 15 min delay. So i have to correct this.
OS/400 - is the OS for mainframe
Well the mainframe reacts correct. Would be helpful if you could share the trace or at least the time column
windows(client) , 8475- mainframe (server)
Failure::
Client sends the request, mainframe takes 15 minutes to execute the request. So mainframe cannot send any response until 15 minutes. Getting an error after 2 minutes on the client side.
Success::
Client sends request, This scenario mainframe only takes 5 secs to execute the request. So Client(windows) is getting back the response back .
Can you help me who is the culprit mainframe(server- 8475 port) or windows(client)?
Hi @vaibhav_V I have converted your answers to comments, as they are more comments for me.
Thank you for the timings. Yeah now we clearly can see the things. Well The windows system terminates the session 2 minutes after the FIN which would be ok. So now you can do different things from my point of view.
@Christian_R
I already played with Below entries in windows(client). “TcpTimedWaitDelay=300”, “TcpMaxDataRetransmissions= 5” ; “KeepAliveInterval= 1” ;StrictTimeWaitSeqCheck=1 and other. Nothing really helped. As you have mentioned i will try again, to makesure.
Please check my windows(client) registry entries::
At comment section i am unable to add image- there is no image icon that is why i am posting as an answer so that i can copy url as an image.
““““TCPIP driver won’t start sending TCP Keepalives until Keepalives are enabled via various methods at upper layers (layers above TCPIP driver). "”” Source:: https://blogs.technet.microsoft.com/nettracer/2010/06/03/things-that-you-may-want-to-know-about-tcp-keepalives/
above link says, i have to set those values explicitly by program otherwise those registry values will remain ineffective.
If I were you I would really try to tune the client application behaviour. Or to find out why the mainframe needs 15 Minutes????
Thank you, i will try the same.