Why is my pull server not delivering modules, WMF5 PP

My Pull server seems to work pulling the configuration but no matter how I setup the modules they never get pulled over. If I place the right module on to the target machine the configuration does get applied. Why or how is this supposed to work?

Module is here:
$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules
xPSDesiredStateConfiguration_3.6.0.0.zip
xPSDesiredStateConfiguration_3.6.0.0.zip.checksum
Inside zip is folder w/version 3.6.0.0

When I execute the following API in web browser:
https://PullServer:8080/PSDSCPullServer.svc/Module(ConfigurationId=‘GUID’,
ModuleName=‘xPSDesiredStateConfiguration’,
ModuleVersion=‘3.6.0.0’)/ModuleContent

I get the “ModuleContent” “.zip” downloaded. So, it is like the LCM is not doing its job. Here is the LCM config:

ActionAfterReboot              : ContinueConfiguration
AgentId                        : 54772410-C122-11E5-8119-021123DC5DAB
AllowModuleOverWrite           : True
CertificateID                  : DDD009F3A6EEE0D37C0039B44A287DEF7FE49DBC
ConfigurationDownloadManagers  : {}
ConfigurationID                : c3f91da3-c252-465e-a62d-e21e812f1bfd
ConfigurationMode              : ApplyAndAutoCorrect
ConfigurationModeFrequencyMins : 15
Credential                     :
DebugMode                      : {ForceModuleImport}
DownloadManagerCustomData      : {MSFT_KeyValuePair (key = "ServerUrl"), MSFT_KeyValuePair (key =
                                 "AllowUnsecureConnection")}
DownloadManagerName            : WebDownloadManager
LCMCompatibleVersions          : {1.0, 2.0}
LCMState                       : Idle
LCMStateDetail                 :
LCMVersion                     : 2.0
StatusRetentionTimeInDays      : 10
PartialConfigurations          :
RebootNodeIfNeeded             : False
RefreshFrequencyMins           : 30
RefreshMode                    : Pull
ReportManagers                 : {}
ResourceModuleManagers         : {}
PSComputerName                 :

What am I missing?
Thanks Don, perhaps the added info makes things clearer.

That’s not where the pull server usually looks for modules, although it’s configurable. Where’d you configure it to store pull modules?

What does the .zip contain?
The files need to be in the root. So;

resource_version.zip contains:
\DSCResources
\Files
\Test
xPSDesiredStateConfiguration.psd1

Also; sure the checksum is still valid? And does the version the pulling client require match the version on the pull server?

I thought I should use the folder structure the way it was downloaded from PSGet.

I just tried this structure however the LCM does not seem to be downloading it.

ModuleContent
├───DSCResources
│   ├───MSFT_xArchive
│   │   └───en-us
│   ├───MSFT_xDSCWebService

└───Tests
    └───Integration

Should there be a log entry for the WebDownloader’s attempt to download?
Does the LCM cache items? If so, how do I completely reset?

Please point me to the current WMF5 document or example source that explains how to setup things that work.

So from the path you supplied, you’re using an IIS pull server. I see a checksum. All is right with the world but a silly question on this statement:

“Inside zip is folder w/version 3.6.0.0”

I’m assuming the module in the zip is just the basic folder structure and does not append any version number, correct? That version number should exist only on the zip filename and in the manifests. So if you were to doubleclick “cMyModule_1.0.zip” you should see a solitary folder “cMyModule”.

If you’re certain the format is correct, you can look at the DSC eventlog on the node. It’s actually pretty good at recording why it wont download a module because it can’t be found, checksum failure, etc. And yes, I’ve had brand-new modules get zipped up and I’ve had to generate the checksum twice because for a completely unknown reason the node claimed they didn’t match the first time. I know DSC is also very sensitive to the zip format being used, too. You can’t use just any old zipping tool.

Thanks Justin, your answer conflicts with Rolf’s answer in that he suggests the correct structure is: for example:
(ModuleContent) =

xDesiredStateConfiguration_3.6.0.0.zip /
| ├───DSCResources
│ ├───MSFT_xArchive
│ │ └───en-us
│ ├───MSFT_xDSCWe

I would like to think you are right with:

xDesiredStateConfiguration_3.6.0.0.zip / 
|    ├───3.6.0.0
│   │   └───DSCResources

The version folder contains all the version constituents.

or better still I think I should be able to compress the folder as it sits such that:

xDesiredStateConfiguration.zip
├───3.5.0.0
│   ├───DSCResources
└───3.6.0.0
    ├───DSCResources

should download properly.

As far as zipping tool, I am using MSFT send to compressed folder to get the zip.

You already declare the version in the .zip-file’s name.
The .zip should contain the module, not a folder containing the module.

This is my working set-up;

xSQLServer_1.4.0.0.zip
xSQLServer_1.4.0.0.zip.checksum

xSQLServer_1.4.0.0.zip contains;
DSCResources (folder)
en-US (folder)
Examples (folder)
appveyor.yml
LICENSE
README.md
xPDT.psm1
xPDT.xml
xSQLServer.psd1
xSQLServerHelper.psm1

Maybe this link will help:
https://www.penflip.com/powershellorg/the-dsc-book/blob/ac4a9c9ad4a8a54861020062afcbe7c111cd9740/deploying-resources-via-pull-servers.txt

There is also an interesting remark there:

Note that there are reports (see http://connect.microsoft.com/PowerShell/feedback/details/804230/lcm-fails-to-extract-module-zipped-with-system-io-compression-zipfile) of ZIP files not working with DSC if they were created by using the .NET Framework’s System.IO.Compression.ZipFile.CreateFromDirectory() method. Be aware.

I used 7-zip to compress the contents of a module-folder to module_version.zip

Thank you all for assisting me through this.
Rolf’s example of what the zip structure needs to be is spot on.
To be perfectly clear, you must compress the content of the version folder found within the Module folder appending the version no. to the module name with an underscore for example, module_version.zip.

Using 7-Zip did work but left me unsatisfied because it should be possible with MSFT compression.

So, how do you do that you ask?

  1. Open the module folder
  2. Open the version folder
    -NOTE to include all files including hidden files be sure show hidden files and folders is enabled.
  3. Select all contents and right-click use
    “Send to Compressed (Zip) Folder”
    A zip file will be created using the name of the
    first folder which was “DSCResources.zip” for me.
  4. Change that name to module_version.zip.
  5. Use PS command “New-DscCheckSum
    -path module_version.zip” to create
    “module_version.zip.checksum”
  6. Move these to the pull server’s module location.

This process cries out for a tool.
$env:PROGRAMFILES\WindowsPowerShell\Modules
contains many module folders and within there are multiple version folders.

Just another project, I guess…yeah!