Taurus master 在 azure 上连接到同一网络中的 jmeter 从站时关闭测试运行

Posted

技术标签:

【中文标题】Taurus master 在 azure 上连接到同一网络中的 jmeter 从站时关闭测试运行【英文标题】:Taurus master shuts down test run when connecting to jmeter slaves in the same network on azure 【发布时间】:2021-12-01 02:59:58 【问题描述】:

Error image

我在主节点中以分布式模式运行 taurus,在从节点中运行 jmeter。从站正在正确运行 jmeter 服务器,但主站无法执行测试。主实例能够访问该 ip 上的远程主机,但测试计划执行失败。我在 taurus yml 场景中 ping bng url。 下面是jmeter日志供参考。

13:07:38 ERROR: JMeter log:
2021-10-12 13:07:29,533 INFO o.a.j.u.JMeterUtils: Setting Locale to en_EN
2021-10-12 13:07:29,550 INFO o.a.j.JMeter: Loading user properties from: /opt/apache-jmeter-5.4/bin/user.properties
2021-10-12 13:07:29,550 INFO o.a.j.JMeter: Loading system properties from: /opt/apache-jmeter-5.4/bin/system.properties
2021-10-12 13:07:29,551 INFO o.a.j.JMeter: Loading additional properties from: /root/bzt/2021-10-12_13-07-24.364107/jmeter-bzt.properties
2021-10-12 13:07:29,551 INFO o.a.j.JMeter: Setting Global properties from the file /root/bzt/2021-10-12_13-07-24.364107/jmeter-bzt.properties
2021-10-12 13:07:29,551 INFO o.a.j.JMeter: Setting System properties from file: /root/bzt/2021-10-12_13-07-24.364107/system.properties
2021-10-12 13:07:29,615 INFO o.a.j.JMeter: Copyright (c) 1998-2020 The Apache Software Foundation
2021-10-12 13:07:29,615 INFO o.a.j.JMeter: Version 5.4
2021-10-12 13:07:29,616 INFO o.a.j.JMeter: java.version=1.8.0_275
2021-10-12 13:07:29,616 INFO o.a.j.JMeter: java.vm.name=OpenJDK 64-Bit Server VM
2021-10-12 13:07:29,616 INFO o.a.j.JMeter: os.name=Linux
2021-10-12 13:07:29,616 INFO o.a.j.JMeter: os.arch=amd64
2021-10-12 13:07:29,616 INFO o.a.j.JMeter: os.version=4.15.0-1113-azure
2021-10-12 13:07:29,616 INFO o.a.j.JMeter: file.encoding=UTF-8
2021-10-12 13:07:29,616 INFO o.a.j.JMeter: java.awt.headless=true
2021-10-12 13:07:29,616 INFO o.a.j.JMeter: Max memory     =4294967296
2021-10-12 13:07:29,616 INFO o.a.j.JMeter: Available Processors =1
2021-10-12 13:07:29,625 INFO o.a.j.JMeter: Default Locale=English (EN)
2021-10-12 13:07:29,625 INFO o.a.j.JMeter: JMeter  Locale=English (EN)
2021-10-12 13:07:29,625 INFO o.a.j.JMeter: JMeterHome=/opt/apache-jmeter-5.4
2021-10-12 13:07:29,625 INFO o.a.j.JMeter: user.dir  =/root/bzt
2021-10-12 13:07:29,626 INFO o.a.j.JMeter: PWD       =/root/bzt
2021-10-12 13:07:29,626 INFO o.a.j.JMeter: IP: 10.97.104.71 Name: wk-caas-72db06a10f1e40fba0235dcea9465aaf-bd09aa1593d47434818635 FullName: wk-caas-72db06a10f1e40fba0235dcea9465aaf-bd09aa1593d47434818635
2021-10-12 13:07:29,626 INFO o.a.j.JMeter: user.classpath=/root/bzt/2021-10-12_13-07-24.364107:/root/bzt/2021-10-12_13-07-24.364107
2021-10-12 13:07:29,626 INFO o.a.j.JMeter: Adding to classpath and loader: /root/bzt/2021-10-12_13-07-24.364107
2021-10-12 13:07:29,627 INFO o.a.j.JMeter: Adding to classpath and loader: /root/bzt/2021-10-12_13-07-24.364107
2021-10-12 13:07:29,635 INFO o.a.j.s.FileServer: Default base='/root/bzt'
2021-10-12 13:07:29,636 INFO o.a.j.s.FileServer: Set new base='/root/bzt/2021-10-12_13-07-24.364107'
2021-10-12 13:07:29,963 INFO o.a.j.s.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2
2021-10-12 13:07:30,057 INFO o.a.j.s.SaveService: Using SaveService properties file encoding UTF-8
2021-10-12 13:07:30,063 INFO o.a.j.s.SaveService: Using SaveService properties version 5.0
2021-10-12 13:07:30,072 INFO o.a.j.s.SaveService: Loading file: /root/bzt/2021-10-12_13-07-24.364107/modified_requests.jmx
2021-10-12 13:07:30,144 INFO o.a.j.p.h.c.CacheManager: Will only cache the following methods: [GET]
2021-10-12 13:07:30,146 INFO o.a.j.p.h.c.CookieManager: Settings: Delete null: true Check: true Allow variable: true Save: false Prefix: COOKIE_
2021-10-12 13:07:30,226 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2021-10-12 13:07:30,226 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2021-10-12 13:07:30,226 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2021-10-12 13:07:30,226 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2021-10-12 13:07:30,226 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2021-10-12 13:07:30,227 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser
2021-10-12 13:07:30,339 INFO o.a.j.e.DistributedRunner: Configuring remote engine: 10.97.104.70:1099
2021-10-12 13:07:30,341 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2021-10-12 13:07:30,421 INFO o.a.j.e.DistributedRunner: Starting distributed test with remote engines: [10.97.104.70:1099] @ Tue Oct 12 13:07:30 GMT 2021 (1634044050419)
2021-10-12 13:07:30,421 INFO o.a.j.e.ClientJMeterEngine: running clientengine run method
2021-10-12 13:07:30,427 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2021-10-12 13:07:30,427 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2021-10-12 13:07:31,313 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2021-10-12 13:07:31,313 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2021-10-12 13:07:31,316 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2021-10-12 13:07:31,323 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000
2021-10-12 13:07:31,323 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run
2021-10-12 13:07:31,323 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2021-10-12 13:07:31,323 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2021-10-12 13:07:31,324 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000
2021-10-12 13:07:31,324 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run
2021-10-12 13:07:31,325 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2021-10-12 13:07:31,325 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2021-10-12 13:07:32,217 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2021-10-12 13:07:32,217 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2021-10-12 13:07:32,350 INFO o.a.j.e.ClientJMeterEngine: sent test to 10.97.104.70:1099 basedir='2021-10-12_13-07-24.364107'
2021-10-12 13:07:32,351 INFO o.a.j.e.ClientJMeterEngine: Sending properties user.classpath=/root/bzt/2021-10-12_13-07-24.364107:/root/bzt/2021-10-12_13-07-24.364107, jmeterengine.force.system.exit=true, jmeter.save.saveservice.timestamp_format=ms, summariser.name=, sampleresult.default.encoding=UTF-8, jmeterengine.nongui.port=4445, client.rmi.localport=1099, jmeter.save.saveservice.connect_time=true, jmeter.save.saveservice.autoflush=true, server.rmi.ssl.disable=True, loops=10, rampup=10, jmeterengine.nongui.maxport=4445, threads=2
2021-10-12 13:07:32,423 INFO o.a.j.e.ClientJMeterEngine: sent run command to 10.97.104.70:1099
2021-10-12 13:07:32,423 INFO o.a.j.e.DistributedRunner: Remote engines have been started:[10.97.104.70:1099]
2021-10-12 13:07:32,439 INFO o.a.j.JMeter: Started remote host:  10.97.104.70:1099 (1634044052439)
2021-10-12 13:07:32,561 INFO o.a.j.JMeter: Finished remote host: 10.97.104.70:1099 (1634044052561)
2021-10-12 13:07:32,561 INFO o.a.j.JMeter: All remote engines have ended test, starting RemoteTestStopper thread
2021-10-12 13:07:37,565 INFO o.a.j.JMeter: Interrupting RMI Reaper
13:07:38 INFO: Artifacts dir: /root/bzt/2021-10-12_13-07-24.364107
13:07:38 WARNING: Done performing with code: 1

【问题讨论】:

请勿发布代码、数据、错误消息等的图片 - 将文本复制或输入到问题中。 How to Ask 【参考方案1】:
2021-10-12 13:07:32,439 INFO o.a.j.JMeter: Started remote host:  10.97.104.70:1099 (1634044052439)
2021-10-12 13:07:32,561 INFO o.a.j.JMeter: Finished remote host: 10.97.104.70:1099 (1634044052561)
    您确定您的测试应该在 122 毫秒内完成吗? 如果是,您确定从设备可以到达主设备以便将结果传回吗?

确保您可以从从机连接到您定义为client.rmi.localport 的端口,该端口在OS firewall 和Azure Network Security Groups 等中是打开的。

来自从站的jmeter-server.log file 也应该包含一些关于失败的信息。

更多信息:

Remote hosts and RMI configuration JMeter Distributed Testing with Docker - 在那里你可以看到如何打开哪些端口以及如何指定主从端口上的端口

【讨论】:

以上是关于Taurus master 在 azure 上连接到同一网络中的 jmeter 从站时关闭测试运行的主要内容,如果未能解决你的问题,请参考以下文章

Taurus.MVC V3.0.3 微服务开源框架发布:让.NET 架构在大并发的演进过程更简单。

Taurus.MVC V3.0.3 微服务开源框架发布:让.NET 架构在大并发的演进过程更简单。

Taurus.MVC V3.0.3 微服务开源框架发布:让.NET 架构在大并发的演进过程更简单。

Android 应用未连接 Azure-iot Hub

五个Taurus垃圾回收compactor优化方案,减少系统资源占用

性能工具之Taurus入门(安装篇)