Hello all.
I am facing a very puzzling problem.
Scenario:
on the server I have a program listening on port 9999
a client tries to connect (via telnet) to the server on port 9999
Sometimes, establishing the connection takes a long time (one minute
or more).
What happens is that the client sends a SYN packet, the syn packet is
received by the server, but the server does not reply to the SYN
packet with a SYN/ACK (the program listening on the server does not
see the incoming connection).
After 4/5 SYN sents by the client, the servers finally answers with a
SYN/ACK, the connection is established and the program on the server
sees the connection).
I ran a packet sniffer on both client and server, and the result is
the same.
19:53:45.038667 IP (tos 0x0, ttl 58, id 27948, offset 0, flags [DF],
proto 6, length: 60) client.42884 > server.9999: S [tcp sum ok]
3079908730:3079908730(0) win 5840 <mss 1460,sackOK,timestamp 8571162
0,nop,wscale 7>
19:53:57.044368 IP (tos 0x0, ttl 58, id 27949, offset 0, flags [DF],
proto 6, length: 60) client.42884 > server.9999: S [tcp sum ok]
3079908730:3079908730(0) win 5840 <mss 1460,sackOK,timestamp 8574162
0,nop,wscale 7>
19:54:21.045412 IP (tos 0x0, ttl 58, id 27950, offset 0, flags [DF],
proto 6, length: 60) client.42884 > server.9999: S [tcp sum ok]
3079908730:3079908730(0) win 5840 <mss 1460,sackOK,timestamp 8580162
0,nop,wscale 7>
19:55:09.040188 IP (tos 0x0, ttl 58, id 27951, offset 0, flags [DF],
proto 6, length: 60) client.42884 > server.9999: S [tcp sum ok]
3079908730:3079908730(0) win 5840 <mss 1460,sackOK,timestamp 8592162
0,nop,wscale 7>
19:57:08.584133 IP (tos 0x0, ttl 58, id 64380, offset 0, flags [DF],
proto 6, length: 60) client.43425 > server.9999: S [tcp sum ok]
2090300578:2090300578(0) win 5840 <mss 1460,sackOK,timestamp 8622046
0,nop,wscale 7>
19:57:08.595922 IP (tos 0x0, ttl 58, id 64381, offset 0, flags [DF],
proto 6, length: 52) client.43425 > server.9999: . [tcp sum ok]
2090300579:2090300579(0) ack 1191201502 win 46 <nop,nop,timestamp
8622049 2164260539>
19:57:14.223948 IP (tos 0x0, ttl 58, id 64382, offset 0, flags [DF],
proto 6, length: 52) client.43425 > server.9999: F [tcp sum ok] 0:0(0)
ack 1 win 46 <nop,nop,timestamp 8623457 2164260539>
19:57:14.236287 IP (tos 0x0, ttl 58, id 64383, offset 0, flags [DF],
proto 6, length: 52) client.43425 > server.9999: . [tcp sum ok] 1:1(0)
ack 2 win 46 <nop,nop,timestamp 8623459 2164266179>
As you can see, the server ignores the first SYNs but at some point,
for no apparent reason, finally replies with a SYN/ACK.
Does anyone have any clue?
Thank you.
Informations on the server:
CentOS release 4.6 (Final)
Linux ebrick.net 2.6.9-67.0.7.ELsmp #1 SMP Sat Mar 15 06:54:55 EDT
2008 i686 i686 i386 GNU/Linux
dmesg (partial):
divert: allocating divert_blk for eth0
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 21 (level, low) -> IRQ 193
PCI: Setting latency timer of device 0000:00:1b.0 to 64
e1000: eth0: e1000_watchdog_task: NIC Link is Up 100 Mbps Full Duplex,
Flow Control: RX
e1000: eth0: e1000_watchdog_task: 10/100 speed: disabling TSO