Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tracking TCP packets?

 
Elhanan Maayan
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..

we have the following setup

to java process communicating by sockets with each other, and another one on an external machine.

from time to time, there seem to be "outages" where one process is unable to communicate with the other, the simply indicate things like "connection refused" exceptions, and while it seems the processes themselves are mis-behaving i'm not sure that is the case.

how can i know for sure the a tcp packet sent from one process (at least in the same machine) was received by another process and vice versa ? that it wasn't blocked by anything else?
i think IPTABLES has this log feature , but not sure how to use it.
 
Henry Wong
author
Marshal
Pie
Posts: 20892
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Elhanan Maayan wrote:hi..

we have the following setup

to java process communicating by sockets with each other, and another one on an external machine.

from time to time, there seem to be "outages" where one process is unable to communicate with the other, the simply indicate things like "connection refused" exceptions, and while it seems the processes themselves are mis-behaving i'm not sure that is the case.

how can i know for sure the a tcp packet sent from one process (at least in the same machine) was received by another process and vice versa ? that it wasn't blocked by anything else?
i think IPTABLES has this log feature , but not sure how to use it.


The only way to make sure from one application that another application has received a message -- is to have the other application report that it received it. And even then, there are edge conditions, such as the other application received it, acknowledge it, but the machine dies before it can process the message. This is doubly an issue, when TCP sockets are connecting and disconnecting, as there are always a chance of loss when connections are torn down.

Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic