Listening ports stop working sporadically

Scott Bates 1 Reputation point
2020-08-26T11:48:00.77+00:00

Hi,

I have a 2016 Server STD that we are using for Veeam replication. My issue is with the listening ports 2500 - 5000.
Randomly the ports will drop connection (I can telnet to them for a while and then I can't). I see the same issue with our Veeam replication. It can connect to the ports then it can't.

I worked with Veeam extensively on this and they came to the conclusion it's not an issue on their end.

My question is what else can I do to help narrow down why this port range is able to receive connections and then stops working?

TIA

Windows for business | Windows Server | User experience | Other
{count} votes

4 answers

Sort by: Most helpful
  1. Scott Bates 1 Reputation point
    2020-08-26T14:29:50.67+00:00

    I found this in the event log. It may be related.

    TCP/IP failed to establish an outgoing connection because the selected local endpoint was recently used to connect to the same remote endpoint. This error typically occurs when outgoing connections are opened and closed at a high rate, causing all available local ports to be used and forcing TCP/IP to reuse a local port for an outgoing connection. To minimize the risk of data corruption, the TCP/IP standard requires a minimum time period to elapse between successive connections from a given local endpoint to a given remote endpoint.

    Looking into it I found https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc938217(v=technet.10)?redirectedfrom=MSDN

    I created the entry and used a dword value of 30. Not sure if this will change anything but it's worth a shot.

    0 comments No comments

  2. Gloria Gu 3,941 Reputation points
    2020-08-27T09:38:02.157+00:00

    Hi,

    In regards to Event ID 4227 'TCP/IP failed to establish an outgoing connection',

    My suggestions would be: Check if decrease TcpTimeWaitDelay and increase MaxUserPort could help to solve the issue.

    1. The location of the TcpTimeWaitDelay is:

    HKEY_LOCAL-MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters.
    Add REG_DWORD named TcpTimedWaitDelay, we may set the value to 30 seconds, by default, the value is 4 minutes.

    1. Then we may use command netsh int ipv4 set dynamicport tcp start=10000 num=20000 to expand dynamic port range.
      For more details, please refer to:
      tcpip-failed-to-establish-an-outgoing-connection-event-id-4227

    -------If my answer is helpful to you, please remember to mark them as answer. Thank you!------

    Regards
    Gloria

    0 comments No comments

  3. Scott Bates 1 Reputation point
    2020-08-27T12:07:39.447+00:00

    Changing the tcptimewaitdelay to 30 seconds caused other issues with the veeam replication jobs not finishing. I have it set for 240 currently.

    I ran this command, we'll see what happens. netsh int ipv4 set dynamicport tcp start=1025 num=64511

    Although I do see that port range was already being used.


  4. Scott Bates 1 Reputation point
    2020-09-03T14:17:26.487+00:00

    Any more thoughts?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.