当 IIS 已停止时,如何防止 bamboo 中的根站点部署失败

当 IIS 已停止时,如何防止 bamboo 中的根站点部署失败

我正在部署根站点部署,每当 IIS 似乎停止时,它就会失败。以下是我从 bamboo 中的失败日志中得到的错误。

VERBOSE: Performing action iisreset /Stop on web4.testweb.******.com
    C:\bambooscripts\ClusterAwareDeploy-RootSiteAndComDependencies.v2.ps1 : Aborting due to an error!
    At D:\AtlassianData\bamboo-agent2-home\temp\4489217-4554753-124649565-ScriptBuildTask-17453259024217579627.ps1:23 char:6
    + "@ | c:\bambooscripts\ClusterAwareDeploy-RootSiteAndComDependencies.v ...
    +      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
        + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,ClusterAwareDeploy-RootSiteAndComDependencies.v2.ps1
    
    
    ErrorDetails          :
    Exception             : System.Management.Automation.RemoteException: The Windows Process Activation Service service is not started.
    FullyQualifiedErrorId : NativeCommandError
    InvocationInfo        : System.Management.Automation.InvocationInfo
    PipelineIterationInfo : {}
    ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
    TargetObject          : The Windows Process Activation Service service is not started.
    Category              : NotSpecified
    Activity              :
    Reason                : RemoteException
    TargetName            : The Windows Process Activation Service service is not started.
    TargetType            : String
    
    The Windows Process Activation Service service is not started.
    At C:\bambooscripts\IISFunctions.ps1:319 char:22
    + ...    'Stop' { $result = Invoke-Command -ComputerName $hostName -ErrorAc ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (The Windows Pro...is not started.:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError
        + PSComputerName        : p********db.******.lan
    
    Failing task since return code of [powershell -NonInteractive -ExecutionPolicy bypass -Command D:\AtlassianData\bamboo-agent2-home\temp\4489217-4554753-124649565-ScriptBuildTask-17453259024217579627.ps1] was 1 while expected 0

相关内容