Error: Error: read ECONNRESET Packages failed to restore - nuget-package-restore

I am trying to restore NuGet packages from the Azure Artifacts feed with the task "Nuget restore" which is giving an error -
2020-03-17T06:16:01.923910Z Resolved from tool cache: 4.1.0
2020-03-17T06:16:01.939365Z Using version: 4.1.0
2020-03-17T06:16:01.924520Z Found tool in cache: NuGet 4.1.0 x64
2020-03-17T06:16:02.080668Z [command]C:\Windows\system32\chcp.com 65001
2020-03-17T06:16:02.007116Z Active code page: 65001
2020-03-17T06:16:02.012223Z Detected NuGet version 4.1.0.2450 / 4.1.0
2020-03-17T06:16:02.081611Z SYSTEMVSSCONNECTION exists true
2020-03-17T06:16:04.157611Z ##[error]Error: Error: read ECONNRESET
2020-03-17T06:16:04.190260Z ##[error]Packages failed to restore
Details -
Server - Azure DevOps server 2019
Azure DevOps build pipeline
Azure Artifacts Feed - offline
Agent Version 2.144.2
What I noticed
my "Nuget Restore" task is working well when my build machine is in the same LAN with azure DevOps server and giving an error with the different LAN's build machine.
I googled but did not find anything. some pages showing this error is because of the proxy, some page is showing version issue of NuGet.
Not getting what exactly the issue is. Can someone help with this?

Related

Unable to install PowerShell module on AWS EC2 Windows 2019 Server

I am experiencing a problem installing the PowerShell module on the Windows 2019 server. The server is a cloud server hosted on an AWS Ec2 instance. I have followed all the online resources to debug the issue, and I have enabled the tls12 on the server. But still, I am facing a problem with installing any of the modules.
Getting the PackageManagement error as well as the source warning.
WARNING: Source Location 'https://www.powershellgallery.com/api/v2/package/PackageManagement/1.4.7' is not valid.
PackageManagement\Install-Package : Package 'PackageManagement' failed to download. Here is the screenshot of the error from PowerShell session

How do I add the 'Name' parameter to an 'Install MSI' task in Azure DevOps?

I'm using an 'Install MSI' task to install an msi file as part of a deployment. The task is throwing the error:
2022-02-22T06:42:35.0716371Z ActionData: Updating component registration
2022-02-22T06:42:35.0839323Z ##[error]Unable to process command '##vso[task.logdetail id=5c578bc6-8e75-4147-992e-fe8cd643eaa2;parentid=00000000-0000-0000-0000-000000000000;name=;type=release;order=1]Updating component registration' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296)
2022-02-22T06:42:35.0888633Z ##[error]Name is required for this new timeline record.
I'm using Azure DevOps on a local Team Foundation Server for the build and deploy process. From the error message I can see that the 'Name' parameter is missing. The deployment works fine when I'm installing to physical machines, but gives the above error when I'm installing to virtual machines.
There were apparently lots of people who had variants of this issue back in 2016, like this guy on social.msdn or this guy on github or this guy on SO. Apparently in 2016 it was possible to turn off "Record project details", however this option is not available in newer versions of Azure Devops.
Does anyone know how to fix this issue in newer versions of Azure DevOps?
Versions: Azure DevOps Server 2020 Update 1.1, Agent 2.153.1, Install MSI 0.1.20.
More a workaround than an answer, but I ended up switching the 'Install MSI' task to a regular 'Command line ' task.
Using the command line with the 'msiexec' command lets you install msi files just as easily as using the 'Install MSI' task.

DEP6720: Failed to deploy package 'Native Debugger'

After updating the OS of the Hololens, I got the following error for all applications (built with Unity)
DEP6720 Failed to deploy package 'native Debugger'
DEP6859 Error
removing the file from the remote device DiagnosticsHubMsg.ddl not
found HRESULT exception 0x800700002
I googled and could not find any reference to this problem. I wonder if I have to update visual studio? (the latest seems to be 15.7.5)
EDIT:
I updated visual studio to 15.7.5 hoping to solve the problem. Now it is worse
I got the error but also these other errors
DEP6721 Failed to deploy optional package 'XAML UI Debugger
2'DEP6950: Error transferring the file to the remote device
XamlDiagnostics DEP6721: Failed to deploy optional package 'XAML UI
Debugger Dependency' DEP6950: Error transferring the file to the
remote device: XamlDiagnostics.dll. Remote Device Disconnected'.
DEP6721: Failed to deploy optional package 'Standard Collector
Bridge'DEP6950: Error transferring the file to the remote
device:DiagnosticsHub.StandardCollector.Bridge.dll. Remote Device
Disconnected'. DEP6720: Failed to deploy package 'Windows 10 Remote
Tools' DEP6950: Error transferring the file to the remote
device:TailoredDeploy.exe. Remote Device Disconnected'. DEP6720:
Failed to deploy package 'Core CLR' DEP6950: Error transferring the
file to the remote device: clrcompression.dll. Remote Device
Disconnected'.
I am lost at what to do
I could finally got to deploy on the hololens.
After following different advice that did not work, in the end I repaired my installation of Visual Studio.
After the repair, VS was set again to the language of Windows. The colors of the editor also changed. I could deploy to the hololens there. (it took a lot of time the first time)
However -and for some strange reason- I could not change my settings back to english. If I do that, the same problem reappears. So even though I am more confortable with english, now I have to use visual studio in the same language of the operation system

Sonarqube Error

Sonarqube error in VSTS Build when version 4 of sonar extension is used.
Error -
[SQ] API GET. '/api/server/version' failed, error was:
{"code":"UNABLE_TO_GET_ISSUER_CERT_LOCALLY"} .
SonarQube extension version 3 build runs successfully.
We are using Sonarqube version 7.1
I also faced same error:
[error][SQ] API GET '/api/server/version' failed, error was: {"code":"UNABLE_TO_GET_ISSUER_CERT_LOCALLY"
To fix this issue:
First I installed Java 17 to devOps build agent machine https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html
Java SE Development Kit 17.0.5 Windows x64 Installer.
Installed path: C:\Program Files\Java\jdk-17.0.5
Then add two devOps build pipeline variables:
NODE_EXTRA_CA_CERTS and SONAR_SCANNER_OPTS
SONAR_SCANNER_OPTS:
Copy your cacerts and replace existing one.
path: “…\Java\jdk 17.0.5\lib\security\cacerts”
Then add both paths in devOps SONAR_SCANNER_OPTS variable:
-Djavax.net.ssl.trustStore="C:\program files\Java\jdk 17.0.5\lib\security\cacerts"
-Djavax.net.ssl.keyStore="C:\program files\Java\jdk 17.0.5\lib\security\cacerts"
NODE_EXTRA_CA_CERTS:
copy your cert *.PEM file and replace it the existing one in devops build agent path: C:\devOps_Agent\sonarchain.pem
After this step SonarQube prepare starting to work.

HTTP Error 502.5 - Process Failure - .net core 2.0 to AWS EB

I'm getting this error after deploying my API to AWS Elastic Beanstalk.
Steps to reproduce
File -> New -> Project
ASP.NET Core Web Application
ASP.NET Core 2.0
Web API
F5: OK
Publish to AWS Elastic Beanstalk... (via AWS Tollkit for Visual Studio 2017)
HTTP Error 502.5 - Process Failure
Additional info
Visual Studio 2017
64bit Windows Server 2012 R2 v1.2.0 running IIS 8.5
I've already tried looking up many other questions, but to no success.
Log
2018-01-15T13:27:21.000Z Error 0:(0) IIS AspNetCore Module - Application 'MACHINE/WEBROOT/APPHOST/DEFAULT WEB SITE' with physical root 'C:\inetpub\AspNetCoreWebApps\app\' failed to start process with commandline 'dotnet .\WebApplication2.dll', ErrorCode = '0x80004005 : 8000808c.
<PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
Adding the above code to the .csproj solved the problem.
I faced the same issue. After contacting AWS support, it turns out that there was a bug in my code [Release version].
I suggest the following steps to debug locally:
Publish your solution to a file
Open Command Prompt in the published folder
Run "dotnet Your.Main.App.dll"
Most probably you will see an exception
Sometimes we forget to test our solutions in Release mode.
Cheers!

Resources