1
votes

I'm playing around DSC to manage 2 nodes, I've been able to setup my pull-server but the problem now is pushing/pulling configuration from the pull-server which is not working.

I tried troubleshooting the issue and I could see the error in the response of the GetAction request but I don't know what it means.

http://server1:8080/PSDSCPullServer.svc/Action(ConfigurationId='8394f90e-0525-4d0d-aa75-653b64981fc4')/GetAction

{
  "odata.error": {
    "code": "",
    "message": {
      "lang": "en-US",
      "value": "nodeComplianceStatus or mofChecksum not found for MSFT.PSDSCAction."
    },
    "innererror": {
      "message": "nodeComplianceStatus or mofChecksum not found for MSFT.PSDSCAction.",
      "type": "System.ArgumentException",
      "stacktrace": ""
    },
    "MODATA.Exception.ErrorRecord": {
      "odata.type": "MODATA.Exception.DataServiceException",
      "ErrorCode": "",
      "MessageLanguage": "en-US",
      "StatusCode": 400,
      "Message": "nodeComplianceStatus or mofChecksum not found for MSFT.PSDSCAction.",
      "Data": [],
      "InnerException": {
        "Message": "nodeComplianceStatus or mofChecksum not found for MSFT.PSDSCAction.",
        "Data": [],
        "InnerException": null,
        "TargetSite": null,
        "StackTrace": null,
        "HelpLink": null,
        "Source": null,
        "HResult": -2147024809
      },
      "TargetSite": null,
      "StackTrace": "   at Microsoft.Management.Odata.Core.OperationManagerAdapter.InvokeMethod(IInvoker invoker, String functionName, String resourceTypeName, Boolean ignoreNotImplementedException)\r\n   at Microsoft.Management.Odata.Core.OperationManagerAdapter.InvokeOperationManagerFunction[T](Func`1 func, String functionName, String resourceTypeName, Boolean ignoreNotImplementedException, T defaultResultForNotImplementedException)\r\n   at Microsoft.Management.Odata.Core.OperationManagerAdapter.InvokeAction(ResourceType resourceType, IEnumerable`1 resourceKeys, String actionName, IEnumerable`1 inputParameters, ResourceType returnType)\r\n   at Microsoft.Management.Odata.Core.DataServiceInvokable.InvokeActionOnAst(RequestAstNode root)\r\n   at Microsoft.Management.Odata.Core.DataServiceInvokable.Invoke()\r\n   at Microsoft.Management.Odata.Core.DataServiceUpdateProvider.SaveChanges()\r\n   at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description)\r\n   at System.Data.Services.DataService`1.HandleRequest()",
      "HelpLink": null,
      "Source": "Microsoft.Management.OData",
      "HResult": -2146233079
    }
  }
}

Any idea what's wrong ?

3

3 Answers

0
votes

When you put a configuration on a pull server you must include a checksum file generated from the configuration. You can generate this with the New-DscChecksum cmdlet.

0
votes

From the error it appears that the call is not reaching DSC pull service end point and is being rejected by OData service as something is missing from the body of the request. You can try the request using Invoke-WebRequest to troubleshoot.

$bodyArgs = @{Checksum="somechecksum"; ChecksumAlgorithm="SHA 256";NodeCompliant="false"} 
$jsonBodyArgs = $bodyArgs|ConvertTo-Json

Invoke-WebRequest -Uri "http://server1:8080/PSDSCPullServer.svc/Action(ConfigurationId='8394f90e-0525-4d0d-aa75-653b64981fc4')/GetAction"
-UseBasicParsing -Method Post -Body $jsonBodyArgs -Headers @{Accept="application/json"} -ContentType "application/json;odata=minimalmetadata;charset=utf-8"

Pull server logs would contain information about the failures reported to the node. Logs can be obtained using:

Get-WinEvent -LogName
"Microsoft-Windows-Powershell-DesiredStateConfiguration-PullServer/Operational"

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

These logs generally contain sufficient information to troubleshoot the underlying issue.

0
votes

Try to check if your pullserver actually points towards proram files\windowspowershell and not program files(x86)\windowspowershell. That could be the issue. DSC Error messaging is not always very helpful.
Look at your pullservers webconfig file to see where the pullserver tries to pull its configurations for the clients.