Azure Devops Connectivity\build agent issues post IIS Website URL change - azure

We are using Azure Devops 2019 (App and data tiers are on different servers),We have done a domain migration due to which we had to change Devops URL from https:\Devops.OldDomain.com to https:\Devops.NewDomain.com
Below are the steps followed
Changed URL on IIS Devops Site and applied a third party certificate for https ( made sure certificates are added to trusted Root Cert)
Changed Public URL (changed the url to new Devops Url) from Devops admin console ( verified the access point from tbl_AccessMapping and updated it to new url)
Restarted the Devops server
Below are the issues identified
1)I have noticed build agents stopped working\offline and when I try to setup new agents, I see below
"An error occurred while sending the request.Failed to connect. Try again or ctrl-c to quit"
tried changing agent file to correct url (yet no luck)
2)When I launch Azure devops admin console I see below error
When I try to add Devops url from visual studio (Visual studio is installed inside Devops server) I see below error
"TF400324:Azure Devops services are not available from server, The underlying connection was closed"
Am I missing anything? I understand that some communication is missing between Application and Data tire, but I could not identify whats going wrong

Try to clear the following caches:
Clear TFS caches %LOCALAPPDATA%\Microsoft\Team Foundation\x.0\Cache
Delete the contents of the Cache directory, including all subfolders.
Regarding VS, close all Visual Studio instances, delete %LOCALAPPDATA%.IdentityService.
Reset IIS by pressing Win+R, and input iisreset in the Run.

Related

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.

Find out Organization server address in Azure DevOps Server (Installed locally)

I've installed Azure Devops Server 2019 on my local server. Now I want to setup a agent pool. To do this, the I've to follow instructions in the image below.
As here, I just downloaded the zip file an ran the config.cmd file, in the first step, it requires Server Url which as I searched over the net, people enter the Organization Url there.
The problem is I have no organization in my local Azure Devops! and when I click on the logo, It redirects me to project collection page:
What should I enter as Server Url in configuring Agent pool?
Agree with bryanbcook,
We can check the doc and switch the doc version to Azure DevOps Server 2019 to check the Server Url, it should be https://{your_server}/tfs
You can refer to this doc to configure the self-hosted agent.
Azure DevOps Services, which are hosted in the cloud, and Azure DevOps Sever 20XX use slightly different terminology. The term “Organization” and “Project Collection” refer to the same thing.

Publishing Azure functions

I work with several azure functions on a project that I didn't setup on my own, and when I try to publish the project which includes those azure functions to update them, the publishing failed with the following error :
Web deployment task failed. (Connected to the remote computer
("demo.scm.azurewebsites.net") using the Web Management Service,
but could not authorize. Make sure that you are using the correct user
name and password, that the site you are connecting to exists, and
that the credentials represent a user who has permissions to access
the site.
Where do I provide credentials ?
Here are the steps to publish an Azure Function from Visual Studio.
Go to the Azure Portal
Go to your Function App.
Then, select Overview and click Get publish profile and save the file.
Next, go to your Visual Studio project.
Right-click on your Azure Function project.
Select Publish and then Import Profile.
Finally, hit publish.
All the information needed, including your missing credentials, is in that the profile.
I have the exact same issue. Tried to publish and get the exact same error. I did as kzrystof suggested and downloaded the publish profile from the Azure portal and imported it into VS2017. As soon as I pick the publish profile file and click the open button I get the "Publish failed" error message. I checked the output window to find out what the error was, but there is nothing new added to the output. I cleared the output window and clicked the Publish button and immediately receive the "Publish failed" error popup with no further details in the output window.
Update: I was able to successfully publish the Azure Function App by creating a new profile in VS2017 to a new instance up on Azure. I then removed the old instance from the Azure Portal. Successive attempts to publish from VS2017 then worked successfully.
Just as a test, I downloaded the publish profile from the Azure Portal for this new AF app and imported it into VS2017 and still this produces the same "Publish failed" error popup. MS still seems to need to do some work on that scenario.
Also, there still seems to be problems with ZipDeploy so avoid it for now. I keep having timeouts when trying to publish using ZipDeploy. Standard WebDeploy publishes the files individually and thus doesn't have timeout issues.

ERROR_DESTINATION_INVALID in windows Azure

I have created simple MVC4 website for windows Azure by following this tutorial: https://www.windowsazure.com/en-us/develop/net/tutorials/web-site-with-sql-database/
At step-8, where I am supposed to "Validate Connection", I get an ERROR_DESTINATION_INVALID error.
Editor: Visual Studio 2012 (Winsows Azure tools SP1)
OS: Windows 7
Tried restarting Studio and restarting computer options. Also tried recreating website in manage.windowsazure.com
Logs:
Start Web Deploy Publish the Application/package to https://waws-prod-bay-001.publish.azurewebsites.windows.net/msdeploy.axd?site=trackme ...
2>Starting Web deployment task from source: manifest(C:\.SourceManifest.xml) to Destination: auto().
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4377,5): Error ERROR_DESTINATION_INVALID: Web deployment task failed. ( Could not connect to the remote computer ("waws-prod-bay-001.publish.azurewebsites.windows.net"). Make sure that the remote computer name is correct and that you are able to connect to that computer. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_INVALID.)
As your publish from VS is not completed due to this error, there are couple of things which could go wrong.
Based on error info it seems the connection to Windows Azure Websites deployment server was unsuccessful. I just pinged the waws-prod-bay-001.publish.azurewebsites.windows.net deployment server and got the IP address so would you please check and verify if you get the same. Also you may need to verify that there are no networking issue which could cause this problem.
Also if you have SQL Database configured with your publish profile then there are two servers needs to be connected during deployment. So if this error occurred when you have had SQL Database configured or before that? Sometime this error is sporadic so you may have to consider as well.
If web deploy fails, publish using FTP. You can download publish settings for you site from Azure portal, under dashboard, click "Download the publish profile". In Visual Studio, when you publish, select Profile, and then Import. Import the settings file. Then unselect the Web Deploy and select the FTP deploy. This worked for me when Web Deploy refused to work (even with the downloaded web deploy settings).

TFSPreview.com and Azure certificates not playing well at deployment

So I setup TFS continuous deployment and I'm running into a situation where my build compiles just alright but fails in the deployment phase when communicating with Azure. My log looks like
Get Default Azure Cloud Service Publish Profile
Set Project to build CSPack
Run MSBuild for Project
Run Visual Studio Test Runner for Test Sources
Publish Output
Deploy application to Azure
8/23/2012 7:20:04 AM - Preparing deployment for rcfoapi with SubscriptionID: mysubscriptionidhere.veryverylong.andkeepsgoing...
8/23/2012 7:20:04 AM - Connecting...
An attempted http request against URI https://management.core.windows.net:8443/mysubscriptionidhere.veryverylong.andkeepsgoing
/services/hostedservices/myrolenamehere?embed-detail=true
returned an error: (403) Forbidden.
Additional Exception Information:
Error Code: AuthenticationFailed
Message: The server failed to authenticate the request. Verify that the
certificate is valid and is associated with this subscription.
Typically, a response of (403) Forbidden from a Windows Azure
Management API means that the X509 certificate used to
authenticate the call is not valid. The certificate may have
been revoked or expired. Reconnect your Windows Azure
subscription to your Team Foundation account.
I tried the 'Disconnect from TFS' link in the Azure portal, then verified that the certificate in the 'certificates' section of the Azure portal. I confirmed using the fingerprint hash that the same certificate is also in my local computers' certificate store ('my' store). Then I relinked TFS back via the Azure portal.
But I still get the same error. Any idea?
Update:
I also tried a few additional steps, nothing seems to be working :(
Deleted the entire cloud service
Created a new cloud service (with same name)
VS2012 deployed to the cloud service on both production and staging (because I need to service operational for front use and back testing)
Verified the Windows Azure Tools certificate in the portal's cloud service 'certificate' section (which matches my local copy). I understand this will be different from the one between TFS and Azure
Went to TFSPreview.com => top left gear => project administration => services => no linked services seen
Went to user profiles => connections => OAuth connection listed (MANAGE-PROD CLOUDAPP by Windows Azure) => removed it
Within the Azure portal, linked the newly setup cloud service back to TFSPreview.com
Locally in VS2012, disconnected TFS ('team' => 'disconnect')
Locally in VS2012, logged out of TFS ('team' => 'connect' => 'sign out' at the bottom)
Signed back into TFS, connected to the team project
Made a trivial change => check in => triggered continuous deploy
=> Same error as before :?
Thanks
TFS Preview is not using the same cert you have on your local dev box. When you connect the accounts Azure gives TFS a different cert and it is possible that is the one that has expired or is no longer there. If you have multiple projects connected to Azure the only option is to go into the admin site on TFSPreview (the gear in the upper right) and disconnect all projects that are connected to that subscription and then rerun the connection wizard. This will ensure we get a new valid certificate for your azure subscription. When you reconnect the subscription to the project we will find the existing build definitions and not create new ones.
I had the same issue and for me the solution was to renew the certificate. See here: http://support.microsoft.com/kb/2780289
This can happen if your certificate needs to be renewed in the Azure control panel.
It can also happen if you don't have a staging or production environment deployed first. I'm not entirely sure why since it deploys a new one, but this fixed the issue for me just now.

Resources