首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >JMeter -Tank无法运行JMeter -无法访问Yandex可执行文件或该文件不存在

JMeter -Tank无法运行JMeter -无法访问Yandex可执行文件或该文件不存在
EN

Stack Overflow用户
提问于 2020-03-16 15:10:06
回答 1查看 214关注 0票数 1

我正在尝试在基于Ubuntu18的Yandex Cloud实例中从Yandex.Tank启动JMeter

此处安装了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时,出现错误消息:

代码语言:javascript
复制
[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

load.yaml:

代码语言:javascript
复制
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"

我试过了,但没有成功:

代码语言:javascript
复制
chmod +x /home/tank/apache-jmeter-5.2.1/bin/jmeter
chmod 777 /home/tank/apache-jmeter-5.2.1/bin/jmeter
EN

回答 1

Stack Overflow用户

发布于 2020-03-16 17:51:07

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

代码语言:javascript
复制
pip install https://api.github.com/repos/yandex/yandex-tank/tarball/master

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

代码语言:javascript
复制
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...

您还可以尝试通过change the ownership of the whole JMeter folder连接到tank用户,如下所示:

代码语言:javascript
复制
chown -R tank /home/tank/apache-jmeter-5.2.1

最后,您可以考虑切换到更好地支持JMeter并支持automatically downloading JMeter with pluginsTaurus工具,这样您就不必担心安装JMeter了。有关更多详细信息,请查看Navigating your First Steps Using Taurus文章。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60701663

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档