Hi,
I am getting the following on one my Wowza servers.
MediaCacheItemBase.init: Error: Length is zero[-1]:
The same request works other wowza severs.
What could be causing this error?
Thanks.
Hi,
I am getting the following on one my Wowza servers.
MediaCacheItemBase.init: Error: Length is zero[-1]:
The same request works other wowza severs.
What could be causing this error?
Thanks.
Hi,
Based on that info, it is probably a network issue affecting that one.
Richard
Roger thought it might be the server cached a partial file, that it was still being uploaded to the storage when the server started to cache it.
Richard
Hi,
I’ve stepped through the Media Cache processes and that error is due to the source not returning a Content Length. (-1 means that it hasn’t been set)
This would happen if the HEAD request to the storage server didn’t include a Content-Length header in the response.
I think you are getting a valid response from the HEAD request, otherwise, you would have received a MediaCacheItemBase.init: Item does not exist error instead.
Roger.
Hi Richard - Response back to the JWPlayer once I click play is pretty much instantaneous. It is not a network latency issue. What other kinds of network issues? Source server is not reachable from media cache? (In this test the mediacache and source are on the same server)
Thanks.
I know this is a stale thread, but it continues to reside at the top of the Google Search results for this error.
I am experiencing this error with Wowza Streaming Engine 4.5.0 using Media Cache to pull content off of an nginx webserver.
The headers from curl ( curl --head ) clearly specify the Content-Length:
HTTP/1.1 200 OKServer: nginx/1.4.6 (Ubuntu)
Date: Fri, 15 Sep 2017 18:53:02 GMT
Content-Type: video/mp4
Content-Length: 2331918140
Last-Modified: Thu, 14 Sep 2017 17:40:26 GMT
Connection: keep-alive
ETag: "59babf0a-8afe3f3c"
Accept-Ranges: bytes
and byte offset is clearly accepted.
The webserver responds to Java and spits out a 200 status code for the HEAD request from Wowza Media Cache…
Moreover thousands of other video files with identical encoding parameters are served from this webserver instance into MediaCache with no problem.
These H.264 .mp4 files can be viewed directly from the webserver using built-in browser implementations - no problem.
The file is has a very long runtime over 262 minutes ~4.3 hours.
MediaCacheItemBase.init: Error: Length is zero[-1]:
Is it possible that some internal counter for the Content Length is overflowing or some issue with evaluating the moov atom is causing this problem?
Thanks for your ideas for further troubleshooting.
Andy.
I should also mention that I have verified that the entire file is present on the webserver and restarted Wowza.
Some additional info - Here is the HTTP(s) logging for Media Cache (in the access log) after turning it on- it tries the connecting - connected - success loop three times. and then fails. FYI. I have changed some of the filename details to “xxx”.
2017-09-15 19:56:24 UTC comment server INFO 200 - MediaCacheHTTPSSLByteReader.head Request URL 'xxx.broadband.mp4' - - - 40.2 - -- - - - - - - - - - - - - - - -- - - - - - -
2017-09-15 19:56:24 UTC comment server INFO 200 - MediaCacheHTTPSSLByteReader.connect Request URL 'xxx.broadband.mp4' - - -40.201 - - - - - - - - - - - - - - -- - - - - - - - - -
2017-09-15 19:56:24 UTC comment server INFO 200 - MediaCacheHTTPSSLByteReader.connected Request URL 'xxx.broadband.mp4' - - -40.201 - - - - - - - - - - - - - - -- - - - - - - - - -
2017-09-15 19:56:24 UTC comment server INFO 200 - MediaCacheHTTPSSLByteReader.head success URL xxx.broadband.mp4 content length -1' - - - 40.203 - - - - - - - - - - - - - - -- - - - - - - - - -
2017-09-15 19:56:24 UTC comment server WARN 200 - MediaCacheItemBase.init: Error: Length is zero[-1]: xxx.broadband.mp4 - - - 40.203 - - - - - - - - - - - - - - -- - - - - - - - - -
2017-09-15 19:56:24 UTC comment server WARN 404 xxx.broadband.mp4 MediaReaderH264.open[1]: java.io.IOException: MediaCacheRandomAccessReader.open: Item not in cache: xxx.broadband.mp4: java.io.IOException: MediaCacheRandomAccessReader.open: Item not in cache: xxx.broadband.mp4|at com.wowza.wms.mediacache.impl.MediaCacheRandomAccessReader.open(MediaCacheRandomAccessReader.java:81)|at com.wowza.wms.mediacache.impl.MediaCacheRandomAccessReaderFilter.open(MediaCacheRandomAccessReaderFilter.java:75)|at com.wowza.wms.mediareader.h264.MediaReaderH264.open(MediaReaderH264.java:259)|at com.wowza.wms.httpstreamer.model.HTTPStreamerAdapterBase.doesFileExist(HTTPStreamerAdapterBase.java:1485)|at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.onPlaylist(HTTPStreamerAdapterCupertinoStreamer.java:1541)| - -- 40.205 - - - - - - - - - - - - - -- - - - - - - - - - -
I have been able to reproduce this issue with any web video file size over approximately 2.1GB. My suspicion is that this error is returned because Media Cache cannot cache/receive a HTTP/S resource that is over ~2.1GBytes in size (as reported in the Content Length headers from nginx). At this point, I consider this a bug, but it only effects 5 out of our ~15,000 videos. I am filing a bug report with Wowza.
I will link back if there is access to that bug filing.
We are also getting error MediaCacheItemBase.init:Error:Lengthis zero[-1]: and noticed file size 2.1GB. Anything smaller working fine. Was there a solution to this? We are version Wowza Streaming Engine 4 Subscription Edition 4.7.5.02 build22076