none
TCP/IP failed to establish an outgoing connection Event ID 4227

    Question

  • I am seeing this error in the event logs on a number of our w2012r2 servers. These servers are barely being utilized because they are not production yet. I find it hard to believe that the server is running out of ports.  I did a netstat on a few servers and there are very few ports that are in use. Are there any other reasons why we would be getting this warning? Is there any other ways to troubleshoot this issue? When I do the netstat command it may be an hour after the error is logged. Its hard to catch the error and do the netstat at the same time the error is logged.

    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.

    Any help is appreciated.

    Thanks

    Wednesday, December 16, 2015 11:59 PM

Answers

  • Hi missyz21,

    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.

    Here is the detailed information about TcpTimedWaitDelay:

    https://technet.microsoft.com/en-us/library/cc938217.aspx

    2. Then we may use command netsh int ipv4 set dynamicport tcp start=10000 num=20000 to expand dynamic port range.

    Best Regards,

    Anne


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, December 17, 2015 6:37 AM
    Moderator

All replies