EXEC: Unable to connect to the remote server on NuGet restore on TFS build server - tfs

I am trying to use NuGet restore to pull the packages on the TFS build process, however, it keeps giving out the error EXEC: Unable to connect to the remote server
If I manually execute the MsBuild MyProjet.sln, it will build without issues.
Any help will be greatly appreciated.

It turns out that TFS service is running at a different account than my own account. After log on as the TFS account and turned on proxy server for that account, NuGet is able to download the package and finish the build.

Related

vaadin 24.0.0.alpha8 PreRelease build error on azure agent

We have recently tried to do an experimental upgrade to vaadin 24 PreRelease version. We were able to build and run the application in local environment but the application fails to build on azure agent with below error:
[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:24.0.0.alpha8:build-frontend (default) on project rmod-tools: Execution default of goal com.vaadin:vaadin-maven-plugin:24.0.0.alpha8:build-frontend failed: Unable to validate the license, please check your internet connection. If you need to work offline then please go to https://vaadin.com/pro/validate-license?getOfflineKey=mid-abfe707e-8d41af4e to retrieve an offline key. For troubleshooting steps, see https://vaadin.com/licensing-faq-and-troubleshooting.
The application builds successfully in local env.

Getting "ERROR 5 Getting File System Type of Destination" Access denied: suing TFS Windows Machine File Copy Task

I am new to TFS and i am trying to copy artifacts from my TFS server to a windows server using Windows Machine File Copy Task. But i am getting the following error.
"ERROR 5 Getting File System Type of Destination, Access denied". It is using Robocopy for achieving this.
I can remotely connect to the server and i have admin access. What am i missing here? Please help.
I can remotely connect to the server and i have admin access. What am
i missing here?
Azure DevOps/TFS is using build service account to run your build pipeline. The key point here is the build service just the same as account "I".
If not, you need to give same permission as "I" to that account.
Another way is changing your build service account to "I". This account is configured when you install build agent.
How to change it, you could refer my reply in this question: azure devops local agent pipeline permission denied
Hope it helps.

restore nuget in jenkins

When I tried to use Jenkins as our CI environment to build ASP.NET project, I set up to use MSBuild.exe to build project. But when the cmd run into restore nuget packages, it stuck. The error message is as below:
Unable to find version '2.5.48' of package 'SlowCheetah'.
https://api.nuget.org/v3/index.json:
Unable to load the service index for source
https://api.nuget.org/v3/index.json.
An error occurred while sending the request. Unable to connect to the remote server.
A socket operation was attempted to an unreachable network
[2606:2800:133:206e:1315:22a5:2006:24fd]:443
But if I use windows command line to run the msbuild, it is working and could download the pkg from nuget.org. Error only happened when try to build in Jenkins
NB : jenkins is running like a windows service and he is used by an administrator account

Restore nuget package Jenkins

When I tried to use Jenkins as our CI environment to build ASP.NET MVC5 project, I set up to use MSBuild.exe to build project.
But when the cmd run into restore nuget packages, it stucked. The error message is as below:
WARNING: Unable to connect to the remote server
Unable to find version '3.4.1.9004' of package 'Antlr'.
Build step 'Execute Windows batch command' marked build as failure
But if I use windows command line to run the msbuild, it is working and could download the pkg from nuget.org. Error only happened when try to build in Jenkins. And my network is fine, but behind a company proxy/firewall, I am not sure what it is. And I have set to auto restore nuget package in VS2013.
Any idea is much more appreciated.
I finally found out the root cause, it is the Jenkins service has not enough access right. Open windows services and right click on the Jenkins service, in the security tab, change the default user to whom that has enough access right to the Internet.

Jenkins failed to connect to TFS

I have been working on configuring Jenkins to connect to TFS server and all was working fine until we migrate some of our projects to TFS 2012.
Our Jenkins is running on a CI server as a service under local system account and the users will log into the Jenkins console using windows id as it is configured with Active directory
The job just connect to TFS server through command line utility which we started getting HTTP 404 error for TFS 2010 projects after we ran the build for one the TFS 2012 projects.
Here is the job log when it connects to TFS 2010 server
[Test] $ cmd /c call C:\Windows\TEMP\hudson666032816381947801.bat
C:\Softwares\Jenkins-1.569\workspace\Test>"C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/tf.exe" workspaces /owner:domain\username /login:domain\username,password - server:http://tfs2010Server:8080/tfs
HTTP code 404: Not Found
C:\Softwares\Jenkins-1.569\workspace\Test>exit 100
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
If I copy the same command and run it in the command prompt on CI server it runs fine but running it through Jenkins fails for 2010.Also the job runs fine for TFS 2012 server
I am not sure if it is relevant, I also deleted the files under the cache folder inside my home and also the AppData/Mircosoft/Team Foundation inside Windows/System32/config folder as stated by many and yields no result.
At this point I have already spent 2 days but in vain.Not sure what is the difference in running the command through Jenkins than directly through the command line.
Your help is much appreciated.
Your instance of TFS may be running on HTTPS not on HTTP as your -server parameter indicates. If you have not already solved this issue, I'd check that you have the right URL.

Resources