The "Address already in use: connect" error

The "Address already in use: connect" error

The "Address already in use: connect" error is caused by client socket starvation on the machine(s) that SOAPtest is running on. By default Windows does not allow you to set up client connections on ports above 5000. After a socket has been closed, the connection stays in a TIME_WAIT state for another 2 minutes, after which the socket is freed and the address can be reused. If more than 4000 connections (1024-5000) have been made before those ports are freed (after 2 min. in TIME_WAIT), then attempts to open a client socket on a port above 5000 will be rejected by the operating system, which will cause Java to throw "Address already in use: connect". This can be fixed by modifying the Windows registry entry that controls this parameter:

1. Start Registry Editor: Start Menu > Run > Type in "regedit"
2. Locate the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
3. Right click on the Parameters folder and select New > DWORD Value
4. Name this new key "MaxUserPort"
4. Double click on the "MaxUserPort" key and change the value data to 65534 and select "Decimal" as the base.
5. Restart the machine.

你可能感兴趣的:(connect)