Search code examples
azure-devopsazure-pipelinescontinuous-deploymentwindows-server-2012-r2azure-devops-server-2019

Error while i try to install Deployment agent on IIS Server


I have One server IIS on a Domain and I have an Azure Devops Server On Premise on another domain. I tried to execute the deployment group script but I have this issue in my powershell:

An Error while sending the request. Failed connection. do it again or tap on Ctrl+C Enter url connection

And I can't have a proxy.

I entered my script in powershell administrator.

$ErrorActionPreference="Stop";If(-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent() ).IsInRole( [Security.Principal.WindowsBuiltInRole] “Administrator”)){ throw "Run command in an administrator PowerShell prompt"};If($PSVersionTable.PSVersion -lt (New-Object System.Version("3.0"))){ throw "The minimum version of Windows PowerShell that is required by the script (3.0) does not match the currently running version of Windows PowerShell." };If(-NOT (Test-Path $env:SystemDrive\'azagent')){mkdir $env:SystemDrive\'azagent'}; cd $env:SystemDrive\'azagent'; for($i=1; $i -lt 100; $i++){$destFolder="A"+$i.ToString();if(-NOT (Test-Path ($destFolder))){mkdir $destFolder;cd $destFolder;break;}}; $agentZip="$PWD\agent.zip";$DefaultProxy=[System.Net.WebRequest]::DefaultWebProxy;$securityProtocol=@();$securityProtocol+=[Net.ServicePointManager]::SecurityProtocol;$securityProtocol+=[Net.SecurityProtocolType]::Tls12;[Net.ServicePointManager]::SecurityProtocol=$securityProtocol;$WebClient=New-Object Net.WebClient; $Uri='https://go.microsoft.com/fwlink/?linkid=2066756';if($DefaultProxy -and (-not $DefaultProxy.IsBypassed($Uri))){$WebClient.Proxy= New-Object Net.WebProxy($DefaultProxy.GetProxy($Uri).OriginalString, $True);}; $WebClient.DownloadFile($Uri, $agentZip);Add-Type -AssemblyName System.IO.Compression.FileSystem;[System.IO.Compression.ZipFile]::ExtractToDirectory( $agentZip, "$PWD");.\config.cmd --deploymentgroup --deploymentgroupname "Careline deployment dev preprod" --agent $env:COMPUTERNAME --runasservice --work '_work' --url 'https://mydomain:8080/tfs/' --collectionname 'Exelus' --projectname 'EXT-LinkCare' --auth Integrated; Remove-Item $agentZip;

I used: - integrated authentification, - Alt authentification - PAT authentification

I tried to see any port but I don't find it Do you have any Idea?


Solution

  • Currently I known that the installation of an agent in another server with another domain needs to be in HTTPS. I tried to do it in http. the real problem is that ou azure devops server has only http binding. So, we will open some ports and create https binding in our azure devops server. This will correct our current issue. Careful of default installation .