RSS Feed for This PostCurrent Article

JMeter Exception: Address already in use: connect

This is the exception I encountered whenever I run load test against HTTP or Web Service Requests using JMeter.

I am running 120 concurrent threads using a Windows based notebook.

After searching, I found that this problem is Windows based. There is a article at, which says Windows XP only will make outbound TCP/IP connections using ports 1024-5000, and takes up to 4 minutes to recycle them. Therefore, if you do a lot of connections in a short amount of time, you
can easily eat that port range up.

The steps

  1. Start Registry Editor.
  2. Locate the following subkey in the registry, and then click Parameters:
  3. On the Edit menu, click New, and then add the following registry entry:
    Value Name: MaxUserPort
    Value Type: DWORD
    Value data: 65534
    Valid Range: 5000-65534 (decimal)
    Default: 0x1388 (5000 decimal)
    Description: This parameter controls the maximum port number that is used when a program requests any available user port from the system. Typically , ephemeral (short-lived) ports are allocated between the values of 1024 and 5000 inclusive. 
  4. Exit Registry Editor, and then restart the computer.

Trackback URL

Sorry, comments for this entry are closed at this time.