[Solved] jmeter Stress Test Error: java.net.BindException: Address already in use: connect

When JMeter} performs stress testing, the following errors will be reported when testing with high threads for a long time:


First, check the server log and find that there are no errors.

Then check the nginx data. It is found that the number of requests is inconsistent with the number of requests sent by the test. The server receives less and thinks of losing requests.

Later, after searching the information, it was found that it was the problem of the windows machine,

Reason: Windows provides 1024-5000 ports for TCP/IP links, and it takes four minutes to recycle them, which causes us to fill up the ports when running a large number of requests in a short time, resulting in an error report.

Solution (operate on the server where JMeter is located):

1. Enter regedit command in CMD to open the registry;

2. In HKEY_LOCAL_Machine\system\currentcontrolset\services\TCPIP\parameters right-click parameters;

3. Add a new DWORD named maxuserport;

4. Double click maxuserport, enter 65534 numerical data, and select decimal base;

5. After completing the above operations, be sure to restart the machine and solve the problem.

PS: Although the normal test can be carried out, the same problem occurs after increasing the number of threads a few days. The following configuration is required:

After the third step above, add tcptimedwaitdelay, the value is 30-300, and select decimal.

You still need to restart your computer

Similar Posts: