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

Andy Felton's Avatar

Andy Felton

17 Jun, 2017 10:15 AM

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 | <Deployment Id="7a392585-e7e7-4b7c-8f42-d765d1a00d99" EnvironmentId="Environments-41" TenantId="" ProjectId="Projects-21" PackageId="SportStructures-Website" PackageVersion="2.1.0-aws-version0001" InstalledOn="2017-06-17 10:11:29" ExtractedFrom="C:\Octopus\Files\SportStructures-Website.2.1.0-aws-version0001.nupkg-9f3025e6-5429-45ca-921c-0fbf5410de73" ExtractedTo="C:\Octopus\Applications\Rackspace\SportStructures-Website\2.1.0-aws-version0001_2" RetentionPolicySet="Environments-41/Projects-21/Step-Deploy IIS Website/Machines-81/&lt;default&gt;" CustomInstallationDirectory="\\662735-NFSClus1\662735-NFSClus1\www\SportStructures-Website\2.2.20" WasSuccessful="False" />
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.<ExecuteActionAndInitLoggingContext>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
                    |

  1. Support Staff 1 Posted by John Simons on 18 Jun, 2017 11:43 PM

    John Simons's Avatar

    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

  2. 2 Posted by Andy Felton on 19 Jun, 2017 07:09 AM

    Andy Felton's Avatar

    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

  3. Support Staff 3 Posted by John Simons on 19 Jun, 2017 11:40 PM

    John Simons's Avatar

    Hi Andy,

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

    Cheers
    John

  4. 4 Posted by Andy Felton on 21 Jun, 2017 09:11 AM

    Andy Felton's Avatar

    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:[email blocked]]
    *Sent:* 20 June 2017 00:40
    *To:* [email blocked]
    *Subject:* Re: Octopus.Features.IISWebSite_BeforePostDeploy.ps1 returned
    non-zero exit code: 1 [Problems #55288]

  5. Support Staff 5 Posted by John Simons on 21 Jun, 2017 09:54 PM

    John Simons's Avatar

    Hi Andy,

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

    Cheers
    John

  6. 6 Posted by Andy Felton on 22 Jun, 2017 09:24 PM

    Andy Felton's Avatar

    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:[email blocked]]
    *Sent:* 21 June 2017 22:54
    *To:* [email blocked]
    *Subject:* Re: Octopus.Features.IISWebSite_BeforePostDeploy.ps1 returned
    non-zero exit code: 1 [Problems #55288]

  7. Support Staff 7 Posted by John Simons on 22 Jun, 2017 10:43 PM

    John Simons's Avatar

    Hi Andy,

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

    Cheers
    John

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac