Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

1 like 0 dislike
9.9k views
by The go-to Tester (190 points)
edited by
While doing jmeter test am getting this error. Help me to solve this.

Thread Group

user - 50

Rmp - 0

Repeat - 1

Simple controller

      ..My page

I view the result in tree it show error in my domain  url ans in my Response data am getting this one

java.net.BindException: Address already in use: connect

at java.net.DualStackPlainSocketImpl.connect0(Native Method)

at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)

at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)

at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)

at java.net.AbstractPlainSocketImpl.connect(Unknown Source)

at java.net.PlainSocketImpl.connect(Unknown Source)

at java.net.SocksSocketImpl.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)

at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)

at org.apache.jmeter.protocol.http.sampler.hc.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:318)

at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.open(MeasuringConnectionManager.java:114)

at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610)

at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445)

at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)

at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)

at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:695)

at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:454)

at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)

at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1189)

at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1178)

at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:498)

at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:424)

at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255)

at java.lang.Thread.run(Unknown Source)

1 Answer

1 like 0 dislike
by The go-to Tester (190 points)
selected by
 
Best answer

I solved this Problem by following this website

https://www.baselogic.com/2011/11/23/solved-java-net-bindexception-address-use-connect-issue-windows/

The solution.

The default maximum number of ephemeral TCP ports is 5000 in the products that are included in the “Applies to” section. A new parameter has been added in these products. To increase the maximum number of ephemeral ports, follow these steps:

  1. Start Registry Editor.
  2. Locate the following subkey in the registry, and then click Parameters: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\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. After the release of security bulletin MS08-037, the behavior of Windows Server 2003 was changed to more closely match that of Windows Server 2008 and Windows Vista. For more information about Microsoft security bulletin MS08-037, click the following article numbers to view the articles in the Microsoft Knowledge Base:

951746 MS08-037: Description of the security update for DNS in Windows Server 2008, in Windows Server 2003, and in Windows 2000 Server (DNS server-side): July 8, 2008

951748 MS08-037: Description of the security update for DNS in Windows Server 2003, in Windows XP, and in Windows 2000 Server (client side): July 8, 2008

953230 MS08-037: Vulnerabilities in DNS could allow spoofing

Exit Registry Editor, and then restart the computer.

This seemed like it was simple, but I was not able to find the correct editable parameter in my regedit.

Here is what I did to add this parameter:

  1. Right mouse clicked on Parameters.
  2. Create a new DWORD value with name MaxUserPort
  3. Right mouse click on MaxUserPort .
  1. then enter 65534 for the Value Data field.
  2. Under the radio button selection for Base, select the Decimal radio button.
by Expert (572 points)
Thank you for providing the solution @Abhishek. I have added content from the page with reference link back to the site. In case of the site is down or the page on the site is removed/moved, we will have the solution still available.
...