Results 1 to 8 of 8

Thread: MediaCache + Alias - not working with multiple buckets

  1. #1
    Join Date
    May 2012
    Posts
    5

    Default MediaCache + Alias - not working with multiple buckets

    Hi,

    I've configured the aliasmap.play.txt file with two patterns and configured MediaCache for all of it. Whenever I try to access a file from the second pattern at aliasmap file I get a Stream Not Found message.

    Simply moving the second pattern (uau) as the first pattern at aliasmap and restarting the wowza service make it work. Everything else kept the same: bucket configuration, mediacache authentication credentials and so on ...

    Is it a bug? Am I missing something?

    ** aliasmap.play.txt snipet **
    p1/*=amazons3/p1private/${Wildcard.Match1}
    flv1/*=flv:amazons3/p1private/${Wildcard.Match1}
    mp31/*=mp3:amazons3/p1private/${Wildcard.Match1}
    mp41/*=mp4:amazons3/p1private/${Wildcard.Match1}
    mobile1/*=mp4:amazons3/p1private/${Wildcard.Match1}/playlist.m3u8

    uau/*=amazons3/uauprivate/${Wildcard.Match1}
    flv:uau/*=flv:amazons3/uauprivate/${Wildcard.Match1}
    mp3:uau/*=mp3:amazons3/uauprivate/${Wildcard.Match1}
    mp4:uau/*=mp4:amazons3/uauprivate/${Wildcard.Match1}
    mobile:uau/*=mp4:amazons3/uauprivate/${Wildcard.Match1}/playlist.m3u8

    ** wowzamediaserver error log **
    ERROR server comment 2012-06-19 22:12:53 - - - -- 0.517 - - - - - - - - HTTPUtils.HTTPRequestToByteArray: java.io.FileNotFoundException: http://169.254.169.254/latest/meta-data/product-codes
    WARN server comment 2012-06-19 22:13:18 - - - -- 25.555 - - - - - - - - MediaCacheItemHTTPImpl.getItemInfo[uauprivate.s3.amazonaws.com/teste4.mp4]: HTTP response: 404
    WARN server comment 2012-06-19 22:13:18 - - - -- 25.555 - - - - - - - - MediaCacheItemBase.init: Item does not exist: amazons3/uauprivate/teste4.mp4
    WARN server comment 2012-06-19 22:13:18 - - - -- 25.579 - - - - - - - - MediaCacheItemHTTPImpl.getItemInfo[uauprivate.s3.amazonaws.com/teste4.mp4]: HTTP response: 404
    WARN server comment 2012-06-19 22:13:18 - - - -- 25.579 - - - - - - - - MediaCacheItemBase.init: Item does not exist: amazons3/uauprivate/teste4.mp4
    WARN server comment 2012-06-19 22:13:18 - - - -- 25.605 - - - - - - - - MediaCacheItemHTTPImpl.getItemInfo[uauprivate.s3.amazonaws.com/teste4.mp4]: HTTP response: 404
    WARN server comment 2012-06-19 22:13:18 - - - -- 25.606 - - - - - - - - MediaCacheItemBase.init: Item does not exist: amazons3/uauprivate/teste4.mp4
    WARN server comment 2012-06-19 22:13:18 - - - -- 25.623 - - - - - - - - MediaCacheItemHTTPImpl.getItemInfo[uauprivate.s3.amazonaws.com/teste4.mp4]: HTTP response: 404
    WARN server comment 2012-06-19 22:13:18 - - - -- 25.624 - - - - - - - - MediaCacheItemBase.init: Item does not exist: amazons3/uauprivate/teste4.mp4
    WARN server comment 2012-06-19 22:13:18 - - - -- 25.637 - - - - - - - - MediaCacheItemHTTPImpl.getItemInfo[uauprivate.s3.amazonaws.com/teste4.mp4]: HTTP response: 404
    WARN server comment 2012-06-19 22:13:18 - - - -- 25.638 - - - - - - - - MediaCacheItemBase.init: Item does not exist: amazons3/uauprivate/teste4.mp4
    WARN server comment 2012-06-19 22:13:18 - - - -- 25.638 - - - - - - - amazons3/uauprivate/teste4.mp4 MediaReaderH264.open[1]: java.io.IOException: MediaCacheRandomAccessReader.open: Item not in cache: amazons3/uauprivate/teste4.mp4

  2. #2
    Join Date
    Jun 2012
    Posts
    4

    Default

    I am having the same problem with the new AMI for 3.1.2 (ami-3e79db57) while similar set up is working fine on version 2.2.4. The problem does not seem to be related to the aliasmap.play.txt file custom filters as I am experiencing the same issue even with the default "allow all" alias file.

    What matters in my case, however, is which bucket the caching mechanism reads from first after the server start. Loading a video from bucket A enables normal playback of all media from the same bucket. Attempting to load a video from bucket B results in the error mentioned in sgmota's message. When the server is restarted, the cache cleared and a video from bucket B is played first, it works normally, but content from bucket A that worked previously is then unreachable.

    Both buckets are in the same US Standard zone, the issue manifests itself even when using the public example amazons3/wowzamediacache/sample/sample.mp4 and default server installation without custom startup packages.

    Is this a new problem or are we doing something wrong as I can't imagine that more people wouldn't run into the same thing...

    Tomas

  3. #3
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Wowza MediaCache is only setup to handle one set of AWS keys, so if two buckets are under different accounts and both are protected, you can only use MediaCache with one of them at present.

    Richard

  4. #4
    Join Date
    Jun 2012
    Posts
    4

    Default

    Well, the buckets are created under the same account and there's only one set of keys used for all of them. I thought that there might be something amiss because:
    1. as I said, this works perfectly with Wowza 2.x, but the caching algorithm has been surely updated since then.
    2. thanks to the test with wowzamediacache bucket the problem seems to be present on my instance even with public buckets. I also tried to make my buckets temporarily public with the help of bucket policy, commented out the key section in MediaCache.xml, restarted the server but Wowza was still not getting the content from the second bucket. The curious part is that with public buckets the HTTP error changed to 403 as opposed to secured buckets where the MediaCache plugin returned 404. If nothing else, I would expect it the other way around.

    Since this is happening to me also with default Wowza 3.1.2 AMI (with or without the AWS key section), it should be easily reproducible, fingers crossed that I'm not the only one. Not altogether sure at this moment what other factors could affect this behavior.

    Thanks for any additional input on this.
    Tomas

  5. #5
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Tomas,

    I am able to reproduce this with MediaCache locally. I will forward.

    Thanks for the report,
    Richard

  6. #6

    Default

    We did find and fix this issue. It requires an update to the MediaCache system. If anyone else hits this issues, please send a support request to support@wowza.com and reference this thread and we will send the updated MediaCache package. This problem will be addressed in the next release of Wowza Media Server for Amazon EC2.

    Charlie

  7. #7
    Join Date
    Jun 2012
    Posts
    4

    Default

    Thank you both for the hotfix, it's working flawlessly now.

  8. #8

    Default

    Sorry for the bug. Happy to have helped.

    Charlie

Similar Threads

  1. MediaCache multiple configurations
    By nlopez in forum Video On Demand Streaming Discussion
    Replies: 5
    Last Post: 08-13-2012, 02:34 PM
  2. Multiple private S3 buckets on a single EC2 instance
    By plurotech in forum Wowza Media Server 3 for Amazon EC2 Discussion
    Replies: 1
    Last Post: 04-20-2012, 09:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •