I'm testing an application which downloads info from photovoltaic equipment, so I have to connect to a remote power plant via Internet, using a TCP connection, I download info with my application and then I disconnect... Sometimes when I try to reconnect with remote power plant after few minutes, I can't do it, so, looking for a clue I have started capturing packets with wireshark and I can see that sometimes I send [FIN, ACK] and I get [ACK], then I get [FIN,ACK] and I send [ACK] and everything is OK for next connection, but sometimes I send [FIN,ACK] and I get [RST] and then I have to wait about 5 minutes before I can reconnect with remote router........ Any idea?
asked 12 Sep '12, 09:56
It sounds like (from your description) that the photovoltaic equipment is getting stuck in some FINWAIT state. In other words, it's not gracefully handling the tcp tear down and when that happens, you have to wait for a timeout (some multiples of MSL). I'm not sure you'll be able to do anything since you probably can't touch the tcp stack.
answered 12 Sep '12, 14:30
Just a wild idea...
sounds like the service that handles the TCP port crashes and then the OS sends a RST, as the local socket is no longer available. Then after 5 minutes some kind of 'watchdog' restarts the service and then you can reconnect.
answered 13 Sep '12, 10:28
Kurt Knochner ♦