Azure Data Factory failed on Build server The remote name could not be resolved: 'datafactories.schema.management.azure.com' - azure

I have Data Factory project in my solution. It compiled successfully on my machine. But when I triggered it from my tfs build server DataFactory throws an error at ParameterConfig.json
MsBuild\1.0\DataFactory.targets (35): Failed to download JSON schema
http://datafactories.schema.management.azure.com/internalschemas/2015-01-01-preview/Microsoft.DataFactory.Table.json
with exception message The remote name could not be resolved:
'datafactories.schema.management.azure.com'
I have added $schema in all the datasets, pipeline, and ParameterConfig files. This issue is intermittent. Someday it fails someday it works.

After lot more brainstorming I come to know that its totally intermittent issue.
I got related issues in Keyvault stuff also. Same error saying "Remote name could not be resolved".
What I observed is the URL mentioned above "http://datafactories.schema.management.azure.com" is not accessible from my build server account. So I used the trick and it works for me.
I have added "http://datafactories.schema.management.azure.com" site as a trusted site on my build server Internet settings.
It works! I didn't get any issues till now. My build is succeeded all the time.

Related

Azure DevOps Azure SQL DacpacTask SQL72018 Permission Could Not Be Imported

We have a release pipeline in Azure DevOps that deploys a database project to our Azure SQL Database via the Azure SQL Dacpac Task. Everything has been working fine but suddenly yesterday the pipeline started failing with the following error:
##[error]*** An error occurred during deployment plan generation. Deployment cannot continue.
##[error]Error SQL72018: Permission could not be imported but one or more of these objects exist in your source.
As far as I know, nothing has changed on the database side or in the pipeline. We also ruled out that it could be an issue with the specific dacpac file because previously successful releases now fail with the same error.
I searched extensively for the SQL72018 error, but didn't really find any answers as to what would be causing that so am wondering if there was some Azure DevOps task update or something that we could be missing?
Not sure what would have caused this to break out of nowhere like that.
It does work if we add the p:/ignorePermissions=true parameter to the task, but we have never needed that before this.
UPDATE:
Wanted to update this as I was able to gather a little more information by adding the /Diagnostics:True parameter to the pipeline task in order to print out Diagnostic info from SQLPackage.
When I added that, I also see this error:
Microsoft.Data.Tools.Diagnostics.Tracer Error: 1 : 2022-04-05T08:38:37 : Error detected when reverse engineering the database. Severity:'Warning' Prefix:'' Error Code:'0' Message:The permission 'VDP ' was not recognized and was not imported. If this problem persists, contact customer support.
So it looks like some "VDP" permission is what is causing the issue, but we don't know what that permission is for or where it came from as it's not in the database project.
We finally got to the bottom of this. It turns out a new permission was added to the database the day before the pipeline started to fail. The database permission that caused the issue was VIEW DATABASE PERFORMANCE STATE. That was the VDP permission that SQLPackage.exe was complaining about.
Unsure why that particular permission caused the error as we manage all of our database permissions outside of the database project, so not sure why other permissions wouldn't have caused issues prior to this one.
Since we are managing permissions outside of our database project, the resolution was to add the p:/ignorePermissions=true SQLPackage parameter to the pipeline permanently. This was confirmed as the appropriate solution by a Microsoft representative after we put a ticket in.
It seems you have a spurious/orphan permission in your target database - as mentioned in this post How could our database be causing SqlPackage to fail? (SQL72018).

Web deployment task failed (Could not complete the request to remote agent URL https://xx.publish.azurewebsites.windows.net/msdeploy.axd?site=XXXXXXX)

I am trying to publish blazor server web application to azure linux app service via visual studio community version 16.9.5
But it is failing with error information below:
Severity Code Description Project File Line Suppression State
Error Web deployment task failed. (Could not complete the request to
remote agent URL
'https://XXXXXXX.publish.azurewebsites.windows.net/msdeploy.axd?site=XXXXXXX-dev__staging'.)
Could not complete the request to remote agent URL
'https://XXXXXX.publish.azurewebsites.windows.net/msdeploy.axd?site=XXXXXX-dev__staging'.
The operation has timed out xxxxxx.web 0
I faced this issue earlier also but after one or two retry it was getting solved automatically. but this time I am unable to publish it after more than 20 tries. there is no exact information on exact problem anywhere.
Please suggest me if any exact cause of the error or solution.
Thanks,
Ashish
Troubleshooting:
Maybe you can try to set WEBSITE_WEBDEPLOY_USE_SCM=false on portal.
For more details, you can refer this post.
Why is application deployment failing on waws-prod-blu-167.publish.azurewebsites.windows.net?
In contrast, when using vs2019 was previously released, whether Service Dependencies were added.
Check whether the configuration of Service Dependencies is correct.
If all the above methods fail, please download publish profile and import to vs2019, then retry to publish your app.

##[error]Unhandled: handle is not a Buffer CopyFilesOverSSH in Azure DevOps build pipeline

We are trying to deploy file to remote server using CopyFilesOverSSH service Copy Files Over SSH task
in Azure DevOps through build pipeline but getting error which is "##[error]Unhandled: handle is not a Buffer" see below image (Error). Even though File has been uploaded on remote server with Zero bytes.
So we don't know why getting this error is there any permission issue on agent-job?
We would appreciate your help.
Error:
Received the same error message from a consistently smooth running pipeline as well. Turned out to be a disk space issue for us.
Please check if the folder is created on the target machine and what permissions it has. The issue may be related to folder permissions. Check the similar issue below:
https://github.com/Microsoft/azure-pipelines-tasks/issues/3190

Vague error with Azure DevOps web app deploy

I am attempting to use an Azure App Service Deploy task in Azure DevOps to deploy a file to an app service in Azure. I have been able to use this release pipeline to deploy to the same app service in the past. Two things have changed: I had to re-make the build machine (which exists in Azure), and the source code moved from Azure DevOps to GitLab.
The error I am running into is:
Error: (3/21/2019 4:34:45 PM) An error occurred when the request was processed on the remote computer.
Error: The server experienced an issue processing the request. Contact the server administrator for more information.
Well, I'm the server admin, and I don't have a clue.
Is there some log file I can look at for more information? Can someone please offer some suggestions?
I'm happy to provide additional information, I'm just not sure what would help at this point.
Thank you Tom Sun for directing me to the system.debug variable. That was very helpful. When I turned on the debugging the release worked, witch really doesn't make sense. I started the build machine after it had automatically shut down the day before, but then I had also rebooted the machine eight or nine times before that.
I removed the debug variable and the release still works.
I have no satisfying answer to how this issue was resolved and I don't know how to get the system in a state to reproduce the error.
An additional finding I have is that the artifact produced by the original build was a corrupt war file. Perhaps that had something to do with it?

Release Failure from TFS CI

I am trying to deploy an application to the Azure Service Fabric using the release definition task. When it gets to the task to deploy the server is returning the following error:
The type initializer for 'Microsoft.ServiceFabric.Powershell.Constants' threw an exception
I checked the Endpoint configuration and it appears to be set up as it is supposed to be:
No Authentication (this is an internal text box)
Cluster endpoint: tcp://[service fabric server]:19000
It downloads the artifacts without a problem, but in deploy it searches for the paths for publish profile and application package and finds them. After it finds them it throws the error. I have tried replacing TCP in the endpoint with http, added and removed the :19000 as well and all I get is this error. I have been searching online with little success. Any help to this end is much appreciated.
John
After lots of researching trying every suggestion I could find, we decided try and connect to the machine via Powershell on the box and it too was returning this error. So we uninstalled the SDK and re-installed it and the connection could be made and the builds started to work. I don't know exactly why it failed, but apparently a re-install did the trick. It may have been a bad install, or it could have been a versioning problem. Either way, try a re-install first.

Resources