gpt4 book ai didi

jmeter - JVM 应该已经退出但没有

转载 作者:行者123 更新时间:2023-12-04 17:46:44 26 4
gpt4 key购买 nike

在非图形用户界面模式下使用 JMeter 执行脚本和远程测试时我收到错误消息,我该如何解决这个问题

summary =      0 in 00:00:00 = ******/s Avg:     0 Min: 9223372036854775807 Max:
-9223372036854775808 Err: 0 (0.00%)
Tidying up remote @ Sun Jan 07 21:00:11 EST 2018 (1515376811888)
... end of run
The JVM should have exitted but did not.
The following non-daemon threads are still running (DestroyJavaVM is OK):
Thread[Thread-5,5,main], stackTrace:java.net.DualStackPlainSocketImpl#accept0
java.net.DualStackPlainSocketImpl#socketAccept at line:131
java.net.AbstractPlainSocketImpl#accept at line:409
java.net.PlainSocketImpl#accept at line:199
java.net.ServerSocket#implAccept at line:545
java.net.ServerSocket#accept at line:513
bsh.util.Sessiond#run at line:71
java.lang.Thread#run at line:748

Thread[DestroyJavaVM,5,main], stackTrace:
Thread[Thread-3,5,main], stackTrace:java.net.DualStackPlainSocketImpl#accept0
java.net.DualStackPlainSocketImpl#socketAccept at line:131
java.net.AbstractPlainSocketImpl#accept at line:409
java.net.PlainSocketImpl#accept at line:199
java.net.ServerSocket#implAccept at line:545
java.net.ServerSocket#accept at line:513
bsh.util.Httpd#run at line:70
java.lang.Thread#run at line:748

最佳答案

异常来自守护线程,如所述here :

JMeter will exit all the non-daemon threads it starts, but it is possible that some non-daemon threads may still remain; these will prevent the JVM from exiting. To detect this situation, JMeter starts a new daemon thread just before it exits. This daemon thread waits a short while; if it returns from the wait, then clearly the JVM has not been able to exit, and the thread prints a message to say why.

从异常详细信息来看,您似乎有一些套接字连接。这些可能是 HTTP 采样器,一些其他打开套接字或自定义脚本的采样器。默认情况下,守护线程等待 2 秒,因此如果任何采样器的超时时间更长,可能是守护进程只需要等待更长的时间(或者您需要缩短超时时间)。

所以:

  1. 检查您的脚本并找出采样器的超时时间。要么将它们设置为小于 2 秒的数字,要么将 jmeter.properties 中的以下设置更改为高于最大超时值:

    jmeter.exit.check.pause=...

    例如,如果您的采样器配置为等待 30 秒,请将此值设置为 32 秒。

  2. 如果没有帮助,可能是底层库中存在一些错误。在那种情况下你无法真正解决它,但你可以使用一个相当残酷的解决方法:

    If the property jmeterengine.stopfail.system.exit is set to true (default is false), then JMeter will invoke System.exit(1) if it cannot stop all threads. Normally this is not necessary.

    因此,按照here 所述将以下属性设置为true :

    jmeterengine.stopfail.system.exit=true

    help说的,一般情况下没必要,但是如果线程真的卡死了,就没办法了。

关于jmeter - JVM 应该已经退出但没有,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48143559/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com