jmeter分布式执行中RMI出现问题

时间:2018-09-06 14:56:43

标签: jmeter

在jmeter中,分布式执行可能会在从机的jmeter-serever.log中引发以下错误,并试图连接根本未在master的jmeter.properties文件中配置的其他IP 192.170.70.1。主服务器和从服务器具有相同的版本jmeter(3.1)和java(1.8.0_171),请告诉我。

In jmeter.propeties I have configured the different IP'S like  10.xxx.xx.xx

2018/09/06 15:40:00 ERROR - jmeter.samplers.RemoteTestListenerWrapper:  java.rmi.ConnectException: Connection refused to host: **192.170.70.1**; nested exception is: 
    java.net.ConnectException: Connection timed out: connect
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
    at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
    at com.sun.proxy.$Proxy1.testEnded(Unknown Source)
    at org.apache.jmeter.samplers.RemoteTestListenerWrapper.testEnded(RemoteTestListenerWrapper.java:79)
    at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfEnd(StandardJMeterEngine.java:218)
    at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:437)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection timed out: 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 java.net.Socket.connect(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
    ... 11 more

1 个答案:

答案 0 :(得分:0)

您很可能在客户端和jmeter服务器之间有防火墙。

确保您打开:

  • server_port = 1099(默认值)
  • server.rmi.port = 0(更改值和打开端口)
  • server.rmi.localport = 0(更改值和打开端口)
  • client.rmi.localport = 0(更改值和打开端口)

但是在这些组件之间没有防火墙不是很好。

此外,您正在使用的JMeter 3.1现在已经很旧,请更新为JMeter 4.0或3.3。