The WBEM Server limits have been exceeded?

This topic contains 12 replies, has 2 voices, and was last updated by Profile photo of Rich Hopkins Rich Hopkins 1 year, 9 months ago.

  • Author
    Posts
  • #22707
    Profile photo of Rich Hopkins
    Rich Hopkins
    Participant

    I've setup a pull server and have two clients getting configs from it. Features got installed and files downloaded, so things work, but when I try and look at the config on the server, I'm getting this error:

    PS C:\> Get-DscConfiguration
    Get-DscConfiguration : The WBEM Server limits have been exceeded (e.g. memory, connections, ...).
    At line:1 char:1
    + Get-DscConfiguration
    + ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ResourceBusy: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager) [Get
    -DscConfiguration], CimException
    + FullyQualifiedErrorId : MI RESULT 27,Get-DscConfiguration

    Anyone run across this one before?

  • #22708
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    To clarify – you're getting this error on the pull server? I think someone reported this or something very similar to it; it was a bug in the xPSDscWebService resource's Get-TargetResource function, I think. (Typing this from memory, I may have the resource name wrong. Whatever the one that we use to install a pull server is called.)

  • #22710
    Profile photo of Rich Hopkins
    Rich Hopkins
    Participant

    On the client servers actually. Pull server is working great. Pull server is 2012 R2, clients are both 2008 R2.

  • #22711
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Ah, ok. Can you post a copy of the configuration that's being applied to the clients, or does that contain sensitive information?

    Were you getting this error before the configuration was applied, or only after they pulled their configs? If you push the configuration, do you get the same error?

  • #22712
    Profile photo of Rich Hopkins
    Rich Hopkins
    Participant

    I did push some configs to the client servers early in my testing and was able to run Get-DscConfiguration successfully then, its after the config was pulled that I started getting the error. Here is a cleaned up version of my script so far:

    $ConfigurationData = @{
    AllNodes = @(
    @{NodeName = 'EQDEVOPS1';Role=@('DSCPullServer')}
    @{NodeName = 'EQDEVOPS2';Role=@('Web','DevInt')}
    @{NodeName = 'EQDEVOPS3';Role=@('Web','Alpha')}
    )
    }

    Configuration EqConfig {

    Import-DSCResource -ModuleName xPSDesiredStateConfiguration

    Node $AllNodes.NodeName {

    switch ($Node.Role) {

    'DSCPullServer' {

    WindowsFeature DSCServiceFeature {
    Ensure = "Present"
    Name = "DSC-Service"
    }

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

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

    } #DSCPullServer

    'Web' {

    WindowsFeature eq_Web-Server {
    Ensure = "Present"
    Name = "Web-Server"
    }

    WindowsFeature eq_Web-WebServer {
    Ensure = "Present"
    Name = "Web-WebServer"
    DependsOn = "[WindowsFeature]eq_Web-Server"
    }

    WindowsFeature eq_Web-Common-Http {
    Ensure = "Present"
    Name = "Web-Common-Http"
    DependsOn = "[WindowsFeature]eq_Web-WebServer"
    }

    WindowsFeature eq_Web-Static-Content {
    Ensure = "Present"
    Name = "Web-Static-Content"
    DependsOn = "[WindowsFeature]eq_Web-Common-Http"
    }

    WindowsFeature eq_Web-Default-Doc {
    Ensure = "Present"
    Name = "Web-Default-Doc"
    DependsOn = "[WindowsFeature]eq_Web-Common-Http"
    }

    WindowsFeature eq_Web-Dir-Browsing {
    Ensure = "Present"
    Name = "Web-Dir-Browsing"
    DependsOn = "[WindowsFeature]eq_Web-Common-Http"
    }

    WindowsFeature eq_Web-Http-Errors {
    Ensure = "Present"
    Name = "Web-Http-Errors"
    DependsOn = "[WindowsFeature]eq_Web-Common-Http"
    }

    WindowsFeature eq_Web-Health {
    Ensure = "Present"
    Name = "Web-Health"
    DependsOn = "[WindowsFeature]eq_Web-WebServer"
    }

    WindowsFeature eq_Web-Http-Logging {
    Ensure = "Present"
    Name = "Web-Http-Logging"
    DependsOn = "[WindowsFeature]eq_Web-Health"
    }

    WindowsFeature eq_Web-Request-Monitor {
    Ensure = "Present"
    Name = "Web-Request-Monitor"
    DependsOn = "[WindowsFeature]eq_Web-Health"
    }

    WindowsFeature eq_Web-Security {
    Ensure = "Present"
    Name = "Web-Security"
    DependsOn = "[WindowsFeature]eq_Web-WebServer"
    }

    WindowsFeature eq_Web-Filtering {
    Ensure = "Present"
    Name = "Web-Filtering"
    DependsOn = "[WindowsFeature]eq_Web-Security"
    }

    WindowsFeature eq_Web-Windows-Auth {
    Ensure = "Present"
    Name = "Web-Windows-Auth"
    DependsOn = "[WindowsFeature]eq_Web-Security"
    }

    WindowsFeature eq_Web-Performance {
    Ensure = "Present"
    Name = "Web-Performance"
    DependsOn = "[WindowsFeature]eq_Web-WebServer"
    }

    WindowsFeature eq_Web-Stat-Compression {
    Ensure = "Present"
    Name = "Web-Stat-Compression"
    DependsOn = "[WindowsFeature]eq_Web-Performance"
    }

    WindowsFeature eq_Web-Dyn-Compression {
    Ensure = "Present"
    Name = "Web-Dyn-Compression"
    DependsOn = "[WindowsFeature]eq_Web-Performance"
    }

    WindowsFeature eq_Web-App-Dev {
    Ensure = "Present"
    Name = "Web-App-Dev"
    DependsOn = "[WindowsFeature]eq_Web-WebServer"
    }

    WindowsFeature eq_Web-ISAPI-Ext {
    Ensure = "Present"
    Name = "Web-ISAPI-Ext"
    DependsOn = "[WindowsFeature]eq_Web-App-Dev"
    }

    WindowsFeature eq_Web-ISAPI-Filter {
    Ensure = "Present"
    Name = "Web-ISAPI-Filter"
    DependsOn = "[WindowsFeature]eq_Web-App-Dev"
    }

    WindowsFeature eq_Web-Net-Ext {
    Ensure = "Present"
    Name = "Web-Net-Ext"
    DependsOn = "[WindowsFeature]eq_Web-Filtering"
    }

    WindowsFeature eq_Web-Asp-Net {
    Ensure = "Present"
    Name = "Web-Asp-Net"
    DependsOn = @("[WindowsFeature]eq_Web-Filtering", "[WindowsFeature]eq_Web-Default-Doc", "[WindowsFeature]eq_Web-Net-Ext", "[WindowsFeature]eq_Web-ISAPI-Ext", "[WindowsFeature]eq_Web-ISAPI-Filter")
    }

    WindowsFeature eq_Web-Mgmt-Tools {
    Ensure = "Present"
    Name = "Web-Mgmt-Tools"
    DependsOn = "[WindowsFeature]eq_Web-Server"
    }

    WindowsFeature eq_Web-Mgmt-Console {
    Ensure = "Present"
    Name = "Web-Mgmt-Console"
    DependsOn = "[WindowsFeature]eq_Web-Mgmt-Tools"
    }

    WindowsFeature eq_Web-Mgmt-Compat {
    Ensure = "Present"
    Name = "Web-Mgmt-Compat"
    DependsOn = "[WindowsFeature]eq_Web-Mgmt-Tools"
    }

    WindowsFeature eq_Web-Metabase {
    Ensure = "Present"
    Name = "Web-Metabase"
    DependsOn = "[WindowsFeature]eq_Web-Mgmt-Compat"
    }

    WindowsFeature eq_Web-Lgcy-Mgmt-Console {
    Ensure = "Present"
    Name = "Web-Lgcy-Mgmt-Console"
    DependsOn = "[WindowsFeature]eq_Web-Mgmt-Compat"
    }

    File ServerBox {
    Ensure = "Present"
    Type = "Directory"
    Recurse = $true
    MatchSource = $true
    Force = $true
    Checksum = "SHA-256"
    SourcePath = "\\EQDEVOPS1\ServerBox"
    DestinationPath = "D:\ServerBox"
    }

    } #Web

    'DevInt' {

    File eq_DevInt {
    Ensure = "Present"
    Type = "Directory"
    Recurse = $true
    MatchSource = $true
    Force = $true
    Checksum = "SHA-256"
    SourcePath = "\\EQDEVOPS1\Sites\DevInt"
    DestinationPath = "D:\ServerBox\Sites\wwwroot"
    DependsOn = "[File]ServerBox"
    }

    } #DevInt

    'Alpha' {

    File eq_Alpha {
    Ensure = "Present"
    Type = "Directory"
    Recurse = $true
    MatchSource = $true
    Force = $true
    Checksum = "SHA-256"
    SourcePath = "\\EQDEVOPS1\Sites\Alpha"
    DestinationPath = "D:\ServerBox\Sites\wwwroot"
    DependsOn = "[File]ServerBox"
    }

    } #Alpha
    } #end switch
    } #Node
    } #Configuration

    EqConfig -ConfigurationData $ConfigurationData

    Function Get-ComputerGuid {
    param(
    [Parameter(Mandatory=$true)]
    [string]$ComputerName
    )
    process {
    ([guid]([adsisearcher]"(samaccountname=$ComputerName`$)").FindOne().Properties["objectguid"][0]).Guid
    }
    }

    $DSCPullFolder = "\\cadevops1\C`$\Program Files\WindowsPowerShell\DscService\Configuration"

    Get-ChildItem .\EqConfig\* -Filter *.mof | ForEach-Object {
    $guidMofFile = "$DSCPullFolder\$(Get-ComputerGuid $_.BaseName).mof"
    $newMof = copy $_.FullName $guidMofFile -PassThru -Force
    $newHash = (Get-FileHash $newMof).hash
    [System.IO.File]::WriteAllText("$newMof.checksum",$newHash)
    }

    Configuration EqLocalConfig {
    Node $AllNodes.NodeName {
    LocalConfigurationManager {
    AllowModuleOverwrite = 'True'
    ConfigurationID = $(Get-ComputerGuid $nodeName)
    ConfigurationModeFrequencyMins = 15
    ConfigurationMode = 'ApplyAndAutoCorrect'
    RebootNodeIfNeeded = 'True'
    RefreshMode = 'PULL'
    DownloadManagerName = 'WebDownloadManager'
    DownloadManagerCustomData = (@{ServerUrl = "http://eqdevops1:8080/psdscpullserver.svc"; AllowUnsecureConnection = 'True'})
    }
    }
    }

    EqLocalConfig -ConfigurationData $ConfigurationData

    Set-DscLocalConfigurationManager -Path .\EqLocalConfig -Verbose

  • #22713
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    So on the two clients, you're only using WindowsFeature and File resources? Nothing else?

  • #22716
    Profile photo of Rich Hopkins
    Rich Hopkins
    Participant

    Yes, for right now, I'll be working in xWebConfiguration stuff soon and hoping it all works on 2008 R2.

  • #22717
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Hmm... how many File and WindowsFeature resources are being applied to these servers? You had a "truncated" note in the code that you posted. Just wondering if it has to do with the volume of resources in the config, rather than a bug in a specific resource module.

  • #22718
    Profile photo of Rich Hopkins
    Rich Hopkins
    Participant

    I was just trying to cut down on the length of the post a bit, but went ahead and added everything in so you can see exactly what I'm doing.

  • #22719
    Profile photo of Rich Hopkins
    Rich Hopkins
    Participant

    I should say though that those two file resources have 37,018 Files and 5,397 Folders between them. Would that choke everything from reporting back? Looking in the event log I can see everything going well and ending in an "Consistency engine was run successfully." event.

  • #22720
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Unfortunately, there's no way for me to know that without getting an answer directly from Microsoft. The File resource is a bit unique in that it's implemented directly as a WMI class (possibly in native C or C++ code), rather than as a PowerShell script module or .NET assembly.

    That does, however, give you plenty of things to try. You could tweak your config and comment out the File resources, see what happens, then add them back in one at a time. If a large folder causes the error, try pointing it at a test folder with only one file, or directly at a file, that sort of thing.

    I'd also be curious to know what happens if you apply this same configuration to a Windows Server 2012 machine; does it get the same error?

  • #22724
    Profile photo of Rich Hopkins
    Rich Hopkins
    Participant

    Gunna have to build another 2012 R2 server to test on, unfortunately everything here is standardized on 2008 R2 still, but I'll give it a shot. Thanks for the help!

  • #22728
    Profile photo of Rich Hopkins
    Rich Hopkins
    Participant

    Its the number of files that is causing the problem. The SubItems property returns a list of every file in the directory structure. Gunna have to deploy them as Archive or maybe Chocolatey packages or something.

You must be logged in to reply to this topic.