I have created a new Azure DevOps project. Asp.Net core 2.1, Service Fabric deploy.
First deploy went fine. Without any changes subsequent releases are failing
warnings and error
2018-10-10T08:24:17.8368242Z ##[section]Starting: Deploy Service Fabric Application
2018-10-10T08:24:17.8375072Z ==============================================================================
2018-10-10T08:24:17.8375163Z Task : Service Fabric Application Deployment
2018-10-10T08:24:17.8375234Z Description : Deploy a Service Fabric application to a cluster.
2018-10-10T08:24:17.8375288Z Version : 1.7.22
2018-10-10T08:24:17.8375356Z Author : Microsoft Corporation
2018-10-10T08:24:17.8375410Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=820528)
2018-10-10T08:24:17.8375479Z ==============================================================================
2018-10-10T08:24:20.0073284Z Searching for path: D:\a\r1\a\**\drop\projectartifacts\**\PublishProfiles\Cloud.xml
2018-10-10T08:24:20.2879096Z Found path: D:\a\r1\a\Drop\drop\projectartifacts\Application\Voting\PublishProfiles\Cloud.xml
2018-10-10T08:24:20.3657104Z Searching for path: D:\a\r1\a\**\drop\applicationpackage
2018-10-10T08:24:20.4618957Z Found path: D:\a\r1\a\Drop\drop\applicationpackage
2018-10-10T08:24:20.7317155Z Imported cluster client certificate with thumbprint '25826D862588CBFA3D2113D882255156F7233F44'.
2018-10-10T08:25:02.0637557Z ##[warning]Failed to contact Naming Service. Attempting to contact Failover Manager Service...
2018-10-10T08:25:42.0730582Z ##[warning]Failed to contact Failover Manager Service, Attempting to contact FMM...
2018-10-10T08:26:22.0962942Z ##[warning]No such host is known
2018-10-10T08:26:22.2408731Z Service fabric SDK version: 3.2.176.9494.
2018-10-10T08:26:22.4279087Z ##[error]No cluster endpoint is reachable, please check if there is connectivity/firewall/DNS issue.
2018-10-10T08:26:22.4687237Z ##[section]Finishing: Deploy Service Fabric Application
All other devops project releases are failing also for same reason.
Any help to debug appreciated
well, this clearly has nothing to do with the release if all the releases are failing. Something happened to your cluster or to your service endpoint
You would need to check if you can connect to the cluster endpoint manually with powershell, for example (connect-servicefabricluster or something along those lines).
misunderstanding of built in release task.
guess cluster was created by DevOps project create and not release task as I thought.
Related
We have the below settings that needs to be done for an app service to install new relic extension:
Ensure the "New Relic Agent" Extensions exist within the App Services Deployment Slot.
The files will be installed in NEW_RELIC_HOME : "C:\home\newrelicAgent". Following the deployment the newly created newrelic.config will need to be replaced with the applicable config for the Application Service.
From the files uploaded, rename {serviceAppName}_newrelic.config to simply "newrelic.config " and replace
"*The newrelic files will load with the worker process and starts profiling post restart of the appservice i.e. with the newly initiated worker process.
ost installation of newrelic extension, we need to replace the newrelic.config file in the below directory.
for dotnet framework applications:
C:\home\NewRelicAgent\Framework>
for dotnetcore applications:
C:\home\NewRelicAgent\Core>*
Unique to each file is the 'Appservicename', also containing the license key information:
NEW_RELIC_LICENSE_KEY : "License key"
NEW_RELIC_APP_NAME: "Appservicename"
Could you please help in updating the pipeline with the settings in an Azure DevOps.
Thanks,
Swabha
I'm having a very weird issue:
I'm deploying to an azure web app via MSDeploy from an on-prem CI/CD pipeline with Bamboo.
I get:
27-Jun-2022 20:53:50 Verbose: Pre-authenticating to remote agent URL 'https://app-xxxxx-stg.scm.azurewebsites.net:443/msdeploy.axd?site=app-xxxxx-stg' as '$app-xxxxx-stg'.
27-Jun-2022 20:53:50 Error: Could not complete the request to remote agent URL 'https://app-xxxx-stg.scm.azurewebsites.net/msdeploy.axd?site=app-xxxxx-stg'.
27-Jun-2022 20:53:50 Error: The request was aborted: Could not create SSL/TLS secure channel.
27-Jun-2022 20:53:50 Error count: 1.
What is weird is that the same deployment script works just fine with other webapps that have been created in the past (the dev and tst environments) and also fails with the same error if I try to deploy to prod environment (also just created).
The environments are created via ARM template, so they are exactly the same.
I've read other similar issues, but my webapp is configured to allow only TLS 1.2 min. But as mentioned, all the web apps are configured the same way, and the deployments all start from the same machine.
What could be the issue? how can I solve this connection problem?
Thank you
Just to let everyone know: problem is solved by forcing net framework applications (like MS Deploy) to default to TLS1.2.
As per this article: https://learn.microsoft.com/en-us/mem/configmgr/core/plan-design/security/enable-tls-1-2-client#bkmk_net
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions" = dword:00000001
"SchUseStrongCrypto" = dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions" = dword:00000001
"SchUseStrongCrypto" = dword:00000001
We'd a discussion on this on Microsoft Q&A thread. Just posting here to benefit the community. Self hosted agent connected to site using 1.0 or 1.1, we may encounter this error. Hence, for self hosted agent/custom agent for DevOps pipeline deployment ensure that the agent has >TLS1.2 installed.
I have created the app service in existing internal app service environment. And then I’m trying to deploy the source code into above app service using Azure DevOps CI & CD pipelines. But, in the release pipeline I’m getting the below error message in Azure DevOps:
Error: Error Code: ERROR_DESTINATION_INVALID
More Information: Could not connect to the remote computer ("xx-xxxx-v1-api-dev.scm.xxx-int-nonp.xxxcloudapps.com"). 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.
Error: The remote name could not be resolved: 'xx-xxxx-v1-api-dev.scm.xxx-int-nonp.xxxxcloudapps.com'
Error count: 1.
Note: I’m using self-hosted agent in the release pipeline. I have tried to access Kudu environment for the above service in the private virtual machine. But, the kudu not opening.
So, please suggest me how to fix the above issue.
Kindly set/add the following to the Application setting and see if it helps.
Name: WEBSITE_WEBDEPLOY_USE_SCM
Value: false
If I have understood your issue correctly (using private link).
For accessing the Kudu console, or Kudu REST API (deployment with Azure DevOps self-hosted agents for example), you must create two records in your Azure DNS private zone or your custom DNS server. Kindly check this document for more details. If you haven't added the records, kindly see if that works.
Name Type Value
mywebapp.privatelink.azurewebsites.net A PrivateEndpointIP
mywebapp.scm.privatelink.azurewebsites.net A PrivateEndpointIP
https://learn.microsoft.com/azure/app-service/networking/private-endpoint#dns
Ensure that the release pipeline is running in the right host. Because the endpoint is private for the SCM too, the DevOps Agent must be in a network with access with the endpoint, so mandatory to use self-hosted Devops Agent.
Kindly see this doc for more details:
https://learn.microsoft.com/azure/app-service/networking/private-endpoint#dns
If the issue still persists, kindly capture a network trace/HAR or client-side HTTP log/review the logs.
P.S. Kindly do not share any PII data on the public forum for your privacy.
Azure App Service Deploy finishes successfully, but the files were not updated.
I'm using the pipeline step version 4.*
The WebApp.zip is retrieved successfully from the build and it contains the files, but in a strange subfolder structure: Content\d_C\a\1\s\Platform\Backend\Backend.WebApp (my path starts at 'Platform').
I already tried to use the WebApp release step, but it says it's not compatible with zip files.
This is the log output of the release step:
2019-05-21T13:09:43.6381219Z ##[section]Starting: Azure App Service Deploy: contras
2019-05-21T13:09:43.6498586Z ==============================================================================
2019-05-21T13:09:43.6498697Z Task : Azure App Service Deploy
2019-05-21T13:09:43.6498814Z Description : Update Azure App Services on Windows, Web App on Linux with built-in images or Docker containers, ASP.NET, .NET Core, PHP, Python or Node.js based Web applications, Function Apps on Windows or Linux with Docker Containers, Mobile Apps, API applications, Web Jobs using Web Deploy / Kudu REST APIs
2019-05-21T13:09:43.6498952Z Version : 4.3.24
2019-05-21T13:09:43.6499008Z Author : Microsoft Corporation
2019-05-21T13:09:43.6499078Z Help : [More information](https://aka.ms/azurermwebdeployreadme)
2019-05-21T13:09:43.6499169Z ==============================================================================
2019-05-21T13:09:44.4804024Z Got service connection details for Azure App Service:'contras'
2019-05-21T13:09:44.9625484Z Updating App Service Application settings. Data: {"WEBSITE_RUN_FROM_PACKAGE":"0"}
2019-05-21T13:09:58.0865664Z Updated App Service Application settings and Kudu Application settings.
2019-05-21T13:09:58.4962410Z [command]"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package='D:\a\r1\a\_MoonDesk Test\drop\WebApp.zip' -dest:auto,ComputerName='https://contras-staging.scm.azurewebsites.net:443/msdeploy.axd?site=contras',UserName='$contras__staging',Password='***',AuthType='Basic' -setParam:name='IIS Web Application Name',value='contras' -enableRule:AppOffline -retryAttempts:6 -retryInterval:10000 -enableRule:DoNotDeleteRule -userAgent:VSTS_7c1c6e1c-7491-4898-bc4d-a85345921032_Release__16_26_1
2019-05-21T13:09:59.9100098Z Info: Using ID 'fe8253d8-98f3-4403-9e0d-98ceb9f2a406' for connections to the remote server.
2019-05-21T13:10:11.3653059Z Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
2019-05-21T13:10:11.4450004Z Updating App Service Application settings. Data: {"CloudVersion":"1.4.2"}
2019-05-21T13:10:22.5003712Z Updated App Service Application settings and Kudu Application settings.
2019-05-21T13:10:26.5732176Z Successfully updated App Service configuration details
2019-05-21T13:10:33.4106055Z Successfully updated deployment History at https://contras-staging.scm.azurewebsites.net/api/deployments/161558444226571
2019-05-21T13:10:33.4184229Z App Service Application URL: http://contras-staging.azurewebsites.net
2019-05-21T13:10:33.4378162Z ##[section]Finishing: Azure App Service Deploy: contras
Solved it here...The solution/problem lay in the VS solution, which resulted in an invalid zip content.
https://developercommunity.visualstudio.com/content/problem/587989/azure-devops-release-pipeline-azure-app-service-fi.html
I am attempting to configure CI/CD in Visual Studio Team Services to a Service Fabric cluster from a docker-compose file, but in the last step of my release definition, using the step "Service Fabric Compose Deploy", I'm getting the error: ##[error]The ServiceDnsName for DefaultService 'myapp' is invalid.. The guide I'm using has a section that says:
If the service name that you specify in a Compose file is a fully
qualified domain name (that is, it contains a dot [.]), the DNS name
registered by Service Fabric is <ServiceName> (including the dot). If
not, each path segment in the application name becomes a domain label
in the service DNS name, with the first path segment becoming the
top-level domain label.
For example, if the specified application name is
fabric:/SampleApp/MyComposeApp, <ServiceName>.MyComposeApp.SampleApp
would be the registered DNS name.
My current docker-compose file is:
version: '3'
services:
myapp:
image: myapp
build:
context: .\myapp
dockerfile: Dockerfile
In the VSTS definition, the Application Name is set as fabric:/myapp.
How do I fix this? Ideally I would like my app to be accessible at yourendpointhere.eastus.cloudapp.azure.com/myapp. Is this possible?
Here's the log entry for the release step failure:
2018-02-14T18:30:00.8056376Z ##[section]Starting: Deploy docker-compose application to a Service Fabric cluster
2018-02-14T18:30:00.8060539Z ==============================================================================
2018-02-14T18:30:00.8060913Z Task : Service Fabric Compose Deploy
2018-02-14T18:30:00.8061507Z Description : Deploy a docker-compose application to a Service Fabric cluster.
2018-02-14T18:30:00.8061986Z Version : 0.2.3
2018-02-14T18:30:00.8062279Z Author : Microsoft Corporation
2018-02-14T18:30:00.8063154Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=847030)
2018-02-14T18:30:00.8063536Z ==============================================================================
2018-02-14T18:30:07.8698092Z Searching for path: D:\a\r1\a\**\docker-compose.yml
2018-02-14T18:30:07.8725249Z Found path: D:\a\r1\a\Drop\docker-compose\docker-compose.yml
2018-02-14T18:30:07.9023293Z Checking compose file
2018-02-14T18:30:16.8571892Z ##[warning]The Docker compose file contains the following 'keys' which are not supported. They will be ignored.
'build'
2018-02-14T18:30:17.1220353Z Imported cluster client certificate with thumbprint 'THUMBPRINT_REDACTED'.
2018-02-14T18:30:17.1899791Z
2018-02-14T18:30:17.1907044Z Thumbprint Subject
2018-02-14T18:30:17.1908148Z ---------- -------
2018-02-14T18:30:17.1909375Z THUMBPRINT_REDACTED CN=eastus.cloudapp.azure.com
2018-02-14T18:30:23.8293246Z Successfully connected to cluster.
2018-02-14T18:30:23.8391402Z Encrypting the password with the Server Certificate.
2018-02-14T18:30:25.1024103Z ##[warning]The cluster's server certificate with thumbprint '********' is required in order to encrypt text but the certificate could not be found on the agent machine in the 'CurrentUser\My' certificate store location.
2018-02-14T18:30:25.7091733Z Creating application
2018-02-14T18:30:29.7025507Z ##[error]The ServiceDnsName for DefaultService 'myapp' is invalid.
FileName: D:\SvcFab\IB\131631066259308291\2fve3lf5.5tp\ApplicationManifest.xml
2018-02-14T18:30:29.9330549Z ##[section]Finishing: Deploy docker-compose application to a Service Fabric cluster
With the help of Microsoft support I was able to solve this issue.
The Application name was the problem. If you remove the "fabric:/" part of the application name it worked for me.
It is a documentation error. Microsoft support will update the documentation
At least now the VSTS steps works and is deployed to Service Fabric.
I now get some errors in the Service Fabric itself but that is for another question.