TCP: Address already in use exception - possible causes for client port? NO PORT EXHAUSTION

前端 未结 2 1067
暖寄归人
暖寄归人 2021-01-25 17:58

stupid problem. I get those from a client connecting to a server. Sadly, the setup is complicated making debugging complex - and we run out of options.

The environment:

相关标签:
2条回答
  • 2021-01-25 18:17

    "Address already in use", aka WSAEADDRINUSE (10048), means that when the client socket prepared to connect to the server socket, it first tried to bind itself to a specific local IP/Port pair that was already in use by another socket, either an active one or one that has been closed but is still in the FD_WAIT state. This has nothing to do with the number of ports that are available.

    0 讨论(0)
  • 2021-01-25 18:30

    I'm having the same issue on a Windows 2000 Server with a .Net application connecting to a SQL Server 7.0. There's like 10 servers with the same configuration and only one is showing this error several times a day. With a small test program I'm able to reproduce the error by just establishing a TCP connection on the SQL Server listening port. Running CurrPorts (http://www.nirsoft.net/utils/cports.html) shows there's still plenty of available ports in range 1024-5000.

    I'm out of ideas and would like to know if you've found a solution since you've posted your question.

    Edit : I finally found the solution : a worm was present on the server (WORM_DOWNAD.A) and exhausted local ports without being noticed.

    0 讨论(0)
提交回复
热议问题