Octopus.Features.IISWebSite_BeforePostDeploy.ps1 returned non-zero exit code: 1

Hi,

We’re deploying on a Windows Server 2008 R2 box to a UNC directory, having fixed a few permission problems I’m now getting a failure with Octopus.Features.IISWebSite_BeforePostDeploy.ps1 but no details of the actual failure.

Verbose log is shown below.

Regards
Andy

10:11:18 Verbose | Creating ‘\662735-NFSClus1\662735-NFSClus1\www\SportStructures-Website\2.2.20\Octopus.Features.IISWebSite_BeforePostDeploy.ps1’ from embedded resource
10:11:18 Verbose | Executing '\662735-NFSClus1\662735-NFSClus1\www\SportStructures-Website\2.2.20\Octopus.Features.IISWebSite_BeforePostDeploy.ps1’
10:11:23 Verbose | Name Value
10:11:23 Verbose | ---- -----
10:11:23 Verbose | PSVersion 3.0
10:11:23 Verbose | WSManStackVersion 3.0
10:11:23 Verbose | SerializationVersion 1.1.0.1
10:11:23 Verbose | CLRVersion 4.0.30319.18444
10:11:23 Verbose | BuildVersion 6.2.9200.16481
10:11:23 Verbose | PSCompatibleVersions {1.0, 2.0, 3.0}
10:11:23 Verbose | PSRemotingProtocolVersion 2.2
10:11:23 Verbose | PowerShell Environment Information:
10:11:23 Verbose | OperatingSystem: Microsoft Windows NT 6.1.7601 Service Pack 1
10:11:23 Verbose | OsBitVersion: x64
10:11:23 Verbose | Is64BitProcess: True
10:11:23 Verbose | CurrentUser: LON\30921-lowpriv
10:11:23 Verbose | MachineName: 670523-WEB1
10:11:23 Verbose | ProcessorCount: 6
10:11:23 Verbose | CurrentDirectory: \662735-NFSClus1\662735-NFSClus1\www\SportStructures-Website\2.2.20
10:11:23 Verbose | TempDirectory: C:\Users\30921-lowpriv\AppData\Local\Temp
10:11:23 Verbose | HostProcessName: powershell
10:11:23 Verbose | TotalPhysicalMemory: 20971064 KB
10:11:23 Verbose | AvailablePhysicalMemory: 9115276 KB
10:11:33 Verbose | Deleting '\662735-NFSClus1\662735-NFSClus1\www\SportStructures-Website\2.2.20\Octopus.Features.IISWebSite_BeforePostDeploy.ps1’
10:11:33 Error | Script ‘\662735-NFSClus1\662735-NFSClus1\www\SportStructures-Website\2.2.20\Octopus.Features.IISWebSite_BeforePostDeploy.ps1’ returned non-zero exit code: 1
10:11:33 Error | Running rollback conventions…
10:11:33 Verbose | Adding journal entry:
10:11:33 Verbose |
10:11:33 Error | Script ‘\662735-NFSClus1\662735-NFSClus1\www\SportStructures-Website\2.2.20\Octopus.Features.IISWebSite_BeforePostDeploy.ps1’ returned non-zero exit code: 1
10:11:33 Verbose | Updating manifest with output variables
10:11:34 Verbose | Package deployment step finished
10:11:34 Fatal | The remote script failed with exit code 1
10:11:34 Verbose | at Octopus.Worker.Scripting.ScriptResult.EnsureSuccessful() in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Worker\Scripting\ScriptResult.cs:line 69
| at Octopus.Server.Orchestration.Deploy.Package.PackageActionHandler.Execute(ActionCommand command, Machine machine) in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Server\Orchestration\Deploy\Package\PackageActionHandler.cs:line 39
| at Octopus.Server.Orchestration.Deploy.DeploymentTaskController.<>c__DisplayClass28_0.b__0() in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Server\Orchestration\Deploy\DeploymentTaskController.cs:line 321
| at Octopus.Server.Orchestration.Deploy.DeploymentTaskController.ExecuteWithTransientErrorDetection(Action action, Machine machine) in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Server\Orchestration\Deploy\DeploymentTaskController.cs:line 424
| at Octopus.Server.Orchestration.Deploy.DeploymentTaskController.ExecuteActionAndInitLoggingContext(PlannedStep step, Machine machine, PlannedAction action) in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Server\Orchestration\Deploy\DeploymentTaskController.cs:line 318
10:11:34 Fatal | Deploy IIS Website on Rackspace Server
|

Hi Andy,

Sorry to hear that you are running into a few issues, can you tell us what version of Server and Tentacle are you running ?
Can we also get the task raw logs, see https://octopus.com/docs/how-to/get-the-raw-output-from-a-task.

Cheers
John

Hi John,

Please see the raw output attached. The server is version 3.8.5 and the Tentacal is also 3.8.5.

Thanks
Andy

ServerTasks-10929.log.txt (14 KB)

Hi Andy,

Can you try deploying the website to a non unc path ?
Also, did the website or/and apppool gets created?

Cheers
John

Hi John,

Sorry for the delay coming back to you. I’ve tried this on a non UNC path
and that is failing with the same error. Doesn’t look like the App Pool or
website is created – I’m thinking it may be a permissions issue?

Thanks

Andy

From: John Simons [mailto:tender2+dd5fec6db9@tenderapp.com]
Sent: 20 June 2017 00:40
To: andy.felton@nemisys.uk.com
Subject: Re: Octopus.Features.IISWebSite_BeforePostDeploy.ps1 returned
non-zero exit code: 1 [Problems #55288]

Hi Andy,

It definitely sounds like a permissions issue, is the Tentacle running with an admin account or local system ?

Cheers
John

Hi John,

It was running as one of our Active Directory accounts, modified the
accounts permissions and it’s all working now.

Thanks

Andy

From: John Simons [mailto:tender2+dd5fec6db9@tenderapp.com]
Sent: 21 June 2017 22:54
To: andy.felton@nemisys.uk.com
Subject: Re: Octopus.Features.IISWebSite_BeforePostDeploy.ps1 returned
non-zero exit code: 1 [Problems #55288]

Hi Andy,

I’m glad everything is working now.
Let us know if there is any other issues.

Cheers
John