Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IIS App deployment failed without clear error message #164

Closed
ynijs opened this issue Dec 12, 2016 · 5 comments
Closed

IIS App deployment failed without clear error message #164

ynijs opened this issue Dec 12, 2016 · 5 comments
Assignees

Comments

@ynijs
Copy link

ynijs commented Dec 12, 2016

This used to work, must be broken by some update I think.
The task IIS Web App deployment deploys a webdeploy package to a remote IIS server using WinRM over http. For some reason, it intermittently fails with the only error message being the following:
2016-12-12T20:13:07.3015505Z Status : Failed

2016-12-12T20:13:07.3015505Z DeploymentLog :

2016-12-12T20:13:07.3015505Z Deployment started on target machine...

2016-12-12T20:13:07.3015505Z

2016-12-12T20:13:07.3015505Z System.AggregateException: Failed to execute the

2016-12-12T20:13:07.3015505Z powershell script. Consult the logs below for details of

2016-12-12T20:13:07.3015505Z the error.

2016-12-12T20:13:07.3015505Z doesn't exists. --->

2016-12-12T20:13:07.3015505Z System.Management.Automation.RuntimeException: doesn't

2016-12-12T20:13:07.3015505Z exists. --->

2016-12-12T20:13:07.3015505Z System.Management.Automation.RuntimeException: doesn't

2016-12-12T20:13:07.3015505Z exists.

2016-12-12T20:13:07.3015505Z --- End of inner exception stack trace ---

2016-12-12T20:13:07.3171788Z at System.Management.Automation.Runspaces.PipelineBase.I

2016-12-12T20:13:07.3171788Z nvoke(IEnumerable input)

2016-12-12T20:13:07.3171788Z at System.Management.Automation.PowerShell.Worker.Constr

2016-12-12T20:13:07.3171788Z uctPipelineAndDoWork(Runspace rs, Boolean

2016-12-12T20:13:07.3171788Z performSyncInvoke)

2016-12-12T20:13:07.3171788Z at System.Management.Automation.PowerShell.Worker.Create

2016-12-12T20:13:07.3171788Z RunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)

2016-12-12T20:13:07.3171788Z at System.Management.Automation.PowerShell.CoreInvokeHel

2016-12-12T20:13:07.3171788Z per[TInput,TOutput](PSDataCollection`1 input,

2016-12-12T20:13:07.3171788Z PSDataCollection`1 output, PSInvocationSettings settings)

2016-12-12T20:13:07.3171788Z at System.Management.Automation.PowerShell.CoreInvoke[TI

2016-12-12T20:13:07.3171788Z nput,TOutput](PSDataCollection1 input, PSDataCollection1

2016-12-12T20:13:07.3171788Z output, PSInvocationSettings settings)

2016-12-12T20:13:07.3171788Z at

2016-12-12T20:13:07.3171788Z System.Management.Automation.PowerShell.Invoke(IEnumerable

2016-12-12T20:13:07.3171788Z input, PSInvocationSettings settings)

2016-12-12T20:13:07.3171788Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDep

2016-12-12T20:13:07.3171788Z loyer.Deployment.PowershellExecutor.<>c__DisplayClass28_0.<

2016-12-12T20:13:07.3171788Z Invoke>b__0()

2016-12-12T20:13:07.3328025Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDep

2016-12-12T20:13:07.3328025Z loyer.Utilities.RetryExecutor.<>c__DisplayClass19_0`1.<Exec

2016-12-12T20:13:07.3328025Z ute>b__0()

2016-12-12T20:13:07.3328025Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDep

2016-12-12T20:13:07.3328025Z loyer.Utilities.RetryExecutor.Execute(Action action)

2016-12-12T20:13:07.3328025Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDep

2016-12-12T20:13:07.3328025Z loyer.Utilities.RetryExecutor.Execute[T](Func`1 action)

2016-12-12T20:13:07.3328025Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDep

2016-12-12T20:13:07.3328025Z loyer.Deployment.PowershellExecutor.Invoke(String

2016-12-12T20:13:07.3328025Z errorContextMessage, Boolean writeResultToLog, Boolean

2016-12-12T20:13:07.3484301Z isCancellable, ActionPreference errorActionPreference)

2016-12-12T20:13:07.3484301Z --- End of inner exception stack trace ---

2016-12-12T20:13:07.3484301Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDep

2016-12-12T20:13:07.3484301Z loyer.Deployment.PowershellExecutor.Invoke(String

2016-12-12T20:13:07.3484301Z errorContextMessage, Boolean writeResultToLog, Boolean

2016-12-12T20:13:07.3484301Z isCancellable, ActionPreference errorActionPreference)

2016-12-12T20:13:07.3484301Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDep

2016-12-12T20:13:07.3484301Z loyer.Deployment.ScriptExecutor.ExecuteScript(IPowerShell

2016-12-12T20:13:07.3484301Z powerShell, String script, String arguments, Boolean

2016-12-12T20:13:07.3484301Z isScriptDotSourced, Boolean useHttp)

2016-12-12T20:13:07.3484301Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDep

2016-12-12T20:13:07.3484301Z loyer.Deployment.DeploymentService.RunPowerShellScripts(Dep

2016-12-12T20:13:07.3484301Z loymentMachineSpecification deploymentMachine,

2016-12-12T20:13:07.3484301Z ScriptSpecification scriptSpecification,

2016-12-12T20:13:07.3484301Z ScriptSpecification initializationScriptSpecification,

2016-12-12T20:13:07.3484301Z String applicationPath, IPowerShell powerShellSession)

2016-12-12T20:13:07.3484301Z ---> (Inner Exception #0)

2016-12-12T20:13:07.3484301Z System.Management.Automation.RuntimeException: doesn't

2016-12-12T20:13:07.3484301Z exists. --->

2016-12-12T20:13:07.3484301Z System.Management.Automation.RuntimeException: doesn't

2016-12-12T20:13:07.3484301Z exists.

2016-12-12T20:13:07.3640581Z --- End of inner exception stack trace ---

2016-12-12T20:13:07.3640581Z at System.Management.Automation.Runspaces.PipelineBase.I

2016-12-12T20:13:07.3640581Z nvoke(IEnumerable input)

2016-12-12T20:13:07.3640581Z at System.Management.Automation.PowerShell.Worker.Constr

2016-12-12T20:13:07.3640581Z uctPipelineAndDoWork(Runspace rs, Boolean

2016-12-12T20:13:07.3640581Z performSyncInvoke)

@shanecastle
Copy link

I'm getting a similar issue. If I have a release with "IIS Web App Management", I cant save the release, I get the error: "TF400893: Unable to contact the server. This is most likely caused by a network error. Please check your connection and try again."

If I run the release as is, I get a similar error. I'm deploying an app to on-prem IIS via VSTS

@chshrikh
Copy link
Contributor

@ynijs could you please set the system.debug variable with value as true and share the logs to RM_Customer_Queries at Microsoft dot com or post them here.

@chshrikh chshrikh self-assigned this Dec 29, 2016
@aidanfolkes
Copy link

@ynijs, @chshrikh
Hi,
I was getting the same "doesn't exists." message and it turned out to be because Web Deploy Package was wrong.
The error message is incomplete. In MsDeployOnTargetMachines.ps1, line 184
throw "$packageFile doesn't exists."
$packageFile is not set. I think it should be $Path.

@mvvsubbu mvvsubbu assigned Ajay-MS and unassigned chshrikh Jan 25, 2017
@dascalos
Copy link

I too was getting the "Doesn't Exists" error. I spent a few hours today pouring over the logs and I see what the problem is. When I publish my artifacts, I choose artifact type Server (not Share). When the IIS Deployment WinRM script runs on the IIS box, it pushes a path of c:\blah\blah\blah. The IIS box doesn't have that file on it's box. Changing artifact type to Share and all works as expected. Is there a way to do this with artifact type of Server? This is the way I would prefer to publish my artifacts.

@Ajay-MS
Copy link

Ajay-MS commented Jan 31, 2017

@ynijs @shanecastle @aidanfolkes @dascalos
This issue has been fixed. If you still face this issue feel free to reopen this issue.

@dascalos
When you select artifact type as server, then during queue a RD, artifacts are being downloaded to agent box. But for WinRm task artifacts need to be present on target machine. So you have to you copy tasks ( like Windows File Copy or Azure File Copy) in your RD to copy artifacts from local machine to target machine. After copy task you can add WinRm tasks.

@Ajay-MS Ajay-MS closed this as completed Jan 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants