THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

TCP client responses with no FIN

Hello there, I am testing a TCP server application I am writing. On the PC side, I am using a TCP Client for testing purposes. In this scenario, After the client makes the connection with the server and exchanges some data, the server is initializing the closing. This is done by sending FIN+ACK from the server to the client. The problem I am having is the the client responses with ACK and never with FIN+ACK. Here is the screenshot and transcript (cannot upload files here).

https://pastebin.com/6gNfrSMn

10.10.10.1 is the server and 10.10.10.33 is the client. Why isn't the client sending a FIN+ACK after the server initializes the closing? Is this a bug in the client software, or is there something wrong with the server sequence?

bremenpl's avatar
1
bremenpl
asked 2020-11-23 10:45:51 +0000
edit flag offensive 0 remove flag close merge delete

Comments

"using a TCP Client" - what is the client software?

Chuckc's avatar Chuckc (2020-11-23 18:24:16 +0000) edit
bremenpl's avatar bremenpl (2020-11-23 18:35:43 +0000) edit

"Modbus Poll is a Modbus master simulator" - it may be the TCP client but at the protocol level it is driving the conversation.
Sample captures attached to these issues: 7902 and 15698 - show the polling software opens and initiates the close on the TCP connection.

Chuckc's avatar Chuckc (2020-11-23 18:59:11 +0000) edit

Whatever is the layer over the tcp, the client should respond when the server closes the connection. Im not sure I get your point

bremenpl's avatar bremenpl (2020-11-23 19:10:22 +0000) edit

In the case of Modbus, the Master is the client, it initiates the connection to the slave, and sends requests to which the slave responds. From your text output (a capture file is so much easier to view), the slave device does send a FIN so the Modbus Poll Master should respond with a FIN. Something to be taken up with the developers of that particular item of closed source software.

Note that closing the connection isn't normal for a slave device, the connection would only be closed if the device was shutting down, not during normal operation.

grahamb's avatar grahamb (2020-11-23 19:31:32 +0000) edit
add a comment see more comments

2 Answers

0

What you're seeing is a half closed connection. See RFC 1122, section 4.2.2.13 for further discussion. It's up to the client to close its side.

Jaap's avatar
13.7k
Jaap
answered 2020-11-23 12:23:54 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

I don't think there is a valid reason fro any client NOT to close the connection as it should with it's own FIN action. So that seems to me an error in the TCP handling on the client.

hugo.vanderkooij's avatar
76
hugo.vanderkooij
answered 2020-11-23 11:13:51 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer