chocolatey-community / chocolatey-azuredevops

Chocolatey Extension for Azure DevOps
MIT License
20 stars 11 forks source link

Unable to connect to the remote server #66

Open VerdonTrigance opened 3 years ago

VerdonTrigance commented 3 years ago

Can not install choco. Error log's below.

Expected Behavior

Use Chocolatey

View raw log

##[debug]Evaluating condition for step: 'Use Chocolatey'
##[debug]Evaluating: SucceededNode()
##[debug]Evaluating SucceededNode:
##[debug]=> True
##[debug]Result: True
Starting: Use Chocolatey
==============================================================================
Task         : Chocolatey tool installer
Description  : Acquires the latest version of Chocolatey from the internet and adds it to the PATH (if not already installed). This task only works on Windows agents
Version      : 0.3.2
Author       : David Gardiner
Help         : [More Information](https://chocolatey-community.github.io/chocolatey-azuredevops/
==============================================================================
##[debug]VstsTaskSdk 0.11.0 commit 7ff27a3e0bdd6f7b06690ae5f5b63cb84d0f23f4
##[debug]Entering C:\DeployAgent\_work\_tasks\ChocolateyToolInstaller_3975e3a3-bf9a-4f83-bc7d-91b3a8da20cd\0.3.2\installer.ps1.
##[debug]chocoInstallLocation: C:\ProgramData\chocolatey
choco.exe is already installed.
##[debug]INPUT_FORCE: 'false'
##[debug] Converted to bool: False
##[debug]Leaving C:\DeployAgent\_work\_tasks\ChocolateyToolInstaller_3975e3a3-bf9a-4f83-bc7d-91b3a8da20cd\0.3.2\installer.ps1.
Finishing: Use Chocolatey

Current Behavior

2021-08-02T12:39:34.8707359Z ##[debug]Evaluating condition for step: 'Use Chocolatey'
2021-08-02T12:39:34.8709024Z ##[debug]Evaluating: SucceededNode()
2021-08-02T12:39:34.8709465Z ##[debug]Evaluating SucceededNode:
2021-08-02T12:39:34.8710399Z ##[debug]=> True
2021-08-02T12:39:34.8710818Z ##[debug]Result: True
2021-08-02T12:39:34.8711279Z ##[section]Starting: Use Chocolatey
2021-08-02T12:39:35.0984259Z ==============================================================================
2021-08-02T12:39:35.0984643Z Task         : Chocolatey tool installer
2021-08-02T12:39:35.0984988Z Description  : Acquires the latest version of Chocolatey from the internet and adds it to the PATH (if not already installed). This task only works on Windows agents
2021-08-02T12:39:35.0985754Z Version      : 0.3.2
2021-08-02T12:39:35.0985942Z Author       : David Gardiner
2021-08-02T12:39:35.0987023Z Help         : [More Information](https://chocolatey-community.github.io/chocolatey-azuredevops/
2021-08-02T12:39:35.0987320Z ==============================================================================
2021-08-02T12:39:57.8800941Z ##[debug]VstsTaskSdk 0.11.0 commit 7ff27a3e0bdd6f7b06690ae5f5b63cb84d0f23f4
2021-08-02T12:39:58.5470111Z ##[debug]Entering C:\Agent\_work\_tasks\ChocolateyToolInstaller_3975e3a3-bf9a-4f83-bc7d-91b3a8da20cd\0.3.2\installer.ps1.
2021-08-02T12:39:58.5769861Z ##[debug]chocoInstallLocation: 
2021-08-02T12:39:58.7154967Z ##[debug]INPUT_FORCE: 'false'
2021-08-02T12:39:58.7176486Z ##[debug] Converted to bool: False
2021-08-02T12:39:58.7235534Z Installing Chocolatey - this may take a few minutes
2021-08-02T12:40:42.0620481Z ##[debug]Caught exception from task script.
2021-08-02T12:40:42.0771574Z ##[debug]Error record:
2021-08-02T12:40:42.2953044Z ##[debug]ForEach-Object : Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"
2021-08-02T12:40:42.2960920Z ##[debug]At line:19 char:13
2021-08-02T12:40:42.3053296Z ##[debug]+             ForEach-Object {
2021-08-02T12:40:42.3061037Z ##[debug]+             ~~~~~~~~~~~~~~~~
2021-08-02T12:40:42.3069225Z ##[debug]    + CategoryInfo          : NotSpecified: (:) [ForEach-Object], MethodInvoca    tionException
2021-08-02T12:40:42.3077123Z ##[debug]    + FullyQualifiedErrorId : WebException,Microsoft.PowerShell.Commands.ForEa    chObjectCommand
2021-08-02T12:40:42.3085002Z ##[debug] 
2021-08-02T12:40:42.3100632Z ##[debug]Script stack trace:
2021-08-02T12:40:42.3130672Z ##[debug]at <ScriptBlock>, C:\Agent\_work\_tasks\ChocolateyToolInstaller_3975e3a3-bf9a-4f83-bc7d-91b3a8da20cd\0.3.2\installer.ps1: line 34
2021-08-02T12:40:42.3138517Z ##[debug]at <ScriptBlock>, <No file>: line 1
2021-08-02T12:40:42.3146222Z ##[debug]at <ScriptBlock>, <No file>: line 22
2021-08-02T12:40:42.3154097Z ##[debug]at <ScriptBlock>, <No file>: line 18
2021-08-02T12:40:42.3161902Z ##[debug]at <ScriptBlock>, <No file>: line 1
2021-08-02T12:40:42.3176564Z ##[debug]Exception:
2021-08-02T12:40:42.4698165Z ##[debug]System.Management.Automation.MethodInvocationException: Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server" ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 104.20.74.28:443
2021-08-02T12:40:42.4712290Z ##[debug]   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
2021-08-02T12:40:42.4716632Z ##[debug]   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
2021-08-02T12:40:42.4724646Z ##[debug]   --- End of inner exception stack trace ---
2021-08-02T12:40:42.4732690Z ##[debug]   at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
2021-08-02T12:40:42.4740545Z ##[debug]   at System.Net.WebClient.DownloadString(Uri address)
2021-08-02T12:40:42.4748272Z ##[debug]   at CallSite.Target(Closure , CallSite , Object , String )
2021-08-02T12:40:42.4756461Z ##[debug]   --- End of inner exception stack trace ---
2021-08-02T12:40:42.4764634Z ##[debug]   at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
2021-08-02T12:40:42.4775407Z ##[debug]   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
2021-08-02T12:40:42.4782774Z ##[debug]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2021-08-02T12:40:42.4791642Z ##[debug]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2021-08-02T12:40:42.4799235Z ##[debug]   at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
2021-08-02T12:40:42.4807247Z ##[debug]   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
2021-08-02T12:40:42.4815399Z ##[debug]   at System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(ScriptBlockClauseToInvoke clauseToInvoke, Boolean createLocalScope, Dictionary`2 functionsToDefine, List`1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args)
2021-08-02T12:40:42.4823163Z ##[debug]   at System.Management.Automation.ScriptBlock.<>c__DisplayClassa.<InvokeWithPipe>b__8()
2021-08-02T12:40:42.4830888Z ##[debug]   at System.Management.Automation.Runspaces.RunspaceBase.RunActionIfNoRunningPipelinesWithThreadCheck(Action action)
2021-08-02T12:40:42.4839151Z ##[debug]   at System.Management.Automation.ScriptBlock.InvokeWithPipe(Boolean useLocalScope, Dictionary`2 functionsToDefine, List`1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args)
2021-08-02T12:40:42.4846828Z ##[debug]   at System.Management.Automation.ScriptBlock.InvokeUsingCmdlet(Cmdlet contextCmdlet, Boolean useLocalScope, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Object[] args)
2021-08-02T12:40:42.4854367Z ##[debug]   at Microsoft.PowerShell.Commands.ForEachObjectCommand.ProcessRecord()
2021-08-02T12:40:42.4862741Z ##[debug]   at System.Management.Automation.CommandProcessor.ProcessRecord()
2021-08-02T12:40:42.5374689Z ##[error]Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"
2021-08-02T12:40:42.5382833Z ##[debug]Processed: ##vso[task.logissue type=error]Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"
2021-08-02T12:40:42.5384121Z ##[debug]Processed: ##vso[task.complete result=Failed]
2021-08-02T12:40:42.8157376Z ##[section]Finishing: Use Chocolatey

Possible Solution

add proxy params... maybe?

Steps to Reproduce (for bugs)

Run on the server under the proxy

Context

Your Environment

Windows Server 2012R2, powershell 5.1