Hello srikanth byragoni,
This specific behavior where domain authentication fails while local administration and basic network connectivity remain intact, strongly points to Ephemeral Port Exhaustion on the affected Windows Servers. Since these are SQL servers, they are likely generating a high volume of outbound connections or handling a massive number of client requests that are leaving TCP ports in a TIME_WAIT state. When the dynamic port range (defaulting to approximately 16,000 ports on Windows Server 2008 and later) is fully consumed, the operating system cannot allocate a new source port to establish the necessary RPC or Kerberos connection to the Domain Controller for user authentication. Local login continues to work because it validates against the local SAM database and does not require an outbound network socket. The 3-4 hour auto-resolution likely coincides with the completion of a specific SQL job or application workflow that finally releases the held sockets, or the natural expiration of enough TIME_WAIT states if the storm subsides.
To confirm this diagnosis, you need to examine the System Event Log on an affected server for Event ID 4227 ("TCP/IP failed to establish an outgoing connection because the selected local endpoint was recently used to connect to the same remote endpoint"). When the issue is active, open an administrative command prompt or PowerShell session and run netstat -ano | find /c "TIME_WAIT". If this return value is close to or exceeds the default dynamic port range limit (typically around 16,000 if not customized), you have confirmed port exhaustion. You should also check if the MaxUserPort registry key at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters has been modified; if it is absent, the system uses the default range.
If port exhaustion is the root cause, the immediate remediation involves tuning the TCP/IP stack to accommodate the SQL workload. You should navigate to the registry path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters and set (or create) a DWORD value named TcpTimedWaitDelay with a decimal value of 30 (reducing the wait time from the default 240 seconds). Additionally, creating a DWORD named MaxUserPort and setting it to 65534 (decimal) will expand the available ephemeral port range to its maximum. A server reboot is required for these registry changes to take effect. If the issue persists despite these changes, you should then investigate the Netlogon performance counter specifically for "Semaphore Waiters" to rule out a MaxConcurrentApi bottleneck, though port exhaustion remains the primary suspect given the SQL context.
I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer. Should you have more questions, feel free to leave a message. Have a nice day!
VP