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

原创 2019-12-05 17:23 阅读(343)次

在用jmeter测试seata性能时,并发到了200多,部分请求能正常访问,部分却报地址被占用

Caused by: feign.RetryableException: Address already in use: connect executing POST http://mcu-stock/api/stockInfo/saveStockDetail

看了下jmeter请求日志,jmeter自身也在报这个错误

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

明显这个错误跟我们看到的tomcat端口被占用不一样

我服务端feign错误日志如下:

Caused by: feign.RetryableException: Address already in use: connect executing POST http://mcu-stock/api/stockInfo/saveStockDetail
	at feign.FeignException.errorExecuting(FeignException.java:67)
	at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:104)
	at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76)
	at feign.hystrix.HystrixInvocationHandler$1.run(HystrixInvocationHandler.java:108)
	at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:302)
	at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:298)
	at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:46)
	... 124 more
Caused by: java.net.BindException: Address already in use: connect
	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
	at sun.net.www.http.HttpClient.New(HttpClient.java:339)
看了下文件句柄数,当时是5万9000多,可能是这个问题,因为句柄数据不能超过6万多,百度了下,好像真有人碰到过,想想平时我这电脑到不了这么高,可能是机器太久没关,重启了下,重新做我的性能测试,就没有这个问题了

下一篇:activemq同步异步