Debugging a CDN service
DNS - dig is your friend
Let's assume that you have created a CDN service with the following details.
- Service Domain - cdn.mycompany.com
- Service Identifier - 12345678.r.cdnsun.net
Please note that the Service Identifier is a ready-to-use domain which serves your CDN content. If you would like to use (custom) Service Domain for your CDN URLs then you need to add a CNAME record to your DNS configuration. Use dig tool to find out whether the CNAME record is set up correctly. Note that you can use dig tool from command line and also online. Dig your Service Domain cdn.mycompany.com and check the result. You should see something similar to the following.
cdn.mycompany.com. 21599 IN CNAME 12345678.r.cdnsun.net.
If you don't see the CNAME record in the dig result then your CNAME record is not set up correctly or is not yet propagated. Please note that changes in DNS configuration can take up 48 hours to propagate.
DNS Check Tool
Use our DNS check tool at Services/Tools and check your DNS instantly.
Static Content - curl is your friend
Your origin content has to be accessible via HTTP or HTTPS and it must return 200 status codes only. Please refer to Status Code Definitions for more details. Also please note that when you create a new CDN service it can take up to 20 minutes to propagate it to all Locations, so don't worry if your CDN service does not show up immediately.
Let's assume that you can't access your CDN content located at the following URL.
Use curl to find out whether the same content on your origin returns 200 status code or not. Note that you can use curl from command line and also online. An example of curl result follows.
curl -I http://mycompany.com/htdocs/images/image.jpeg HTTP/1.1 200 OK Date: Sun, 06 Jul 2014 07:22:43 GMT Server: Apache Last-Modified: Wed, 25 Jun 2014 03:00:28 GMT
If your origin content does not return 200 status code then please set up your origin correctly. Also please note that when you change settings on your origin then you may need to purge your CDN content as it has been cached with the old origin settings (HTTP headers). Please refer to Purging and prefetching a CDN content for more details.
Content Check Tool
Use our content check tool at Services/Tools and check your static CDN content instantly.
RTMP Stream Content - RTMPDump is your friend
You can use Linux RTMPDump tool to check your origin and CDN streams. Please note that in the case of Video CDN services origin is your Origin Domain and in the case of Video Push CDN services origin is (CDNsun) Origin Storage. In both cases use curl above to check content on Origin Domain or Origin Storage. In the case of Live CDN services origin is Origin (RTMP) URL (services with Pull publishing) or Publishing (RTMP) URL (services with Push publishing) and their backups. Please refer to Services/Settings for Origin URL and refer to Services/How-To for Publishing URL.
To check an RTMP stream located at the following URL
use the following command
rtmpdump -o output.mp4 --rtmp rtmp://12345678.r.cdnsun.net/12345678/_definst_/live
If the above stream is active then you should see something like
Connecting ... INFO: Connected... Starting download
as a part of RTMPDump output in your Linux terminal.
Content Check Tool
Use our content check tool at Services/Tools and check your CDN streams instantly.