A little background on the issue.
We have (4) pools of 70+ web servers running IIS 8.5 and Windows 2012 R2. Each of these servers should be configured identical which I thought was a perfect use case for DSC.
I wrote a custom PowerShell to provision the VM’s in VMWare using VSC/PowerCLI from a standardized template containing minimal pre-installed software.
I run the script to provision the machines and everything works perfectly in the cloning process. During bootup, these machines execute a startup script that enable remote powershell among some other very basic functions specific to our environment.
Once the machines are alive, I connect to each VM via RemotePS and execute (1) script and (1) function.
- Script – (gist link below) is the script used to generate the meta.mof file for the local LCM to connect to the pull server stored in the d:\scripts\dsc folder
- Function – Set-DscLocalConfigurationManager -path d:\scripts\dsc -computername {hidden} – to apply the meta.mof file to the machine.
Some of these machines initiate their consistency check and finish properly in the desired state while others do not and fail the consistency check, and when I look in the event logs under DesiredStateConfiguration for the VM’s that show consistency failure, I get error messages such as I show below.
If you notice in the error the URL has an extra slash in it (///). When I cut and paste that URL as is, it fails. If I remove a single slash (//) as you see below, the URL at least connects to the pull server and returns something (although I am not sure exactly what it is supposed to return).
The weird thing is, if this were the issue would it not have the same impact on ALL servers? I am new to DSC so please help.
Gist Link (LCM Config File)
Gist File (XML Output from Pull Server Once I remove extra slash)
Error Message from Event Log
Job {BC2B7A68-2C34-11E6-8102-005056A87D2F} :
This event indicates that failure happens when LCM is trying to get the configuration from pull server using download manager NULL. ErrorId is 0x1. ErrorDetail is Cannot find configuration https://lv-dsc-pull.domain.com:8080///PSDSCPullServer.svc/Nodes(AgentId=‘B52CF336-2C34-11E6-8102-005056A87D2F’)/Configurations(ConfigurationName=‘LV-WEB-D’)/ConfigurationContent on the server.