zoukankan      html  css  js  c++  java
  • jmeter: 报错锦集

    1、os::commit_memory

    运行jmeter,报错:

    Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000e0000000, 536870912, 0) failed; error='Cannot allocate memory' (errno=12)
    #
    # There is insufficient memory for the Java Runtime Environment to continue.
    # Native memory allocation (mmap) failed to map 536870912 bytes for committing reserved memory.
    # An error report file with more information is saved as:
    # /root/apache-jmeter-5.2.1/hs_err_pid12705.log

    这是因为系统内存分配不够,两个方案:一个增加内存,另一个设置堆大小

    方案二:设置堆大小:

    编辑jmeter/bin路径下的jmeter文件:

    vim /root/apache-jmeter-5.2.1/bin/jmeter

    找到:"${HEAP:="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m"}

    默认为1g,你可以根据自己的实际容量,设置多少,我的发现只有100多M,只能设置小一点才可以打得开jmeter了

           "${HEAP:="-Xms100m -Xmx100m -XX:MaxMetaspaceSize=256m"}

    2、非GUI运行驱动异常:

    报错:

    Error in NonGUIDriver com.thoughtworks.xstream.io.StreamException:
    An error occurred: Error in NonGUIDriver

    这个原因大部分为jmx文件异常,或者自己在保存时没有正常保存到,建议重新看一下,重新打开jmeter查看再拷贝进来

    3、CannotResolveClassException: kg.apc.jmeter.vizualizers.CorrectedResultCollector

    Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/root/jmeter_report/docker.jmx'.
    Cause:
    CannotResolveClassException: kg.apc.jmeter.vizualizers.CorrectedResultCollector

    Detail:com.thoughtworks.xstream.converters.ConversionException:
    ---- Debugging information ----
    cause-exception : com.thoughtworks.xstream.converters.ConversionException
    cause-message :
    first-jmeter-class : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:67)
    class : org.apache.jmeter.save.ScriptWrapper
    required-type : org.apache.jmeter.save.ScriptWrapper
    converter-type : org.apache.jmeter.save.ScriptWrapperConverter
    path : /jmeterTestPlan/hashTree/hashTree/hashTree/kg.apc.jmeter.vizualizers.CorrectedResultCollector
    line number : 135
    version : 5.2.1
    -------------------------------
    An error occurred: Error in NonGUIDriver Problem loading XML from:'/root/jmeter_report/docker.jmx'.
    Cause:
    CannotResolveClassException: kg.apc.jmeter.vizualizers.CorrectedResultCollector

    Detail:com.thoughtworks.xstream.converters.ConversionException:
    ---- Debugging information ----
    cause-exception : com.thoughtworks.xstream.converters.ConversionException
    cause-message :
    first-jmeter-class : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:67)
    class : org.apache.jmeter.save.ScriptWrapper
    required-type : org.apache.jmeter.save.ScriptWrapper
    converter-type : org.apache.jmeter.save.ScriptWrapperConverter
    path : /jmeterTestPlan/hashTree/hashTree/hashTree/kg.apc.jmeter.vizualizers.CorrectedResultCollector
    line number : 135
    version : 5.2.1
    -------------------------------

    这里明显的报了插件异常,要么你的插件在当前环境有问题或者当前环境没有安装到脚本里面需要的插件。

    解决方案:1、在当前环境安装插件。2、打开脚本,把对应插件删除remove重新上传运行

  • 相关阅读:
    CORS详解
    JBoss 系列九十九:Rest WebService jBPM 6 集成演示样例
    atitit。浏览器缓存机制 and 微信浏览器防止缓存的设计 attilax 总结
    4G时代来临,运营商为谁搭台献唱?
    Pascal's Triangle II
    cocos2d-x 3.6版连连看载入资源
    SlidingMenu导入编译用法--Eclipse和IDEA
    【解决】hive动态添加partitions不能超过100的问题
    AngularJS clone directive 指令复制
    AndroidStudio文件夹结构视图讲解
  • 原文地址:https://www.cnblogs.com/fengliting/p/14213931.html
Copyright © 2011-2022 走看看