I am getting the following error when restoring a website backup (deployment slot). I am making the backup and trying to restore it using the azure management portal:
Failed to restore the Backup to App xxx(xxxstaging), Check your app
Custom HostNames, Databases and Connection strings. Restore operation
may fail if there are conflicts between source and destination
The audit log shows the following info:
statusCode:BadRequest serviceRequestId:
statusMessage:{"Code":"BadRequest","Message":"The provided URI is
not a SAS URL for a container (it needs to be https and it has to have
2 segments).","Target":null,"Details":[{"Message":"The provided URI
is not a SAS URL for a container (it needs to be https and it has to
have 2
segments)."},{"Code":"BadRequest"},{"ErrorEntity":{"Code":"BadRequest","Message":"The
provided URI is not a SAS URL for a container (it needs to be https
and it has to have 2
segments).","ExtendedCode":"54103","MessageTemplate":"The provided URI
is not a SAS URL for a container (it needs to be https and it has to
have 2
segments).","Parameters":[],"InnerErrors":null}}],"Innererror":null}
It is very strange because it was working in the past, and it happens in one deployment slot, nothing changes between the backup and the restore (same hostname, database and connection string, same storage account, same subscription...)
Any ideas?
perhaps it is due to some breaking changes introduced by Azure in the recent updates.
From your error description, it seems like the root cause of the problem is due to the provided URI is not a SAS URL for a container.
I suggest you to take a look at the Examples of SAS URLs from a very recent Microsoft blog post as below.
Examples of SAS URIs
Hope this helps.
Related
I'm trying to configure and use the Azure Data Explorer OneClick Ingest from blob container (continous ingest).
Whatever I try the URL is never accepted, I always end up with this error:
Invalid URL. Either the URL leads to a blob instead of a container, or the permissions are incorrect. If you just grant permission, please wait couple of minutes and try again.
The URL I'm using follow that pattern:
https://mystorageaccount.blob.core.windows.net/mycontainer?sp=rl&st=2022-04-26T22:01:42Z&se=2032-04-27T06:01:42Z&spr=https&sv=2020-08-04&sr=c&sig=Z4Mlh7s5%2Fm1890kdfzlkYLSIHHDdGJmTSyYXVYsHdn01o%3D
I'm probably missing something, either in the URL syntax ou SAS generation.
Has anyone successfully used it? Any idea what could be wrong?
Thanks
I finally found out what was the issue.
Probably due to the security in place on my Storage account I had to create in Azure Data Explorer Networking panel, a Managed private enpoint, pointing to my storage resource (and then approve that endpoint in the storage account Networking)
https://learn.microsoft.com/en-us/azure/data-explorer/security-network-managed-private-endpoint-create
I have made a storage account then enabled static website then added the html file (plus everything else i need). once everything was added into the $web i copy pasted the give url and i get a 404 error as follows:
The requested content does not exist.
HttpStatusCode: 404
ErrorCode: WebContentNotFound
RequestId : 23ac6dc2-401e-0044-7797-b2e9c5000000
TimeStamp : 2021-09-26T05:29:47.2306494Z
i have used azure before for another school project and that website worked fine. i tried uploading those files in a new storage account and they gave me the same error but the website i made 6 months ago still works. naturally i thought well if this storage account still works then i will just put the new files in here and delete this website since its not needed anymore. tried and it gave me the same error so i changed it back to the original and now i get the error with those files too. any help would be amazing.
Azure blob storage doesn’t know to route requests to /OurWebPage through our index.html it only knows to route to index.html when requests are made to the base URL as we configured the default document. This means search crawlers and anyone linking directly to a page will get this error
Here we need to use Azure CDN, with this we can configure URL rewrites.
We can create CDN resource with Standard Microsoft tier. Refer to the blog for more insights.
I'm traying to daploy an instance of the form recognizer app in Azure. For that I'm following the instructions in the documentation: https://learn.microsoft.com/en-us/azure/cognitive-services/form-recognizer/deploy-label-tool
I have created the docker instance and the connection, but the step to create the APP is failing.
This are the parameters I'm using:
Display Name: Test-form
Source Connection: <previuosly created connection>
Folder Path: None
Form Recognizer Service Uri: https://XXX-test.cognitiveservices.azure.com/
API Key: XXXXX
Description: None
And this is the error and getting:
I had the same error. It turned out to be due to incorrect SAS URI formatting because I generated and copied the SAS token via the Storage Accounts interface. It's much easier to get the correct format for the SAS URI if you generate it through the Storage Explorer (currently in Preview) as opposed to through the Storage Accounts.
If you read the documentation carefully it gives you a step by step guide
"To retrieve the SAS URL, open the Microsoft Azure Storage Explorer, right-click your container, and select Get shared access signature. Set the expiry time to some time after you'll have used the service. Make sure the Read, Write, Delete, and List permissions are checked, and click Create. Then copy the value in the URL section. It should have the form: https://.blob.core.windows.net/?"
Form Recognizer Documentation
The error messages point to a configuration issue with the AzureBlobStorageTemplate Thing. Most likely the containerName field for the Blob Storage Thing is empty or contains invalid characters
Ensure the containerName is a valid Azure storage container name.
Check https://learn.microsoft.com/en-us/rest/api/storageservices/Naming-and-Referencing-Containers--Blobs--and-Metadata for more information.
A container name must be a valid DNS name
The Connector loads and caches all configuration settings during startup. Any changes that you make to the configuration when troubleshooting are ignored until the Connector is restarted.
When creating the container connection, you must add the container into the SAS URI, such as
https://<storage-account>.blob.core.windows.net/<Enter-My-Container-Here>?<SAS Key>
You can also directly use the open source labeling tool, please see the section further down in the doc:
The OCR Form Labeling Tool is also available as an open-source project on GitHub. The tool is a web application built using React + Redux, and is written in TypeScript. To learn more or contribute, see OCR Form Labeling Tool.
I create the the Storage account, CDN Profile and CDN endpoint from powershell. But adding images to the storage account is a manual process after creating all azure components. Now we have the issue that images are not showing up in page. When I try to access the CDN image url directly, I get this error
The requested URI does not represent any resource on the server
But I can access the content directly by using blob storage url to ensure content exist. I tried changing the caching rules , but nothing is working. I have standard verizon cdn profile.
Any suggestions?
Update1 : When I delete the endpoint and recreate the endpoint with all images already loaded in Storage account, everything works fine. Any idea what is the predictable behaviour?
This error happens when you're using a "/" with the root container where the blob is present (sub-folders). for now the "/" are not supported, you can get around it by referencing the root container in the link, ex:
GET https://myaccount.blob.core.windows.net/$root/myphoto
When using the CDN, the format should look like the following:
http://<EndpointName>.azureedge.net/<myPublicContainer>/<BlobName>
There is also a cool tutorial on how to host static sites via blobs and CDN worth checking out: https://blog.lifeishao.com/2017/05/24/serving-your-static-sites-with-azure-blob-and-cdn
Documentation:
You can get more info from these links: https://learn.microsoft.com/en-us/rest/api/storageservices/Working-with-the-Root-Container?redirectedfrom=MSDN
https://learn.microsoft.com/en-us/azure/cdn/cdn-create-a-storage-account-with-cdn
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?
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.