jmeter运行调度程序持续时间但最后挂起

时间:2017-03-07 16:25:29

标签: multithreading jmeter kerberos

我从命令行运行jmeter,持续时间为300秒。

然而,它很少完成整个工作并返回命令行 - 我大多数都要取消它。

这就是我所看到的:

C:\dev\tools\apache-jmeter-3.1\bin>jmeter.bat -n -t c:/dev/workspace/docs/JMeter-stress2.jmx -j c:/dev/log/jmeter.log -l c:/dev/log/jmeter-results.csv
Writing log file to: c:\dev\log\jmeter.log
Creating summariser <summary>
Created the tree successfully using c:/dev/workspace/docs/JMeter-stress2.jmx
Starting the test @ Tue Mar 07 15:43:07 GMT 2017 (1488901387136)
Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
summary +   1573 in 00:00:23 =   69.0/s Avg:   166 Min:    47 Max:  2175 Err:     0 (0.00%) Active: 12 Started: 12 Finished: 0
summary +   2135 in 00:00:30 =   71.3/s Avg:   150 Min:    44 Max:  4022 Err:     0 (0.00%) Active: 12 Started: 12 Finished: 0
summary =   3708 in 00:00:53 =   70.3/s Avg:   157 Min:    44 Max:  4022 Err:     0 (0.00%)
summary +   2039 in 00:00:30 =   68.0/s Avg:   187 Min:    44 Max: 31024 Err:     0 (0.00%) Active: 12 Started: 12 Finished: 0
summary =   5747 in 00:01:23 =   69.4/s Avg:   168 Min:    44 Max: 31024 Err:     0 (0.00%)
summary +   2051 in 00:00:30 =   68.3/s Avg:   168 Min:    41 Max: 30813 Err:     0 (0.00%) Active: 12 Started: 12 Finished: 0
summary =   7798 in 00:01:53 =   69.2/s Avg:   168 Min:    41 Max: 31024 Err:     0 (0.00%)
summary +   2296 in 00:00:30 =   76.5/s Avg:   168 Min:    41 Max: 32443 Err:     0 (0.00%) Active: 12 Started: 12 Finished: 0
summary =  10094 in 00:02:23 =   70.7/s Avg:   168 Min:    41 Max: 32443 Err:     0 (0.00%)
summary +   1015 in 00:00:30 =   33.8/s Avg:   348 Min:    42 Max: 30255 Err:     5 (0.49%) Active: 12 Started: 12 Finished: 0
summary =  11109 in 00:02:53 =   64.3/s Avg:   184 Min:    41 Max: 32443 Err:     5 (0.05%)
summary +   1880 in 00:00:30 =   62.6/s Avg:   177 Min:    41 Max: 30265 Err:     0 (0.00%) Active: 12 Started: 12 Finished: 0
summary =  12989 in 00:03:23 =   64.1/s Avg:   183 Min:    41 Max: 32443 Err:     5 (0.04%)
summary +   1499 in 00:00:30 =   50.0/s Avg:   262 Min:    41 Max: 30417 Err:     5 (0.33%) Active: 12 Started: 12 Finished: 0
summary =  14488 in 00:03:53 =   62.2/s Avg:   191 Min:    41 Max: 32443 Err:    10 (0.07%)
summary +   2383 in 00:00:30 =   79.4/s Avg:   148 Min:    42 Max:  3687 Err:     0 (0.00%) Active: 12 Started: 12 Finished: 0
summary =  16871 in 00:04:23 =   64.2/s Avg:   185 Min:    41 Max: 32443 Err:    10 (0.06%)
summary +   1870 in 00:00:30 =   62.3/s Avg:   172 Min:    41 Max: 30890 Err:     0 (0.00%) Active: 12 Started: 12 Finished: 0
summary =  18741 in 00:04:53 =   64.0/s Avg:   184 Min:    41 Max: 32443 Err:    10 (0.05%)
summary +    483 in 00:00:35 =   14.0/s Avg:   344 Min:    43 Max: 31082 Err:     3 (0.62%) Active: 1 Started: 12 Finished: 11
summary =  19224 in 00:05:27 =   58.7/s Avg:   188 Min:    41 Max: 32443 Err:    13 (0.07%)
Terminate batch job (Y/N)? y

我取消它之前的最后一行输出无限期地挂起,直到我杀了它。

错误来自kerberos,它在这个组织中没有良好的声誉:(它将错误记录到* .csv输出文件中,使其无法使用,但我想这是一个不同的问题。我只提到因为它可能是悬挂的原因。

这是我在日志文件末尾看到的内容。注意关闭消息的时间戳 - 之前的日志语句是它挂起之前的最后一个。日志记录中的错误源于与kerberos服务器的连接问题。

2017/03/07 15:48:00 INFO  - jmeter.reporters.Summariser: summary +   1870 in 00:00:30 =   62.3/s Avg:   172 Min:    41 Max: 30890 Err:     0 (0.00%) Active: 12 Started: 12 Finished: 0 
2017/03/07 15:48:00 INFO  - jmeter.reporters.Summariser: summary =  18741 in 00:04:53 =   64.0/s Avg:   184 Min:    41 Max: 32443 Err:    10 (0.05%) 
2017/03/07 15:48:04 ERROR - jmeter.protocol.http.sampler.HTTPHC4Impl: Can't execute httpRequest with subject:Subject:
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Stopping because end time detected by thread: GET get_forecast 5-2 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Thread finished: GET get_forecast 5-2 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Stopping because end time detected by thread: GET get_forecast 5-1 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Thread finished: GET get_forecast 5-1 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Stopping because end time detected by thread: GET  forecast with history 4-1 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Thread finished: GET  forecast with history 4-1 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Stopping because end time detected by thread: POST data/save 2-2 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Thread finished: POST data/save 2-2 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Stopping because end time detected by thread: POST forecast/save 3-1 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Thread finished: POST forecast/save 3-1 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Stopping because end time detected by thread: GET  forecast with history 4-3 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Thread finished: GET  forecast with history 4-3 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Stopping because end time detected by thread: POST data/save 2-1 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Thread finished: POST data/save 2-1 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Stopping because end time detected by thread: GET  forecast with history 4-2 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Thread finished: GET  forecast with history 4-2 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Stopping because end time detected by thread: GET get_forecast 5-3 
2017/03/07 15:48:07 INFO  - jmeter.threads.JMeterThread: Thread finished: GET get_forecast 5-3 
2017/03/07 15:48:08 INFO  - jmeter.threads.JMeterThread: Stopping because end time detected by thread: POST data/save 2-3 
2017/03/07 15:48:08 INFO  - jmeter.threads.JMeterThread: Thread finished: POST data/save 2-3 
2017/03/07 15:48:13 ERROR - jmeter.protocol.http.sampler.HTTPHC4Impl: Can't execute httpRequest with subject:Subject:
2017/03/07 15:48:13 INFO  - jmeter.threads.JMeterThread: Stopping because end time detected by thread: POST forecast/save 3-3 
2017/03/07 15:48:13 INFO  - jmeter.threads.JMeterThread: Thread finished: POST forecast/save 3-3 
2017/03/07 15:48:34 INFO  - jmeter.reporters.Summariser: summary +    483 in 00:00:35 =   14.0/s Avg:   344 Min:    43 Max: 31082 Err:     3 (0.62%) Active: 1 Started: 12 Finished: 11 
2017/03/07 15:48:34 INFO  - jmeter.reporters.Summariser: summary =  19224 in 00:05:27 =   58.7/s Avg:   188 Min:    41 Max: 32443 Err:    13 (0.07%) 
2017/03/07 15:48:34 INFO  - jmeter.threads.JMeterThread: Stopping because end time detected by thread: POST forecast/save 3-2 
2017/03/07 15:48:34 INFO  - jmeter.threads.JMeterThread: Thread finished: POST forecast/save 3-2 
2017/03/07 15:51:21 INFO  - jmeter.reporters.ResultCollector: Shutdown hook started 
2017/03/07 15:51:21 INFO  - jmeter.reporters.ResultCollector: Shutdown hook ended 

更新2017-03-10

只有在更好地定义问题方面取得进展:(

当我在HTTP请求默认对话框中将连接超时设置为5秒(连接)+ 5秒(响应)时,为什么JMeter不会转储连接。

为什么我会在&gt;的JMeter输出上看到最长时间尽管JMeter连接超时,但仍为30000毫秒?

为什么我在服务器端看不到堆栈跟踪?可能会被吞噬的例外情况。

1 个答案:

答案 0 :(得分:0)

您是否尝试降低模拟负载?我发现最大响应时间大约为30秒,JMeter可能无法在需要之后停止,因为某些线程可能会被阻塞等待多个服务器响应。

在运行负载测试时,您还应该使用jvisualvm来监视JMeter的VM,以确保有足够的可用内存,以及查看等待的线程。它可以帮助您找出问题。