简体   繁体   中英

PowerShell DSC Pull Server returns HTTP 503 Service Unavailable

I'm using the PowerShell 5.0 September Preview to configure a PowerShell Desired State Configuration Pull Server on a Windows Server 2012 R2 virtual machine running on VMware Workstation. To perform the configuration of the DSC Pull Server, I am using a code snippet that I pulled off of the Microsoft PowerShell MSDN blog, which leverages the xPSDesiredStateConfiguration module's xDscWebService DSC resource.

When I attempt to test the OData endpoint for the DSC Pull Server, I receive a HTTP 503: Service Unavailable message. Any ideas on how to debug and fix this?

HTTP 503服务不可用

configuration DscWebService 
{ 
    param 
    ( 
        [ValidateNotNullOrEmpty()] 
        [string] $CertificateThumbPrint = 'AllowUnencryptedTraffic'
    ) 

    Import-DSCResource -ModuleName xPSDesiredStateConfiguration;

    WindowsFeature DSCServiceFeature 
    { 
        Ensure = 'Present';
        Name   = 'DSC-Service';
    } 

    WindowsFeature WinAuth 
    { 
        Ensure = 'Present';
        Name   = 'web-Windows-Auth';    
    } 

    xDscWebService PSDSCPullServer 
    { 
        Ensure                  = 'Present';
        EndpointName            = 'PullSvc'; 
        Port                    = 10100;
        PhysicalPath            = "$env:SystemDrive\inetpub\wwwroot\PSDSCPullServer";
        CertificateThumbPrint   = $CertificateThumbPrint;
        ModulePath              = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules";
        ConfigurationPath       = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration";
        State                   = 'Started';
        DependsOn               = '[WindowsFeature]DSCServiceFeature';
    } 

    xDscWebService PSDSCConformanceService
    {   
        Ensure                  = 'Present';
        EndpointName            = 'DscConformance';
        Port                    = 10101;
        PhysicalPath            = "$env:SystemDrive\inetpub\wwwroot\PSDSCComplianceServer";
        CertificateThumbPrint   = 'AllowUnencryptedTraffic';
        State                   = 'Started';
        IsComplianceServer      = $true;
        DependsOn               = @('[WindowsFeature]DSCServiceFeature', '[WindowsFeature]WinAuth','[xDSCWebService]PSDSCPullServer') ;
    } 
}  

DscWebService  -ComputerName dsc01.t.loc -OutputPath c:\dsc\PullServer -CertificateThumbPrint 00A2F55847C5523FE6CB0C2EE132C638339EA3A8;
Start-DscConfiguration -Wait -Verbose -Path c:\dsc\PullServer -Force;

a 503 Error usually indicates an issue with the apppool associated with a site. Run the following to see the state of your apppools

    Get-ChildItem IIS:\AppPools

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM