IT/기타

Jmeter 오류(java.net.BindException: Address already in use: connect)

으어오오옹 2019. 6. 4. 13:36
반응형

local 에서 spring boot application 2개를 띄웠고 A application 으로 들어온 요청을 가공 후 B application 으로 보낸뒤 응답을 받는(client -> A -> B -> A -> client) 테스트 중 Jmeter 에서 300 thread 로 테스트 시 아래와 같은 오류 발생.

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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:654)
  at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:413)
  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:491)
  at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:425)
  at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:254)
  at java.lang.Thread.run(Unknown Source)
 
cs

 

아래 참고 링크를 참고하여 윈도우 레지스트리 값을 수정하였다.

Win+R regedit 입력

win+r regedit

컴퓨터\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters 

경로의 MaxUserPort 값 우클릭 > 수정 후 10진후에 체크한 뒤 65534 로 수정

 

이후 해당 에러는 발생하지 않았지만 application 의 connection pool 이 문제인지 일정한 tps 가 나오질 않네...

 

참고 :

linux : https://stackoverflow.com/questions/14194783/apache-multiple-requests-with-jmeter

 

Apache multiple requests with jmeter

I am using Jmeter to test multiple requests to my web application. I used NumberOfThread in Jmeter as 50. My process is as follows: Login page. Login with userID and password. Show menu page. Click

stackoverflow.com

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

 

Solved "java.net.BindException: Address already in use: connect" issue on Windows - BASE Logic, Inc.

I have been running into issues on Windows servers while running JMeter tests, but also when I have been tuning akka as described in another blog of mine https://www.baselogic.com/blog/development/java-javaee-j2ee/akka-actor-thread-utilization-and-optimiza

www.baselogic.com

 

반응형