错误:使用带有插件HLS采样器的JMeter加载测试HLS

问题描述 投票:2回答:2

我尝试使用带有HLS采样器的JMeter测试我的HLS服务器。但在我的cmd上有一个notif错误。我该怎么办 ?

java.io.FileNotFoundException: http://192.168.2.215/vod/BF1.mp4/chunk.m3u8
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at com.blazemeter.jmeter.hls.logic.Parser.getBaseUrl(Parser.java:49)
        at com.blazemeter.jmeter.hls.logic.HlsSampler.getPlayList(HlsSampler.java:104)
        at com.blazemeter.jmeter.hls.logic.HlsSampler.sample(HlsSampler.java:156)
        at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:498)
        at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:424)
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: http://192.168.2.215/vod/BF1.mp4/chunk.m3u8
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at java.net.HttpURLConnection.getResponseCode(Unknown Source)
        at com.blazemeter.jmeter.hls.logic.Parser.getBaseUrl(Parser.java:46)
        ... 6 more
jmeter hls jmeter-plugins
2个回答
1
投票

这是plugin中的一个错误,它不处理URL的所有可能性,我猜重定向或相对URL。

我们过去用它做了一个POC,我们发现有几个案件处理不当可能导致:

  • 悬挂测试,测试永远不会结束
  • 误报(测试标记为失败,而没有实际问题)
  • 很多HLS的可能性都没有得到处理
  • 我们甚至不会谈论比VOD复杂得多的直播流,它只适用于极少数简单的情况。

但是因为它是一个免费的OSS插件,如果你有时间和能力去理解java和jmeter,你可以尝试自己提供一个补丁。

我认为插件可以很好地处理非常简单的情况,但不适用于当前状态下的所有现实生活。

除此之外,模拟播放器向Streaming服务器请求URL的方式非常复杂,因为您需要模仿暂停,播放视频,滞后......

当然,通常当你想测试HLS时,你也想测试mpeg-dash至少这是另一个更复杂的故事。

最后,您通常需要custom metrics来分析插件缺少的负载测试。


0
投票

有两种可能性:

  1. 您的视频流中存在错误,即m3u8播放列表指的是不存在的块网址,请测试您是否可以使用普通视频播放器播放视频,即VLC
  2. HLS Sampler插件中存在一个错误,它错误地解析了初始响应。在这种情况下,通过jmeter-plugins forum联系插件开发人员。同时你可以使用普通的HTTP Request采样器来load test your HTTP Live Streaming service
© www.soinside.com 2019 - 2024. All rights reserved.