使用 Gatling 进行性能测试,报错 (Address already in use: no further information)
试环境[*]Win 7 x64
[*]Java 1.8.0
[*]Gatling 3.0.0-RC2
测试脚本class MySimulation extends Simulation {
val httpConf = http
.baseUrl("http://192.168.1.244:1099")
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
.acceptEncodingHeader("gzip, deflate")
.userAgentHeader("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0")
val scn = scenario("Scenario Name")
.exec(http("request_1").get("/index.html"))
setUp(
scn.inject(
constantUsersPerSec(500) during(10 minutes)// 500个并发运行10分钟
).protocols(httpConf)
)
}
错误信息Wrapped by: io.netty.channel.AbstractChannel$AnnotatedSocketException: Address already in use: no further information: /192.168.1.244:1099
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:327)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:616)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
google到解决方案是端口不够链接,使用下面的命令增加端口配置netsh int ipv4 set dynamic tcp start=1025 num=57975
但是修改了后,仍出现相同的错误,使用 netsh -an 查看端口使用情况,居然占用了20000多个端口。。。
https://testerhome.com/uploads/photo/2018/f65158ef-b951-4aeb-b1b9-97e0aae06084.png!large
https://testerhome.com/uploads/photo/2018/fd322a43-129e-4f6e-b489-fb1f3adca1df.png!large
是我哪里配置不对吗,求解决方案。thx
为什么使用完成后不关闭呢 修改注册表,把端口回收时间缩减到5s :) 地址已经在用?
页:
[1]