Azure cloud service deployment issue - azure

I uploaded the pkg and confi in azure portal for deploying in staging environment and azure portal shows notification that 'Successfully started to deploy application...successfully started to deploy application to the staging environment for cloud service ...". There after no error or notification, neither the deployment ever visible/happen. What to look for? I looked into activity logs and there is operation
Write DeplymentSlot" with status Accepted.

There is a bug in the new Azure portal. It upload the faulty config file. If in the ACL the ip in quote "x.x.x.x" is replaced with "`x.x.x.x" (note the apostrophe after double quotes) then the new portal upload the file without any error but the deployment shows strange behavior. it notify successful deployment but actually nothing deployed. Also the deployment label got updated with one that actually failed to deploy. The old portal is come as rescue as it is able to catch the bug in first place. Hope Microsoft azure team will look into this.

Related

Unable to connect to azure pipeline, but deploy still works in app service deployment center?

I keep getting this error message in the Azure App service deployment center:
We were unable to connect to the Azure Pipeline that is connected to
this Web App. This could mean it has been removed from the Azure Dev
Ops Portal. If this has happened, you can disconnect this pipeline and
set up a new deployment pipeline.
The thing is, it stil says that it successfully deploys, but If you try to access swagger for example, you get an HTTP error 500, (swagger does work localy). I have tried restarting the app service, going back commits, to see if that would help, but nothing is working. All Json data has been doubel chekced so that isn't the problem either. Anyone know of a fix?
We were unable to connect to the Azure Pipeline that is connected to this Web App. This could mean it has been removed from the Azure DevOps Portal. If this has happened, you can disconnect this pipeline and set up a new deployment pipeline.
Th error says that files are missing in the current build , try with new deployment pipeline.
You might have added an archive step in the build pipeline. This causes the artifact to be zipped before publish.
In the release pipeline if you use Azure App Service Deploy task , This internally uses Zip Deploy, that will zip the files.
Remove the archive step, the double zipping will be avoided.
HTTP error 500
Make sure the XML documentation file output is in bin and not in bin\Debug or bin\Release (verify this for all build configurations).

Azure Devops Pipeline returning: 'Failed to deploy web package to App Service. Internal Server Error (CODE: 500)'

I am trying to use Azure DevOps pipelines to build a .NET 5 (Core) web app and deploy it to my Azure app service. I can't find any complete examples in the documentation that achieve this so I'm following this:
https://github.com/shahedc/NetLearnerApp/blob/main/azure-pipelines.yml.txt
However, the Azure deploy task keeps returning this vague error:
In my Azure portal I only get this error:
I am assuming the issue is in my pipeline because deployment works when I deploy it directly from the Deployment Center in the Azure portal. Here are the details for the 3 relevant tasks my pipeline:
I found the solution. It turns out the issue was not in the pipeline, but was caused by a Git connection to the app service I had previously set up in the Azure Deployment Center. Even though I disconnected/removed this Git connection, there was somehow still a residual file left over in Azure that was causing the error. I deleted the 'deployments' folder in Kudu (pictured below) and the pipeline started working as expected.
Getting to the above pictured view:
Navigate to your Azure Function project
Search for Advanced Tools
Open PowerShell
Check if you have disk space available.
Yesterday we started getting this error, even if we tried to re-deploy packages that were successfully deployed just an hour before. Our system guys checked and found out that we reached the space limit and that it was time to upgrade.
P.S. I know that this was answered a long time ago. I am just sharing the solution that was not mentioned here and that worked for us.
think what Dan Beaulieu said in above answers is correct, but one thing to add, in my case, after deleting the deployments folder, remember to restart the app service/web app, which will make it take effect.

Deploy Azure AppService to Url: 404 + no worker is assigned to the app service plan. The site cannot serve any requests

I'm getting a 404 trying to access my azurewebsite.net
My Resource group contains an AppServicePlan, an AppService, SQL Server & SQL Database, a KeyVault & SignalR.
Locally everything works, the AppService is running, AppServicePlan is Ready (1App/0Slots),
Connected Services for SignalR & SQL are configured (in the menu you get when right-clicking WebProject > Publish). KeyVault is configured & accessible. Not sure if these are problem free though, as I keep getting NuGet Errors, stating unable to update NuGet Package.
When I right-click my WebProject & Publish, I get Message Publish has been succeeded. But when I click on the link, I get a 404.
I'm working with two pipelines in AzureDevops
Seeing as official documentation is always lagging behind and showing older interfaces, it has not been much of a help.
I followed https://learn.microsoft.com/en-us/learn/modules/create-release-pipeline/5-deploy-to-appservice this tutorial, did everything stated, but the last step, I didn't get the desired result (an accessible website through azurewebsites.net).
I have a Export template with all connected services configured (I guess generated by azure?) but don't really know what to do with it.
Can anybody pinpoint what I am missing or doing wrong? Or tell me what else I would be needing, apart from the services I mentioned (like Certificates, Active Directory?)
Do I need a gitHub repo next to AzureDevOps Repo & Azure Resources?
Does publishing via VS interfere with my automated pipelinebuilds?
Thanks!
You can try to deploy to Azure App Service in Azure DevOps directly. I used the sample you shared and worked well on my side. Here are my steps:
1.Create the App Service instance in Azure and make sure the default home page is correct.
2.Clone the sample from GitHub to Azure DevOps Repo.
3.Change the deploy stage in the azure-pipelines.yml file on release branch and run pipeline. I removed variable groups and changed the configuration of AzureWebApp task:
4.Browse the page in Azure. I can get the same page as in the tutorial.

Azure App service Deploy fails with Error: 'credentials' cannot be null

I have a portal account, and a devlops account. Both happen to use the same login/password.
In the portal.azure.com, I have a working web service.
Under the web services "deployment-Deployment center" I select azure repos, azure pipelines as the build provider, set master branch etc.
It created a pipeline in my devlops which worked, i.e. it did NuGet restore, build solution, test assemblies, publish symbols path, publish artifact.
Great.
But it did not deploy the new build.
Clicking on "releases" in pipleines in devops, it was trying to use "Azure web app deploy" and giving an error that msbuild doesnt use the right format or similar. So I changed it to "Azure App Service Deploy".
Now I get a new error: Error: 'credentials' cannot be null.
There is no field for credentials.
It is using a publish profile.
Any ideas how I fix this?
here is the offending task:
There is no option to configure the missing credentials?
If I go to portal, and look at the "Deployment center", I see this:
If I click on "deployment credentials" I see this:
Which all looks good.
Any idea where the "null" credentials comes from?
Have you tried adding a new service connection in Project Settings and selecting Service Connections there? Even updating the Service connection created by Azure Portal threw an error for me.
In my case the issue was I did not have proper access rights to allow the connection between my pipeline and the Azure App. I was listed as a Contributor on the subscription. I contacted our company Devops and she updated the service connection without any issues because she was listed as an Owner or User Access Administrator.
Use "Azure Web App" task instead. Create a service connection using the publish profile route then use it within the task. Make sure you tick off "Deploy to Slot or App Service Environment" and it should work.
Have a read on this. They updated the services. You need to follow the Action Required.

VSTS build fails but portal shows successful deployment

Sorry, less a code issue but a process issue in deploying through Microsoft VSTS. I'm deploying an ARM template via a VSTS build definition and it failed (complaining the storage account was not in the same RG as the VM ).. BUT in the azure portal against the RG it shows a successful deployment and the resources deployed as expected.
What would cause VSTS to report an issue this way? Obvious issue is my deployment technically fails as a VSTS job despite being fine in Azure.
with no changes is stopped erroring so i'm guessing something on the azure side. Thanks anyway

Resources