DSC Pull Server Failure

I created a DSC Pull Server using the instructions in the e-book and everything went fine. I created a Configuration, and set a 2nd server to pull this configuration from the Pull server. It does not work. Here is what I have tried so far.

If I run Trace-xDSCOperation and specify one of the failure IDs (there are lots) this is output:
Configuration is sent from computer NULL by user sid S-1-5-18.
WebDownloadManager for configuration 0c6dfa3e-0b9c-4c91-8145-2363d7aa32af Do-DscAction command with server url: http://MYTARGETSERVER:8080/PSDSCPullServer.svc.
Attempting to get the action from pull server using Download Manager WebDownloadManager. Configuration Id is 0c6dfa3e-0b9c-4c91-8145-2363d7aa32af. Checksum is . Compliance status is false.
WebDownloadManager for configuration 0c6dfa3e-0b9c-4c91-8145-2363d7aa32af Do-DscAction command, GET Url: PSDSCPullServer.svc/Action(ConfigurationId=‘0c6dfa3e-0b9c-4c91-8145-2363d7aa32af’)/Get
Action.
This event indicates that failure happens when LCM is trying to get the configuration from pull server using download manager WebDownloadManager. ErrorId is 0x1. ErrorDetail is The attempt to
get the action from server http://MYTARGETSERVER:8080/PSDSCPullServer.svc/Action(ConfigurationId=‘0c6dfa3e-0b9c-4c91-8145-2363d7aa32af’)/GetAction returned unexpected response code Int
ernalServerError.
WebDownloadManager for configuration 0c6dfa3e-0b9c-4c91-8145-2363d7aa32af Do-DscAction command, GET call result: The attempt to get the action from server http://MYTARGETSERVER:8080/PSD
SCPullServer.svc/Action(ConfigurationId=‘0c6dfa3e-0b9c-4c91-8145-2363d7aa32af’)/GetAction returned unexpected response code InternalServerError…

If I browse to that address, both from my desktop and the pull server itself, I get a 'Server error in ‘/’ Application.

Following some advice from Don Jones and Steven Murawski I have also done run these commands on the Pull Server.

Test-xDSCResource -Name xDSCWebService
True

Get-DSCLocalConfigurationManager
AllowModuleOverwrite : False
CertificateID :
ConfigurationID :
ConfigurationMode : ApplyAndMonitor
ConfigurationModeFrequencyMins : 30
Credential :
DownloadManagerCustomData :
DownloadManagerName :
RebootNodeIfNeeded : False
RefreshFrequencyMins : 15
RefreshMode : PUSH
PSComputerName :

From the server that should be pulling the configuration:
Get-DSCLocalConfigurationManager
AllowModuleOverwrite : False
CertificateID :
ConfigurationID : 0c6dfa3e-0b9c-4c91-8145-2363d7aa32af
ConfigurationMode : ApplyOnly
ConfigurationModeFrequencyMins : 30
Credential :
DownloadManagerCustomData : {MSFT_KeyValuePair (key = “ServerUrl”), MSFT_KeyValuePair (key = “AllowUnsecureConnection”)}
DownloadManagerName : WebDownloadManager
RebootNodeIfNeeded : False
RefreshFrequencyMins : 15
RefreshMode : PUSH
PSComputerName :

I am pretty sure this says PUSH and not PULL because in trying to troubleshoot this I pushed a Configuration out to it just to make sure that would work.

What next?

Yeah, see how that’d never fit in a tweet? :slight_smile:

So the server that should be pulling is indeed configured for push, which is why it isn’t pulling. At least, presently. ConfigurationMode would usually be ApplyAndMonitor, I think. But you definitely need to set it back to pull.

You’ve ensured that the pull server’s Configuration folder contains s 0c6dfa3e-0b9c-4c91-8145-2363d7aa32af.mof and s 0c6dfa3e-0b9c-4c91-8145-2363d7aa32af.mof.checksum files? I ask because the checksum output in the above isn’t what I’d expect.

How did you go about setting up the pull server? Using the xPSDesiredStateConfiguration module? Was this on a “fresh” Windows Server 2012 R2 server, or a server that also does other work? Was IIS previously installed on the server and doing anything?

If the MOF and checksum files exist, then it may just be a failed installation for some reason. There’s a decent amount under the hood that isn’t as readily visible - make sure you’re enabling and looking in the Analytic and Debug logs, as well as the enabled-by-default Operational log. You do that from within Event Viewer.

You’ll need to reconfigure the LCM to use the Pull server again. Once you push to it, it’ll remain in PUSH mode.

What do you get when you go to http://MYTARGETSERVER:8080/PSDSCPullServer.svc in your browser?

If you get something like -

<service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xml:base="http://or-util02/PSDSCPullServer.svc/">
<workspace>
<atom:title>Default</atom:title>
<collection href="Action">
<collection href="Module"></workspace>
</service>

Then your pull server is set up correctly, proceed to the next questions…

Where are you staging the configuration to pull down? Do you have the checksum file for the configuration? Are you using custom resources? If so, are they zipped and labeled with the module name and version? Where are they staged for download?
Steve

It wasn’t my intention to try to fix it in tweets, it just kind of went off the rails :). This was a much better idea.

See the DSC17.jpg attached file, showing the .MOF and .MOF.CHECKSUM files in the Configuration folder on the DSC Pull Server.
I have also attached the Configuration I used to create the Pull Server.

The Pull Server is just Windows Server 2012, does it need to be R2? The only thing it’s every been used for is for me to mess around with PowerShell Web Administration. Nothing else. It’s currently not used for anything.

I am currently running through the Configure a DSC Pull Server steps (and the subsequent ones for getting a server to pull from it) and will post if that somehow fixes anything.

[quote=13710]You’ll need to reconfigure the LCM to use the Pull server again. Once you push to it, it’ll remain in PUSH mode.

What do you get when you go to http://MYTARGETSERVER:8080/PSDSCPullServer.svc in your browser?

If you get something like –

<service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xml:base="http://or-util02/PSDSCPullServer.svc/">
<workspace>
<atom:title>Default</atom:title>
<collection href="Action">
<collection href="Module"></workspace>
</service>

Then your pull server is set up correctly, proceed to the next questions…

Where are you staging the configuration to pull down? Do you have the checksum file for the configuration? Are you using custom resources? If so, are they zipped and labeled with the module name and version? Where are they staged for download?<br>
Steve
[/quote]

In my browser all I get is this:

Server Error in ‘/’ Application.

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a “web.config” configuration file located in the root directory of the current web application. This <customErrors> tag should then have its “mode” attribute set to “Off”.

<!-- Web.Config Configuration File –>

<configuration>
<system.web>
<customErrors mode=“Off”/>
</system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the “defaultRedirect” attribute of the application’s <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File –>

<configuration>
<system.web>
<customErrors mode=“RemoteOnly” defaultRedirect=“mycustompage.htm”/>
</system.web>
</configuration>

The configuration is stored in C:\Program Files\WindowsPowerShell\DscService\Configuration
I am not using any custom resources
I have the checksum file

If you are running Server 2012, I think some additional steps are required as the windows feature for the pull server is not there… I don’t know if the DSC resource for pull servers “knows” that. I’ve got to run out on some errands, but I can check that tonight.

My mission was to learn DSC. And it seems I am learning every little quirk and don’t do that in very short order.

Thanks Steven.

I upgraded the server to Server 2012 R2 and just ran through the steps of Configuring it as a DSC Pull server again. I also ran through the steps of making my other server pull its Configuration from the Pull server. Within 10 minutes it had pulled its Configuration, and configured its IP & DNS settings. Incredible stuff.

You may have just omitted installing WMF 4 on the server. Anything involved in DSC in any way must have PowerShell 4 installed and KB2883200 installed if needed.

I know WMF 4 was installed because when I first started learning about DSC and using this server it only had PS 3.0 installed, so I downloaded and installed the entire WMF 4. If installing a DSC pull server on just plain Server 2012 is something that needs to be tested or documented, I can easily build another 2012 server and attempt to turn it into a pull server again.

I ran into a similar issue, but it was due to me running the SetupDSC.ps1 script (http://bit.ly/1hjumbd), I was copying my .mof and checksum files to C:\Program Files\WindowsPowerShell\DscService\Configuration
instead of C:\ProgramData\PSDSCPullServer\Configuration. This script set the webroot of the Pull Service to C:\ProgramData\PSDSCPullServer\Configuration.
I take it the new xPSDesiredStateConfiguration resource will fix this.

Once I copied my files to C:\ProgramData\PSDSCPullServer\Configuration, and rerun the Pull everything worked as expected.

@Michael Thanks this helped with my error. webroot was in ProgramData. Once I added the missing resource I was ready to go.