首页 > 技术文章 > Jmeter学习笔记-jmeter执行结束报错:The JVM should have exitted but did not

shishibuwan 2019-03-15 11:15 原文

原文:https://blog.csdn.net/lijing742180/article/details/80901933

 

当使用jmeter 非GUI模式 对java请求进行性能测试时,在执行结束时会报错:

The JVM should have exitted but did not.

The following non-daemon threads are still running (DestroyJavaVM is OK):

 

原因:在执行java请求时会在jmeter线程之外,另外启动java线程,导致在脚本执行结束时JVM无法退出。

若要避免这种现象,需要修改jmeter.properties 中的jmeterengine.force.system.exit=true。

如下图所示:

#jmeterengine.force.system.exit=false

配置文件中此项默认是false,需要改成

jmeterengine.force.system.exit=true

然后再次执行脚本,就不会报错了。

 


推荐阅读