Failure to pull configuration v5

This topic contains 10 replies, has 3 voices, and was last updated by Profile photo of Nitin Gupta Nitin Gupta 7 months ago.

  • Author
    Posts
  • #38563
    Profile photo of chimel3
    chimel3
    Participant

    I've created a WMF5 Pull Server, and configured a node to use it. However, when I run Update-Configuration, I get 2 event viewer messages:
    The first is eventid 4104 with text saying "The attempt to get the action from server ..." "failed because pullserver is not available or there is no registered node with AgentID on the server".

    Followed by eventid 4252 with very similar text to the above.

    I'm pretty sure the Pull Server is available (I can connect to it using a browser), so I'm suspecting that the agent ID isn't registered correctly. How do I check this?

    I also have regular eventid 4252 messages showing up which only show the following:
    Job {}
    MIResult: 12
    Error message: NULL
    Message ID: NULL
    Error Category: 0
    Error Code: 0
    Error Type: NULL

    Not sure if these are connected, but when setting the LCM initially, it seemed to work but did return one error to the screen which was:
    "The specified Property does not exist.
    + CategoryInfo : MetadataError: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId: MI RESULT 12
    + PS ComputerName :

    Any help much appreciated.
    Thanks.

  • #38571
    Profile photo of Arie H
    Arie H
    Participant

    Can you browse to the pullserver from the node itself ? Do you see same results ?

    Can you post your pullserverbcreation script and the lcm scripts ?
    Either directly here, or via gist

  • #38585
    Profile photo of Nitin Gupta
    Nitin Gupta
    Participant

    Your node may not be properly registered with the Pull Server. Like Arie recommended can you collect logs from pull server and share using:
    Get-WinEvent -LogName
    "Microsoft-Windows-Powershell-DesiredStateConfiguration-PullServer/Operational"

    Get-WinEvent -LogName
    "Microsoft-Windows-ManagementOdataService/Operational"

    Have you put information about your node in RegistrationKeys.txt file? Check this blog http://blogs.msdn.com/b/powershell/archive/2015/05/29/how-to-register-a-node-with-a-dsc-pull-server.aspx for more information.

  • #38613
    Profile photo of chimel3
    chimel3
    Participant

    Hi,
    Thanks for the replies so far.

    Yes, I can successfully browse to the Pull Server from the node itself.
    I also tried configuring a second node – exactly the same behaviour so I have something wrong somewhere.

    The RegistrationKeys.txt file contains the single registration key I am using so far.

    Here is the script that was used to create the Pull Server:
    —————————————————–

    [CmdletBinding()]
    param
    (
        [string[]]$ComputerName = 'localhost'
    )
    
    configuration NewWMF5PullServer
    {
    
        Import-DSCResource -ModuleName xPSDesiredStateConfiguration -ModuleVersion 3.9.0.0
    
        Node $ComputerName
        {
            WindowsFeature DSCServiceFeature
            {
                Ensure = "Present"
                Name   = "DSC-Service"
            }
    
            File RegistrationKeyFile
            {
                Ensure          = 'Present'
                DestinationPath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\RegistrationKeys.txt"
                Contents        = '7184250f-616d-4e4d-bb7f-fe820ba91b2a'
                DependsOn       = @("[WindowsFeature]DSCServiceFeature")
            }
    
            xDscWebService PSDSCPullServer
            {
                Ensure                  = "Present"
                EndpointName            = "PSDSCPullServer"
                Port                    = 8080
                PhysicalPath            = "$env:SystemDrive\inetpub\PSDSCPullServer"
                CertificateThumbPrint   = "AllowUnencryptedTraffic"
                ModulePath              = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules"
                ConfigurationPath       = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration"
                RegistrationKeyPath     = "$env:PROGRAMFILES\WindowsPowerShell\DscService"
                State                   = "Started"
                DependsOn               = @("[WindowsFeature]DSCServiceFeature", "[File]RegistrationKeyFile")
            }
        }
    }
    
    # Create the MOF.
    
    NewWMF5PullServer
    

    —————————————————–

    Here's the script that configures the LCM on each target node:
    —————————————————–

    [DscLocalConfigurationManager()]
    Configuration WMF5TargetNodeLCM
    {
        Node 'localhost'
        {
            Settings
            {
                ConfigurationMode              = 'ApplyAndAutoCorrect'
                ConfigurationModeFrequencyMins = 45
                RefreshFrequencyMins           = 45
                RefreshMode                    = 'Pull'
                AllowModuleOverwrite           = $true
                RebootNodeIfNeeded             = $true
            }
    
            ConfigurationRepositoryWeb ConfigurationManager
            {
                ServerUrl                      = 'http://[FQDN of Pull Server]:8080/PSDSCPullServer.svc'
                RegistrationKey                = '7184250f-616d-4e4d-bb7f-fe820ba91b2a'
                ConfigurationNames             = @("WebRole")
                AllowUnsecureConnection        = $true
            }
        }
    }
    WMF5TargetNodeLCM
    Set-DSCLocalConfigurationManager -Path ./WMF5TargetNodeLCM –Verbose
    

    —————————————————–

    Pull Server Operational Logs below:

    ProviderName: Microsoft-Windows-Powershell-DesiredStateConfiguration-PullServer

    TimeCreated Id LevelDisplayName Message
    ———– — —————- ——-
    04/05/2016 11:51:13 4352 Information Configuration repository C:\Program Files\W...
    04/05/2016 11:51:13 4352 Information Configuration repository C:\Program Files\W...
    04/05/2016 11:51:13 4358 Information The Dsc agent with Agent Id 28FA6B8D-113B-1...
    04/05/2016 11:51:12 4361 Information GetAction payload from client. CheckSum = D...
    04/05/2016 11:51:12 4362 Information Client requested Operation = GetDscAction o...
    04/05/2016 11:51:12 4370 Information The client with raw URL /PSDSCPullServer.sv...
    04/05/2016 11:51:12 4373 Information The registration record with AgentId 28fa6b...
    04/05/2016 11:51:12 4356 Information RegistrationRecord payload from client. Age...
    04/05/2016 11:51:12 4372 Information The client with AgentID = 28fa6b8d-113b-11e...
    04/05/2016 11:51:11 4356 Information RegistrationRecord payload from client. Age...
    04/05/2016 11:51:11 4370 Information The client with raw URL /PSDSCPullServer.sv...
    04/05/2016 11:35:01 4352 Information Configuration repository C:\Program Files\W...
    04/05/2016 11:35:01 4352 Information Configuration repository C:\Program Files\W...
    04/05/2016 11:35:01 4358 Information The Dsc agent with Agent Id 28FA6B8D-113B-1...
    04/05/2016 11:35:01 4361 Information GetAction payload from client. CheckSum = D...
    04/05/2016 11:35:01 4362 Information Client requested Operation = GetDscAction o...
    04/05/2016 11:35:01 4370 Information The client with raw URL /PSDSCPullServer.sv...
    04/05/2016 11:35:00 4357 Information The registration record with AgentId 28fa6b...
    04/05/2016 11:35:00 4356 Information RegistrationRecord payload from client. Age...
    04/05/2016 11:34:58 4356 Information RegistrationRecord payload from client. Age...
    04/05/2016 11:34:58 4370 Information The client with raw URL /PSDSCPullServer.sv...

    OData operational logs below:

    ProviderName: Microsoft-Windows-ManagementOdataService

    TimeCreated Id LevelDisplayName Message
    ———– — —————- ——-
    05/05/2016 08:17:10 1102 Information Management Odata Service started successfully.
    05/05/2016 08:17:10 4002 Information Custom authorization module Microsoft.Power...
    05/05/2016 08:17:10 4012 Information Operation manager plugin 'Microsoft.Powersh...
    05/05/2016 08:17:10 1104 Information Data Service configuration loaded successfu...
    04/05/2016 12:41:06 1102 Information Management Odata Service started successfully.
    04/05/2016 12:41:06 4002 Information Custom authorization module Microsoft.Power...
    04/05/2016 12:41:06 4012 Information Operation manager plugin 'Microsoft.Powersh...
    04/05/2016 12:41:06 1104 Information Data Service configuration loaded successfu...
    04/05/2016 11:51:13 2006 Error Web Service has got a callback from OData f...
    04/05/2016 11:51:13 4021 Error Operation manager plugin method 'InvokeActi...
    04/05/2016 11:35:01 2006 Error Web Service has got a callback from OData f...
    04/05/2016 11:35:01 4021 Error Operation manager plugin method 'InvokeActi...
    04/05/2016 11:34:55 1102 Information Management Odata Service started successfully.
    04/05/2016 11:34:55 4002 Information Custom authorization module Microsoft.Power...
    04/05/2016 11:34:54 4012 Information Operation manager plugin 'Microsoft.Powersh...
    04/05/2016 11:34:53 1104 Information Data Service configuration loaded successfu...

    Note: this last log has highlighted that I was missing the checksum file. Corrected that, but no change in node behaviour.

  • #38615
    Profile photo of Arie H
    Arie H
    Participant

    I assume the ServerURL property in the LCM script is missing a server name as you omitted it due to security ?

    Your pull server and lcm scripts look ok, cant see an issue there.

    The logs don't show much as they are truncated, but The fact you used the lcm script on a second node and it acted the same, might suggest something outside dsc affecting it. Did you have IIS installed on the pullserver beforehand that had a website bound to 8080?

    Perhaps sharing the logs via gist would help see the truncated.

    Long shot might be to remove the AgentID on the noda via the registry, then Run the lcm script again to force it to re-register.

  • #38620
    Profile photo of chimel3
    chimel3
    Participant

    Yes, I used tag brackets in the Server URL when posting here but it removes anything it thinks is a tag. I've shown it slightly differently above now.

    The Pull Server was freshly built for this purpose, so it didn't have any roles or features preinstalled.

    I'll look to share the logs via gist instead.
    I'll also create a new server in the meantime to operate as a Pull Server to see if I get the same problems when doing this again.

  • #38622
    Profile photo of chimel3
    chimel3
    Participant

    Logs can be seen here:

  • #38624
    Profile photo of Arie H
    Arie H
    Participant

    Ok, this is much better.

    Here's the thing, you set the LCM to ApplyAndAutoCorrect.
    Your node registered successfuly with the AgentID, and then immediatly went to bring the checksum of WebRole to see if its different then what it has and based on that to continue.

    When you use ConnfigurationNames with a value, that WebRole.mof and WebRole.mof.checksum already have to be on the pull server.

    Obviously its not , so that's the error. Its not the registration phase.

    Try changing the LCM to ApplyAndMonitor, I dont think it immediately goes to look for the checksum file.

    Either way, you need a mof and checksum in the configuration folders on the lcm matching the value stated in ConfigurationNames.

  • #38672
    Profile photo of chimel3
    chimel3
    Participant

    Once the checksum and mof are both there, shouldn't the target nodes start to then pull the configuration?
    Currently they aren't.

  • #38673
    Profile photo of Arie H
    Arie H
    Participant

    The LCM will do a periodically check, based on the values you've set in ConfigurationModeFrequencyMins and RefreshFrequencyMins and pull if its see changes in the checksum

  • #38693
    Profile photo of Nitin Gupta
    Nitin Gupta
    Participant

    In your case it will check with the pull server every 45 minutes. You can set RefreshFrequencyMins to a minimum of 15 minutes.

You must be logged in to reply to this topic.