You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

JMeter 5.5分布式测试报错:RemoteJMeterEngineImpl_Stub未实现rsetProperties方法

JMeter 5.5分布式测试报错解决方法

问题场景

在主从模式下运行JMeter 5.5分布式测试时触发报错,相同配置在JMeter 5.0中可正常运行。

执行命令

jmeter -f -Gup=3 -Gtime=1200 -Gthreads=15 -R10.104.60.246,10.104.60.7 -GData=source.csv -n -LERROR -t script.jmx -l result.csv -Djmeter.save.saveservice.output_format=csv

主从节点jmeter.properties关键RMI配置

#---------------------------------------------------------------------------
# Remote hosts and RMI configuration
#---------------------------------------------------------------------------

# Remote Hosts - comma delimited
#remote_hosts=127.0.0.1
#remote_hosts=localhost:1099,localhost:2010

# RMI port to be used by the server (must start rmiregistry with same port)
server_port=1099

# Parameter that controls the RMI port used by RemoteSampleListenerImpl (The Controller)
# Default value is 0 which means port is randomly assigned
# You may need to open Firewall port on the Controller machine
#client.rmi.localport=0

# When distributed test is starting, there may be several attempts to initialize
# remote engines. By default, only single try is made. Increase following property
# to make it retry for additional times
client.tries=6

# If there is initialization retries, following property sets delay between attempts
client.retries_delay=10000

# When all initialization tries was made, test will fail if some remote engines are failed
# Set following property to true to ignore failed nodes and proceed with test
client.continue_on_fail=true

# To use a specific port for the JMeter server engine, define
# the following property before starting the server:
server.rmi.localport=1099

# Set this if you don't want to use SSL for RMI
server.rmi.ssl.disable=true

控制台报错日志

Creating summariser <summary>
2023-02-15T07:04:57.3003208Z Created the tree successfully using script.jmx
2023-02-15T07:04:57.3004130Z Configuring remote engine: 10.104.60.246
2023-02-15T07:04:57.3004748Z Using local port: 1099
2023-02-15T07:04:57.3006687Z Using remote object: UnicastRef2 [liveRef: [endpoint:[10.104.60.246:1099](remote),objID:[6bba637c:18653e2b059:-7fff, 9032198663335379476]]]
2023-02-15T07:04:57.3008029Z Configuring remote engine: 10.104.60.7
2023-02-15T07:04:57.3009445Z Using remote object: UnicastRef2 [liveRef: [endpoint:[10.104.60.7:1099](remote),objID:[-484801ae:18653e2a54f:-7fff, 3605628237727967827]]]
2023-02-15T07:04:57.3015525Z Starting distributed test with remote engines: [10.104.60.246, 10.104.60.7] @ 2023 Feb 15 02:04:43 COT (1676444683410)
2023-02-15T07:04:57.3018176Z An error occurred: Receiver class org.apache.jmeter.engine.RemoteJMeterEngineImpl_Stub does not define or inherit an implementation of the resolved method 'abstract void rsetProperties(java.util.HashMap)' of interface org.apache.jmeter.engine.RemoteJMeterEngine.

机器配置

  • 操作系统:Amazon Linux 2
  • Java版本:java-11-amazon-corretto.x86_64

报错原因

JMeter 5.5对RMI通信接口做了更新,RemoteJMeterEngine接口新增了rsetProperties(java.util.HashMap)方法,报错由以下情况导致:

  • 主节点用JMeter 5.5,但从节点仍为JMeter 5.0,版本不匹配导致接口方法不一致
  • 从节点虽安装JMeter 5.5,但残留了旧版本的RMI存根(Stub)文件,未生成新的接口实现

解决方法

1. 统一主从节点JMeter版本

确保所有主、从节点都安装完全相同版本的JMeter 5.5,包括所有依赖包和插件。卸载旧版本后,重新下载官方JMeter 5.5包部署到所有节点。

2. 清理RMI缓存并重启服务

  • 停止所有JMeter进程(主节点测试进程、从节点jmeter-server进程)
  • 删除所有节点JMeter目录下的bin/rmi_keystore.jks(若启用过SSL),以及系统临时目录中的RMI存根文件
  • 在从节点重新启动jmeter-server,生成新的RMI存根

3. 确保RMI配置完全一致

确认所有节点的jmeter.properties中RMI相关配置统一:

  • server_port与server.rmi.localport保持相同值
  • server.rmi.ssl.disable设置一致(当前为true)
  • 使用JMeter 5.5自带的jmeter.properties,避免混合旧版本配置文件

4. 验证节点连通性

在主节点测试与从节点1099端口的连通性,确保防火墙未拦截RMI通信:

nc -zv 10.104.60.246 1099
nc -zv 10.104.60.7 1099

内容的提问来源于stack exchange,提问作者Luis Miguel Ramirez Jaramillo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.31 22:21:01