JVM应该已经退出但没有退出 [英] The JVM should have exited but did not

查看:484
本文介绍了JVM应该已经退出但没有退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在非GUI模式下使用Jmeter 3.3进行分布式测试期间,出现错误,我该如何解决:

During Distributed testing with Jmeter 3.3 in non gui mode i'm getting error as, how can I fix this :

我正在Master和Slave机器上使用相同版本的JMeter和JDK.

I'm using same version of JMeter and JDK on Master as well as Slave machines.

JVM应该已经退出,但是没有退出. 以下非守护程序线程仍在运行(DestroyJavaVM正常): 线程[main,5,main],

The JVM should have exited but did not. The following non-daemon threads are still running (DestroyJavaVM is OK): Thread[main,5,main],

stackTrace:java.net.SocketInputStream#socketRead0
java.net.SocketInputStream#socketRead
java.net.SocketInputStream#read
java.net.SocketInputStream#read
java.io.BufferedInputStream#fill
java.io.BufferedInputStream#read
java.io.DataInputStream#readByte
sun.rmi.transport.StreamRemoteCall#executeCall
sun.rmi.server.UnicastRef#invoke
java.rmi.server.RemoteObjectInvocationHandler#invokeRemoteMethod
java.rmi.server.RemoteObjectInvocationHandler#invoke
com.sun.proxy.$Proxy19#rrunTest
org.apache.jmeter.engine.ClientJMeterEngine#runTest at line:149
org.apache.jmeter.engine.DistributedRunner#start at line:132
org.apache.jmeter.engine.DistributedRunner#start at line:149
org.apache.jmeter.JMeter#runNonGui at line:1005
org.apache.jmeter.JMeter#startNonGui at line:910
org.apache.jmeter.JMeter#start at line:538
sun.reflect.NativeMethodAccessorImpl#invoke0
sun.reflect.NativeMethodAccessorImpl#invoke
sun.reflect.DelegatingMethodAccessorImpl#invoke
java.lang.reflect.Method#invoke
org.apache.jmeter.NewDriver#main at line:248

推荐答案

您的JMeter引擎很可能已过载,因此,当您请求关闭正在运行的线程时,它们无法正常关闭.

Most probably your JMeter engine(s) is(are) overloaded therefore cannot gracefully shut down running threads when you request them to do so.

  1. 确保您遵循 JMeter最佳做法
  2. 第一个最佳实践"指出始终使用最新版本的JMeter ,因此请考虑迁移到 JMeter 5.0 或最新版本可以在 JMeter下载
  3. 中获得该版本.
  4. 确保您的JMeter实例具有足够的净空以在CPU,RAM等方面进行操作.如果您没有其他监控软件,则可以使用 JMeter PerfMon插件来实现. /心里.
  5. 采用线程转储并进行检查-这样一来,您将知道测试的确切位置
  6. HTTP请求默认值中引入合理的超时值服务器无法响应的情况下,JMeter不会无限等待,而是会因错误而失败

  1. Make sure you follow JMeter Best Practices
  2. The very first "best practice" states Always use latest version of JMeter so consider migrating to JMeter 5.0 or whatever latest version is available at JMeter Downloads page
  3. Make sure your JMeter instances have enough headroom to operate in terms of CPU, RAM and so on. You can use JMeter PerfMon Plugin for this if you don't have other monitoring software in place/in mind.
  4. Take a thread dump and examine it - this way you will know where exactly your test is stuck
  5. Introduce reasonable timeout values in HTTP Request Defaults so in case when server fails to respond JMeter wouldn't wait infinitely but rather fail with an error

最后(但是我不推荐这样做),您可以禁止通过在 user.properties 文件中添加下一行来进行此项检查:

And finally (however I wouldn't recommend this) you can suppress this check by adding the next line to user.properties file:

jmeter.exit.check.pause=-1

如果要这样做,请记住,即使测试结束后,JMeter从站仍会尝试执行某些操作,因此您将需要手动或使用脚本终止并重新启动进程.

if you go for this keep in mind that you may run into a situation when JMeter slaves will still be trying to execute something even after your test ends so you will need to kill and restart the processes manually or using a script.

这篇关于JVM应该已经退出但没有退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆