0

Using a mix of Windows 7 and Windows 10 clients, one of my LAN servers tends to take 21 seconds to establish a connection. This LAN server is running Windows Server 2012-R2 and hosting TFS 2015 on IIS port 8080. Playing with Fiddler reveals that the connection is spending 21 seconds establishing a TCP connection.

Using wireshark, I see the following conversation. It is ordered by time.

Time  0 : IPV6 - TCP 49371 → 8080 [SYN] Seq=0 Win=8192 Len=0 MSS=1440 WS=256 SACK_PERM=1  
Time  3 : IPV6 - TCP 49371 → 8080 [SYN] Seq=0 Win=8192 Len=0 MSS=1440 WS=256 SACK_PERM=1
Time  9 : IPV6 - TCP 49371 → 8080 [SYN] Seq=0 Win=8192 Len=0 MSS=1440 SACK_PERM=1
Time 21 : IPV4 - TCP 49372 → 8080 [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=256
                SACK_PERM=1
Time 21 : IPV4 - TCP 8080 → 49372 [SYN, ACK] Seq=0 Ack=1 Win=8192 Len=0 MSS=1460 WS=256
                SACK_PERM=1
Time 21 : IPV4 - TCP    49372 → 8080 [ACK] Seq=1 Ack=1  Win=65536 Len=0
Time 21+: IPV4 - HTTP chatter
                 (at this point the connection has been established successfully)

This seems to match the firewalled port diagram on http://www.codeproject.com/Articles/363088/TCP-and-Port-Filtering-Firewalls-with-WinSock (i.e., 3 second timeout, 6 second timeout, 12 second timeout). However, turning on Windows firewall logging on client and server does not show dropped packets.

This seems to be server-specific; I can connect to other servers (on the LAN and outside) without this issue. If I explicitly specify an IPV4 or IPV6 ip address, the connection is established successfully (and the wireshark logs show only IPV4 or IPV6 traffic in this scenario).

Please note that everything described above is suspect, as this problem is highly resistant to diagnosis:
1. If two requests are made within the same application, the second request responds quickly (unless the requests are far enough apart?).
2. Sometimes tweaking a setting on the server (or maybe even on the client?) will temporarily eliminate the problem (until the client is rebooted?).

Edit: Below is what a Wireshark trace looks like when the server starts working:

Time 0 : IPV6 - 60459 → 8080 [SYN] Seq=0 Win=8192 Len=0 MSS=1440 WS=256 SACK_PERM=1
Time 0 : IPV6 - 8080 → 60459 [SYN, ACK] Seq=0 Ack=1 Win=8192 Len=0 MSS=1440 WS=256 
                SACK_PERM=1
Time 0 : IPV6 - 60459 → 8080 [ACK] Seq=1 Ack=1 Win=66048 Len=0
Time 0+: IPV6 - HTTP Chatter
                (at this point the connection has been established successfully)

Question: How can I modify the server to avoid this 21 second connection delay?

8
  • The server is not responding on its IPv6 address. Make sure you have configured the server's IPv6 networking correctly. Feb 17, 2016 at 22:07
  • @MichaelHampton: Excluding the first attempt to talk to it (which has the 21 second delay described above), hits to the server via IPV6 (or by using name resolution and allowing it to resolve to IPV6) do successfully connect, and stick with IPV6 for the duration of the conversation. So IPv6 may be configured incorrectly, but the incorrectness is done in a way that works fine after the first request. I would appreciate any suggestions you can offer; I have no clue what could cause such behavior.
    – Brian
    Feb 17, 2016 at 22:46
  • A bit of information missing here. "If I explicitly specify an IPV4 or IPV6 ip address, the connection is established successfully" I take it this means you're only having trouble when accessing by name, not by IP? I'm also assuming then that the Wireshark traffic includes the correct IPs (source and destination)? I'd next disable the firewall temporarily to test if it's an issue there, and then check the (I presume?) IIS web site bindings, as well as the IIS traffic logs, although I believe if the problem was there, you'd be seeing TCP ACKs, and HTTP errors.
    – DarkMoon
    Feb 17, 2016 at 23:00
  • Oh, and "tweaking a setting on the server": what setting? Might give a clue as to where the problem is.
    – DarkMoon
    Feb 17, 2016 at 23:00
  • The wireshark log you have shows IP6 failing, then IP4 working. You say that isn't what is going on, but your logs say otherwise. Perhaps you should show a log that actually shows the problem you are describing then?
    – psusi
    Feb 17, 2016 at 23:38

1 Answer 1

0

The intended configuration for the IPV4 connection properties was for the machine to have a pair of hard-coded IPV4 DNS server, each of which was a Domain controller. However, the actual configuration was that one of the two hard-coded DNS servers was a domain controller and the other was an ex-domain controller, the latter of which was running Server2003 and lacked ipv6 support. I will note that the previous server was similarly misconfigured, but the previous server was a Server2003 machine and lacked IPV6 support.

Since updating this setting about 2 days ago, the TCP issue has not occurred. While the previous setting was obviously wrong, I am not confident that the IPV4 misconfiguration is the specific cause of the TCP/IP failure. I've been investigating this issue for about a month, with the problem has been intermittently vanishing and reappearing the whole time.

9
  • Based on the trace, I don't even see an IPV4 connection at all until 21 seconds. Now that it's working normally, what does the connection trace look like?
    – vigilem
    Feb 19, 2016 at 15:20
  • @vigilem: OK, I updated the question.
    – Brian
    Feb 19, 2016 at 15:58
  • What is the problem server's DNS configuration for v6? Does it differ at all from non-problematic servers?
    – vigilem
    Feb 19, 2016 at 17:51
  • The DNS configuration is set to be automatic, as are the non-problematic servers.
    – Brian
    Feb 19, 2016 at 18:18
  • Okay. The reason I ask is the problem trace sure looks like the v6 side simply doesn't answer back at all. Are the traces you've attached from the problem server side?
    – vigilem
    Feb 19, 2016 at 20:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .