New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSC Pull Server clients can not send status reports #2921

Open
J0F3 opened this Issue Dec 22, 2016 · 6 comments

Comments

Projects
None yet
6 participants
@J0F3

J0F3 commented Dec 22, 2016

Steps to reproduce

Setup DSC Pull Server as described on TechNet at https://msdn.microsoft.com/en-us/powershell/dsc/pullserver and register some clients with a registration key and configuration name to the DSC Pull Server. (LCM configured for ConfigurationRepositoryWeb and ReportServerWeb)

Expected behavior

DSC clients can send successfully status reports to the DSC Pull.

Actual behavior

Some clients can send successfully status reports and some clients fail to send the status reports with HTTP error 400 (Bad Request).
Error in DSC Event Log:

Job {B367DAD7-C84A-11E6-A952-001DD8B72236} : 
Http Client 2DC31996-C5C3-11E6-A952-001DD8B72236 failed for WebReportManager for configuration 
FullyQualifiedErrorId :ReportManagerSendStatusReportUnsuccessful
CategoryInfo:InvalidResult: (:) [], InvalidOperationException
ExceptionMessage:The attempt to send status report to the server https://dscpull.example.domain.com:8080/PSDSCPullServer.svc/Nodes(AgentId='2DC31996-C5C3-11E6-A952-001FD8B72236')/SendReport returned unexpected response code BadRequest.
, InnerException
.

In the Failed Request Tracing log file from IIS on the DSC Pull server contains the following error message:

The parameter "AdditinalData" in the request payload is not a valid parameter for the function import SendReport.

Environment data

Client (Server 2016):

Name                           Value
----                           -----
PSVersion                      5.1.14393.479
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.479
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

DSC Pull Server (Server 2012 R2)

Name                           Value
----                           -----
PSVersion                      5.0.10586.117
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.10586.117
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
@dgancho

This comment has been minimized.

dgancho commented Dec 27, 2016

Having exactly same issue on Windows 10 DSC nodes. Server 2012 R2 nodes send reports to Web Pull Server successfully.

Node (WIndows 10):

PSVersion                      5.1.14393.576                                   
PSEdition                      Desktop                                         
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                         
BuildVersion                   10.0.14393.576                                  
CLRVersion                     4.0.30319.42000                                 
WSManStackVersion              3.0                                             
PSRemotingProtocolVersion      2.3                                             
SerializationVersion           1.1.0.1

Web Pull Server (Server 2012 R2):

PSVersion                      5.0.10586.117                                   
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                         
BuildVersion                   10.0.10586.117                                  
CLRVersion                     4.0.30319.42000                                 
WSManStackVersion              3.0                                             
PSRemotingProtocolVersion      2.3                                             
SerializationVersion           1.1.0.1                                         

web.config:

...
<add key="dbprovider" value="System.Data.OleDb" />
<add key="dbconnectionstr" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\WindowsPowerShell\DscService\Devices.mdb;" />
...

Errors on Pull Server:

TimeCreated  : 12/27/2016 1:07:47 AM
ProviderName : Microsoft-Windows-ManagementOdataService
Id           : 2006
Message      : Web Service has got a callback from OData framework about an error. 
               Exception message = An error occurred while processing this request.
               Inner exception message = The parameter 'AdditionalData' in the request payload is not a valid parameter for the function import 'SendReport'.
               Response status code = 400
               Response content type = application/json;odata=minimalmetadata;charset=utf-8
               Response written = false
               Use verbose error = true

Errors on Nodes (Windows 10):

TimeCreated  : 12/26/2016 5:17:48 PM
ProviderName : Microsoft-Windows-DSC
Id           : 4131
Message      : Job DscTimerConsistencyOperationResult : 
               DSC Engine Error : 
               	 Error Message: NULL 
               	Error Code : 1 

TimeCreated  : 12/26/2016 5:17:48 PM
ProviderName : Microsoft-Windows-DSC
Id           : 4260
Message      : Job {4665B66F-CBD2-11E6-82AB-104A7D7F7235} : 
               Http Client E00409F7-B0FB-11E6-82A5-104A7D7F7235 failed for WebReportManager for configuration 
               FullyQualifiedErrorId :ReportManagerSendStatusReportUnsuccessful
                CategoryInfo:InvalidResult: (:) [], InvalidOperationException
                ExceptionMessage:The attempt to send status report to the server 
               http://wa1t3nnw-cap02:8080/PSDSCPullServer.svc/Nodes(AgentId='E00409F7-B0FB-11E6-82A5-104A7D7F7235')/SendReport returned unexpected response code 
               BadRequest.
               , InnerException
               .
@J0F3

This comment has been minimized.

J0F3 commented Jan 9, 2017

This seems to be a issue when the DSC Pullserver is running on WMF 5.0 and the clients are running on WMF 5.1 as in WMF 5.1 the additional parameter "AdditinalData" was introduced.

When the DSCPullserver is also running on WMF 5.1 the above error is gone. However the status reports does still not work correctly. The client can send successfully the report data but the DSC Pullserver seems to have issues to store the data in the database. Every time a client reports the w3wp.exe process of the DSCPullserver has a lot of exceptions.
“E0434F4D.System.NotImplementedException (“Complex type MSFT.PropertyBag is not supported.”)”
and
“E0434F4D.System.Collections.Generic.KeyNotFoundException (“The given key was not present in the directory”)”.

And then the reports of the clients are always empty. So the status reporting is still not working correctly in WMF 5.1!

ebekker added a commit to PowerShellOrg/tug that referenced this issue Jan 31, 2017

Adding some unfortunate kludges to accomodate Classic on WMF 5.0
* It appears on WMF 5.0, the Classic Pull Server behaves a bit
differently when submitting/retrieving reports, so we need to introduce
some flags and adjust the client tests to accomodate.
* See PowerShell/PowerShell#2921 for more
details about one of the differences
* Report date formats are another difference.
@chancein007

This comment has been minimized.

chancein007 commented Feb 14, 2017

Is there any solution for it?

@J0F3

This comment has been minimized.

J0F3 commented Feb 19, 2017

The only solution is to upgrade the DSC Pull Server to Server 2016 or to WMF 5.1 which is now RTM
But then you have to create a new datababse beacause otherwise the "AdditionalData" field is still missing in the database.
https://msdn.microsoft.com/en-us/powershell/wmf/5.1/install-configure

@LewisLebentz

This comment has been minimized.

LewisLebentz commented Apr 27, 2017

I'm using Azure Automation as my DSC pull server, and have a Windows Server 2016 that's getting this error message too.

@vvyas2

This comment has been minimized.

vvyas2 commented Apr 19, 2018

Same issue with Azure Automation as my DSC pull server and Windows Server 2012.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment