前几天,有了新的接口性能测试需求,同事在添加 HTTP请求 后,运行时响应信息如下所示:
java.net.SocketException: Permission denied: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
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 org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:505)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:328)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1141)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1130)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:431)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:258)
at java.lang.Thread.run(Thread.java:745)
经过问询谷大爷,查了一下,发现只要在启动脚本里添加 -Djava.net.preferIPv4Stack=true
参数,将其网络偏爱设置为 IPv4。设置如下所示:
启动配置文件路径:{JMeter 主目录}\bin
Linux 启动配置文件:jmeter.sh,添加如下启动参数设置:
export JVM_ARGS="-Djava.net.preferIPv4Stack=true"
Winows 启动配置文件:jmeter.bat,添加如下启动参数设置:
set JVM_ARGS="-Djava.net.preferIPv4Stack=true"
重新启动 JMeter 运行脚本即可解决之前的报错。
后记:
问题解决后,作为一名专职测试人员,我问自己难道是开发对此接口设置了 IPv4 偏好 ?!想想不应该呀。。。为防止用户在访问上述接口出现此问题,我还是去找相应的接口开发人确认了一下。经确认其未进行相应的设置,同时查看源码遍历 IPv 信息,也未发现有相应的设定!
新的问题出现了,是什么导致了其访问接口的时候,偏好了 IPv4 的呢 ????
正所谓,功夫不负有心人!后经努力,查询 JDK 的 Networking Properties 才得到了最终的答案,如下所示。
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAA5cAAAC5CAIAAAAzuVxpAAAbJklEQVR4nO3dwXXjMJLGcYY0Cex59+brpjCHzWLfcxATQIfiMPrYYWgObmtoAlX1FQCSgPz/Pb5+EgUWCiBIVatl9/b79+8HAAAAsJSNKhYAAADLoYoFAADAerbfv3//4///wcbGxsbGxsbGxrbKRhXLxsbGxsbGxsa23kYVy8bGxsbGxsbGtt52rGJv/nYDAAAAYKOKBQAAwHqoYgEAALAeqlgAAACshyoWAAAA68lXsR/vW+nt15/rcrbTuCWTof78enuFYQAAAJys+bPYv+XW+8cFSaopfJWAdybViSoWAABA8VJV7OPrI9rJa8CP97VLbQAAgNu9WhU7QVqhzxynThEAAGByr1bFzv9Z7At87QEAAOB2Q6vYrwLt6e+r334S6+3Xn+8t3379sQ5MpvDVz/vHvsv3j2N3Rrp/X/lPlO8/QbYrjQ9Hfr0SdGr9QNrnAL7FrJXhRqfG1M9dygMAAHQaV8UePwU9PP98uqtOP97/vhwcGKbg1G5/fr1t29vb2+f+v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KxsbGxsbGxsa23UcWysbGxsbGxsbGtt/2tYm/9egMAAACQRhULAACA9fwbMhuV8BWfXtEAAAAASUVORK5CYII=" alt="" />
后来查询了一下 JMeter 的用户手册,发现可以通过修改其配置文件,实现在任意系统的移植,而不需要改每个系统对应的启动文件。
系统配置文件:{JMeter 主目录}\bin\system.properties,将 java.net.preferIPv4Stack 设置为 true 即可。
至此,此文顺利完结,希望此文能够给初学 JMeter 的您一份参考。
最后,非常感谢亲的驻足,希望此文能对亲有所帮助。热烈欢迎亲一起探讨,共同进步。非常感谢! ^_^