1

我正在尝试JMeterYandex.Tank基于 Ubuntu 18 的 Yandex Cloud 实例开始。在
此处安装 JMeter:/home/tank/apache-jmeter-5.2.1/bin/jmeter
如果我使用此路径运行 JMeter,它将成功启动:
/home/tank/apache-jmeter-5.2.1/bin/jmeter -n -t ReloadTest.jmx -l result-1.jtl -e -o ./result-1

当我运行时yandex-tank,有一条错误消息:

[ERROR] Test interrupted:
<type 'exceptions.RuntimeError'>: Unable to access to JMeter executable file or it does not exist: 
/home/tank/apache-jmeter-5.2.1/bin/jmeter

加载.yaml:

phantom:
  enabled: false
jmeter:
  enabled: true
  jmx: ReloadTest.jmx
  buffered_seconds: 10
  jmeter_path: /home/tank/apache-jmeter-5.2.1/bin/jmeter
  jmeter_ver: 5.2
  ext_log: all
overload:
  enabled: true
  package: yandextank.plugins.DataUploader
  token_file: "token.txt"

试过这个,没有成功:

chmod +x /home/tank/apache-jmeter-5.2.1/bin/jmeter
chmod 777 /home/tank/apache-jmeter-5.2.1/bin/jmeter
4

1 回答 1

0

我无法使用最新的 YandexTank 1.12.8.1 重现您的问题,您可能希望使用pip更新您当前的安装,例如:

pip install https://api.github.com/repos/yandex/yandex-tank/tarball/master

如果仍然遇到问题 - 使用-v命令行参数运行 YandexTank,它应该会产生更详细的调试消息,以便您能够找出问题所在

2020-03-16 09:45:38,960 [DEBUG] yandextank.core.tankcore tankcore.py:267        Starting <yandextank.plugins.JMeter.plugin.Plugin object at 0x7fe01d57a090>
2020-03-16 09:45:38,968 [INFO] yandextank.plugins.JMeter.plugin plugin.py:119   Starting /home/tank/apache-jmeter-5.2.1/bin/jmeter with arguments: ['/home/tank/apache-jmeter-5.2.1/bin/jmeter', '-n', '-t', '/modified_s7ZsHU.jmx', '-j', '/logs/2020-03-16_09-45-22.748390/jmeter_0vPrFi.log', '-Jjmeter.save.saveservice.default_delimiter=\\t', '-Jjmeter.save.saveservice.connect_time=true']
2020-03-16 09:45:50,632 [WARNING] yandextank.plugins.JMeter.plugin plugin.py:188        JMeter UDP port wasn't discovered
2020-03-16 09:45:50,635 [INFO] yandextank.core.tankcore tankcore.py:271 Plugin <yandextank.plugins.JMeter.plugin.Plugin object at 0x7fe01d57a090> required 11.666250 seconds to start
2020-03-16 09:45:50,637 [DEBUG] yandextank.core.tankcore tankcore.py:267        Starting <yandextank.plugins.RCAssert.plugin.Plugin object at 0x7fe01d5059d0>
2020-03-16 09:45:50,640 [INFO] yandextank.core.tankcore tankcore.py:271 Plugin <yandextank.plugins.RCAssert.plugin.Plugin object at 0x7fe01d5059d0> required 0.000021 seconds to start
2020-03-16 09:45:50,647 [DEBUG] yandextank.core.tankcore tankcore.py:267        Starting <yandextank.plugins.Telegraf.plugin.Plugin object at 0x7fe01d505110>
2020-03-16 09:45:50,650 [DEBUG] yandextank.plugins.Telegraf.plugin plugin.py:62 load_start_time = 1584351950.65
2020-03-16 09:45:50,655 [INFO] yandextank.core.tankcore tankcore.py:271 Plugin <yandextank.plugins.Telegraf.plugin.Plugin object at 0x7fe01d505110> required 0.005424 seconds to start
2020-03-16 09:45:50,659 [DEBUG] yandextank.core.tankcore tankcore.py:267        Starting <yandextank.plugins.ResourceCheck.plugin.Plugin object at 0x7fe01d505c50>
2020-03-16 09:45:50,664 [INFO] yandextank.core.tankcore tankcore.py:271 Plugin <yandextank.plugins.ResourceCheck.plugin.Plugin object at 0x7fe01d505c50> required 0.000014 seconds to start
2020-03-16 09:45:50,666 [INFO] yandextank.core.tankcore tankcore.py:279 Waiting for test to finish...

您还可以尝试将整个 JMeter 文件夹的所有权更改为用户,tank例如:

chown -R tank /home/tank/apache-jmeter-5.2.1

最后,您可以考虑切换到Taurus工具,它更好地支持 JMeter,并且能够自动下载带有插件的 JMeter,这样您就不必担心安装 JMeter。查看使用 Taurus 导航您的第一步文章了解更多详细信息。

于 2020-03-16T09:51:07.317 回答