• How to troubleshoot your CloudFront configuration

    Troubleshooting tips for your Wowza Streaming Engine for Amazon CloudFront configuration.

    Note: Wowza Streaming Engine™ software is required.

    Contents


    Playback
    Logging
    Serving private media streams through CloudFront
    Adding a Subscription or Perpetual license key

    Playback


    CloudFront is an excellent choice for fast streaming of audio and video at scale because it stores the streaming data in its global network of edge locations. When a player application requests a stream from the CloudFront distribution, CloudFront automatically routes the request to the edge location that's nearest to the client so that the stream is delivered with the best possible performance. The CloudFront edge server either serves the requested content from its local cache or it pulls it from the Streaming Engine origin.

    You can test your CloudFront distribution by using the Test Players in Wowza Streaming Engine Manager. If you haven't used the Test Players, see Using the Test Players in the article How to integrate your Wowza EC2 instance with CloudFront.

    If you encounter a playback issue, first verify that you can play successfully from the origin. Change the URL so that the specified domain name is the Streaming Engine origin. For example:

    Adobe HDS http://[wowza-server-domain-name]/[application]/[appInstance]/[streamName]/manifest.f4m
    Apple HLS http://[wowza-server-domain-name]/[application]/[appInstance]/[streamName]/playlist.m3u8
    Smooth Streaming http://[wowa-server-domain-name]/[application]/[appInstance]/[streamName]/Manifest
    MPEG-DASH http://[wowza-server-domain-name]/[application]/[appInstance]/[streamName]/manifest.mpd

    Where:

    • [wowza-server-domain-name] is the Streaming Engine origin domain name (for example, ec2-xx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com). You can get the domain name value from the Public DNS setting for the EC2 instance or from the WowzaServerDomainName key in the CloudFormation stack outputs.

    • [application] is the application that you configured for streaming.

      • If you created a Wowza Streaming Engine EC2 instance and then integrated it with a CloudFront distribution, the EC2 instance store includes the following applications for streaming (one of these is the [application] part of the URL): live, vod, and vods3.

      • If you created an Amazon Web Services (AWS) CloudFormation stack, the default startup package that's used by the CloudFormation template (cloudfront.zip) includes the following applications for streaming (one of these is the [application] part of the URL): livecf, dvrcf, vodcf, and vods3cf.

    • [appInstance] is the name of the streaming application instance if you're running multiple instances of the application. In most cases, a single application instance is run per application and the default appInstance name (_definst_) is automatically used.

    • [streamName] is either the relative path to the video on demand asset or the live stream name.

    If playback from the origin is successful, then you should check your CloudFront edge location. You can enable access logs for edge locations to view detailed information about each request for your content, including the requested object, the request date and time, the edge location serving the request, the client IP address, the referrer, the user agent, the cookie header, and the result type. For more information about how to view edge server activity, see Viewing edge activity below. If you still can't stream from the CloudFront network edge, go to the AWS Support Center for assistance.

    If playback from the origin fails, check your Streaming Engine CloudFormation setup by doing the following:

    1. Make sure that the stream source is configured correctly. If you're streaming on-demand video files, make sure that the files are stored in the default Streaming Engine content store ([install-dir]/content or /usr/local/WowzaStreamingEngine/content) for the vod or vodcf application or uploaded correctly to the Amazon S3 bucket for the vods3 or vods3cf application. If you're publishing a live stream, make sure that you're publishing the live stream to the Streaming Engine origin domain (for example, rtmp://[wowza-server-domain-name]/livecf) and not to the CloudFront distribution domain. For additional guidance about how to set up Streaming Engine for on demand or live streaming, see our Tutorials.

    2. If you subscribed to Wowza Streaming Engine 4: BYOL Pro Edition (HVM) on AWS MarketPlace, verify that the usr/local/WowzaStreamingEngine/conf/Server.license file has been updated with a valid Wowza Streaming Engine Trial, Subscription, or Perpetual Edition license key (or keys). CloudFront isn't supported with a Developer Edition license key. If you need to update license keys, see Adding a Subscription or Perpetual license key. A license can fail if you use an unsupported Streaming Engine license type or if the installed Streaming Engine license key type doesn't match the CloudFormation Stack type that's configured.

    3. Amazon key pairs are configured for use with specific regions. If you don't see the key pair listed as expected, verify that you selected the desired region when you created the key pair.

    4. Verify that the AWS CloudFront distribution or CloudFormation stack is configured correctly for your workflow. If you integrated your EC2 instance with a CloudFront distribution, review the configuration details in Creating the CloudFront distribution. If you deployed your EC2 instance for live HTTP streaming by creating an AWS CloudFormation stack, see Creating an AWS CloudFormation Stack for Live Streaming on the Amazon website.

    5. After verifying the above configuration settings, test playback from the Streaming Engine origin again. If problems persist, look in the /usr/local/WowzaStreamingEngine/logs/wowzastreamingengine_access.log for clues. This file provides server activity information for the Streaming Engine origin. For more information, see Viewing origin activity.

      CloudFront edge server activity can't be recorded in the wowzastreamingengine_access.log file. For more information about how to view edge server activity, see Viewing edge activity.

    Logging


    Viewing origin activity

    Streaming Engine origin activity is automatically recorded to the /usr/local/WowzaStreamingEngine/logs/wowzastreamingengine_access.log file for the Wowza Streaming Engine for Amazon EC2 instance. You can access this log file by opening a Secure Shell (SSH) session to your running Amazon EC2 instance.

    1. Connect to the running Streaming Engine origin by using an SSH client. For more information, see Connect using SSH client.

    2. In the command window, enter the following command to change the directory to the /usr/local/WowzaStreamingEngine/logs folder. You can then view the wowzastreamingengine_access.log file in a text editor.
      cd /usr/local/WowzaStreamingEngine/logs
      You can interactively view log entries as they're added to the Streaming Engine logs by executing the following commands:
      cd /usr/local/WowzaStreamingEngine/logs
      tail -f wowzastreamingengine_access.log
    3. To end your SSH session, close the command window. Note that the EC2 instance will continue to run after you end your SSH session.

    Viewing edge activity

    You can choose to receive more information about the traffic delivered or streamed by your Amazon CloudFront distribution by enabling access logs. Access logs are activity records that show detailed information about each request made for your content. To use this feature, you must sign up for Amazon S3. Then you can create or specify an Amazon S3 bucket where you can store the access logs. There are no additional Amazon CloudFront charges for this feature, although normal Amazon S3 charges apply to write, store, and retrieve access logs. If you decide to use logging, Amazon provides more information about how to enable and disable logging, the content of log files, and how AWS charges for this feature in Access Logs.

    Serving private media streams through CloudFront


    At this time, live streams can't be delivered securely by using CloudFront-signed URLs because the way player applications generate URL requests for live stream data is incompatible with signed URLs. However, progressively downloaded media can be delivered privately by using signed URLs. For more information, see Serving Private Content through Cloudfront.

    Adding a Subscription or Perpetual license key


    If you subscribed to Wowza Streaming Engine 4: BYOL Pro Edition (HVM) on AWS MarketPlace, you must enter a valid Streaming Engine Subscription or Perpetual license key (or keys separated by the pipe "|" character) on the Specify Parameters page in the Create Stack wizard. If you entered an invalid license key or if you want to change the license key(s) in use, you can create a new CloudFormation stack, and then enter the license key value(s) in the wizard. You can also use the following procedure to add or change license keys.

    Note: If you subscribed to Wowza Streaming Engine 4: Pro Edition (HVM) on AWS MarketPlace, you don't need to change the license key.
    1. Connect to the running Streaming Engine origin by using an SSH client. For more information, see Connect using SSH client.

    2. In the command window, enter the following command to change the directory to the /usr/local/WowzaStreamingEngine/conf folder.
      cd /usr/local/WowzStreamingEngine/conf
    3. Open the Server.license file in a text editor, replace the entire contents of the file with your Subscription or Perpetual license key value, and then save the file.

    4. Restart the Streaming Engine instance to activate the key. You can do this by executing the following commands in the command window:
      sudo service WowzaStreamingEngine stop
      sudo service WowzaStreamingEngine start
    5. To end your SSH session, close the command window. Note that the EC2 instance will continue to run after you end your SSH session.


    Originally Published: 09-10-2013.
    Updated: For Wowza Streaming Engine 4.2.0 on 08-19-2015.

    If you're having problems or want to discuss this article, post in our forum.