Networking Forums

Networking Forums > Computer Networking > Linux Networking > Missing bytes in TCP connection from Windows to Linux

Reply
Thread Tools Display Modes

Missing bytes in TCP connection from Windows to Linux

 
 
Chris B.
Guest
Posts: n/a

 
      09-18-2003, 10:26 PM
I'm running redhat 9.0 and windows 2000 professional. From my linux
box I have a client that sends and receives data via a socket to a
windows server application. The server writes many small packets (~30
packets, 1-10 bytes) back to the client as an ack. The server
application is not ours and we can't change it.

In the linux client, I continue to call recv to pull the entire
message off the socket. There are times when I don't receive all of
the bytes that the server application says it sent. tcpdump on the
linux box confirms that the data never arrives.

We are not sure if one or more packets is being dumped via overflow on
either the Windows box or the linux box. Attached is a part of the
strace. Any ideas?

Are there any windows or linux kernel level settings that may need to
be modified?

Many Thanks.


send(4, "\vMSH|^~\\&|HL7 SEND|TPMG-SSC|EASY"..., 347, 0) = 347
time([1063863694]) = 1063863694
write(3, "20030917-22:41:34 Info: sendMes"..., 54) = 54
select(5, [4], NULL, NULL, {5, 0}) = 1 (in [4], left {4, 850000})
recv(4, "\vMSH", 4096, 0) = 4
select(5, [4], NULL, NULL, {5, 0}) = 0 (Timeout)
recv(4, 0x8067930, 4096, 0) = -1 EAGAIN (Resource
temporarily unavailable)
 
Reply With Quote
 
 
 
 
Mike Nugent
Guest
Posts: n/a

 
      09-20-2003, 11:20 AM
Chris B. wrote:
> I'm running redhat 9.0 and windows 2000 professional. From my linux
> box I have a client that sends and receives data via a socket to a
> windows server application. The server writes many small packets (~30
> packets, 1-10 bytes) back to the client as an ack. The server
> application is not ours and we can't change it.
>
> In the linux client, I continue to call recv to pull the entire
> message off the socket. There are times when I don't receive all of
> the bytes that the server application says it sent. tcpdump on the
> linux box confirms that the data never arrives.
>
> We are not sure if one or more packets is being dumped via overflow on
> either the Windows box or the linux box. Attached is a part of the
> strace. Any ideas?
>
> Are there any windows or linux kernel level settings that may need to
> be modified?
>
> Many Thanks.
>
>
> send(4, "\vMSH|^~\\&|HL7 SEND|TPMG-SSC|EASY"..., 347, 0) = 347
> time([1063863694]) = 1063863694
> write(3, "20030917-22:41:34 Info: sendMes"..., 54) = 54
> select(5, [4], NULL, NULL, {5, 0}) = 1 (in [4], left {4, 850000})
> recv(4, "\vMSH", 4096, 0) = 4
> select(5, [4], NULL, NULL, {5, 0}) = 0 (Timeout)
> recv(4, 0x8067930, 4096, 0) = -1 EAGAIN (Resource
> temporarily unavailable)



This sounds like the packets are not being sent for whatever reason. I
would suggest running tcpdump at your filewall to be absolutely sure,
but I've never seen a Linux box (post 2.0 kernel) just drop data because
it felt like it. I also would imagine that the the Windows box isn't
just dropping data (if it's NT4.0+). My first suspect would be the
program sending the data.

This is TCP data right? Not UDP data that could have just been lost in
transit?

--
Mike Nugent
Programmer/Author/DBA/Admin
In search of employment, email for credentials
(E-Mail Removed)

 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      09-24-2003, 06:42 AM

"Chris B." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I'm running redhat 9.0 and windows 2000 professional. From my linux
> box I have a client that sends and receives data via a socket to a
> windows server application. The server writes many small packets (~30
> packets, 1-10 bytes) back to the client as an ack. The server
> application is not ours and we can't change it.
>
> In the linux client, I continue to call recv to pull the entire
> message off the socket. There are times when I don't receive all of
> the bytes that the server application says it sent. tcpdump on the
> linux box confirms that the data never arrives.
>
> We are not sure if one or more packets is being dumped via overflow on
> either the Windows box or the linux box. Attached is a part of the
> strace. Any ideas?
>
> Are there any windows or linux kernel level settings that may need to
> be modified?


In raw IP and UDP it's perfectly normal that some packets are lost. The
using application has to comply with the fact. TCP takes care of ensuring
that all bytes sent will arrive.

Do not think that a single TCP send will arrive in a single receive - TCP is
a byte stream which may be sent in pieces of whatever size the transport
protocol deems appropriate. There may be delays due to buffering inside the
transport.

The payload data must be structured so that it is possible to detect the
message boundaries from the contents of the data alone, e.g. byte counts at
start of records or flag bytes etc.

HTH

Tauno Voipio
tauno voipio @ iki fi



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bytes sent & bytes received ... tarzan Broadband 6 09-16-2005 03:09 PM
IP truncated-ip - 4 bytes missing! Thomas Molkenbur Linux Networking 3 03-09-2005 09:14 PM
Missing Dial up Connection icons in Windows ME Mitch Hall Windows Networking 1 01-10-2005 08:28 PM
Can I send out an ethernet packet with over 1500 bytes in linux ? Hans Yin Linux Networking 4 12-21-2004 07:19 AM
[HELP] data corruption: swap of bytes distant from 12 bytes Francois Grieu Windows Networking 0 11-17-2003 07:57 AM



1 2 3 4 5 6 7 8 9 10 11