Share via


Windows Server 2012 R2, Event 4227 but still lot free ports for use

Question

Monday, February 12, 2018 5:44 PM

We are running Java based application which is working towards MSSQL Database and having a hard time to challenge application vendor.

The problem occurring is that We are getting TCPIP event 4227 frequently:

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.

Application is crashing in most of the cases when this occurs. I've been thru many articles and posts and our problem is definitely not related to missing free local dynamic ports. I've setup some monitoring and there is not more than 500 ports in use when this is happening. The only interesting thing is that there is few connections in FIN_WAIT1 state.

It must be the application which is trying to reuse a port which is still in use. What is the best way to track and monitor it to point out a potential issue to the vendor?

All replies (2)

Monday, February 12, 2018 5:54 PM | 1 vote

Maybe the script here helps you determine the cause.

https://social.technet.microsoft.com/Forums/windowsserver/en-US/c67b02b0-ed41-4d2a-95c3-2ee2d008abfe/troubleshooting-tcpip4227-eventtcpiptcptimewaitcollision?forum=winservergen

 

 

Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management

Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.


Tuesday, February 20, 2018 8:40 AM

Hi ,

Just checking in to see if the information provided was helpful. 
Please let us know if you would like further assistance.

Best Regards,
Candy

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].