Cornelis
Cornelis

Reputation: 1839

Azure CDN to Azure storage gives BlobNotFound, direct link to storage shows the image

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?

Upvotes: -1

Views: 6292

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136176

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.

Upvotes: 4

Related Questions