-1

I am following a pluralsight course to get familiar with more aspects of Azure. CDN is one of the aspects yet I fail to get it work and I can't figure out what I am doing wrong.

The pluralsight course I am following is called Building a Global App with Azure PaaS. The steps to create an Azure storage and a CDN are explained pretty clear, yet the CDN won't work for me. I did those steps twice. I also followed the steps described on this page: Getting started with Azure CDN but gives me the same result. These are my results: 1) The image is reachable via the following links:

link 1 to azure storage

link 2 to azure storage

2) I also try to reach the image via this link:

link to azureedge.net (CDN)

but this link gives me this error:

<Error>
    <Code>BlobNotFound</Code>
    <Message>
        The specified blob does not exist. RequestId:162b11b9-0001-0010-5713-ce53d6000000 Time:2017-05-16T07:08:30.2920262Z
    </Message>
</Error>

The error code states that the blob does not exists, but I found that description to be unclear because the link 1 and link 2 are working fine, so where does the blob not exists?

I also waited more than 90 minutes (close to a day even) and checked if it worked after that period. The first try of creating the CDN I did before the start of the weekend and the next monday it still didn't work.

The azure storage access policy is set to container. According to the information on azure, this should make all the content of the container read-only available.

Has anyone any idea what I could do wrong?

Cornelis
  • 1,729
  • 5
  • 23
  • 39
  • Can you share what you have set for `Origin Path` in your CDN configuration? – Gaurav Mantri May 16 '17 at 08:00
  • @GauravMantri the Origin Path is set to /cdn and the Origin hostname is set to psic.blob.core.windows.net just as is the Origin host header. The Origin type is set to Storage. Ports are set to 80 for http and 443 for https – Cornelis May 16 '17 at 08:12

1 Answers1

4

I believe I know why this problem is happening. Because you have set the Origin Path to cdn, the URL http://testcdncornelis.azureedge.net maps to http://psic2.blob.core.windows.net/cdn and not http://psic2.blob.core.windows.net . Now you're appending cdn to this CDN path, the actual URL to blob storage becomes http://psic2.blob.core.windows.net/cdn/cdn/cookie.jpg. Since the blob is present in cdn container and not in cdn virtual folder inside cdn container, you're getting this error.

There are 2 ways by which you can fix this problem:

  • Remove Origin Path setting in your CDN configuration. Then testcdncornelis.azureedge.net will map to psic2.blob.core.windows.net and you can use the URL you're using right now.
  • Keep Origin Path but change the CDN URL you're using to http://testcdncornelis.azureedge.net/cookie.jpg.

Please see Origin Path section in the troubleshooting guide here: https://learn.microsoft.com/en-us/azure/cdn/cdn-troubleshoot-endpoint.

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
  • Thank you, this solves the issue. I also checked the pluralsight clip again which explained how to create a CDN and the example is conflicting. There the maker of the movie both filled in the /cdn in the origin path and added the cdn to the source url of the image showing on the demo website. So for those who are following that course as well, make sure you don't make this mistake as well. – Cornelis May 16 '17 at 08:56