SocketException:权限被拒绝:在Jmeter中连接

时间:2017-11-21 01:15:07

标签: jmeter performance-testing jmeter-plugins

我正在录制我的客户端网络应用程序。直到我能够记录的3-4个步骤,但点击一个选项后。我正在获取"连接到网络"当点击连接按钮时,它会打开新选项卡,我收到了轰鸣声错误。

如何克服这个并继续录制?

java.net.SocketException: Permission denied: 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 `enter code here`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.proxy.Proxy.run(Proxy.java:244) 

1 个答案:

答案 0 :(得分:0)

  1. 尝试将下一行添加到 system.properties 文件(位于JMeter“bin”文件夹中)

    java.net.preferIPv4Stack=true
    

    并重新启动JMeter以选择属性

  2. 尝试升级到Java 8JMeter 3.3(或JMeter Downloads页面上提供的最新版本)

  3. 尝试最新的JMeter Nightl y build

  4. 展望未来请将 jmeter.log 文件的至少重要部分包含在您的问题中,以便我们看到JMeter版本,Java版本等。