Powershell DSC Pull Server throws internal error - Microsoft.Isam.Esent.Interop not found

纵饮孤独 提交于 2019-12-07 22:28:12

问题


I've followed the instructions found in Powershell.org's DSC Book to set up an http Pull Server (Windows 2012 server) to use with DSC. I set up the http Pull Server, then crafted a configuration to be pulled, then set up my node's LCM to pull and run the configuration.

I can see a Scheduled task on the node under Task Scheduler/Microsoft/Windows/Desired State Configuration, so I know at least something worked. However, my configuration is not being run. When I look at the Event Logs under Apps&Svcs/Microsoft/Windows/Desired State Configuration/Operational Log, I see the following event:

Job {E0B6977A-E34F-4EDD-8455-E555063CD3DD} : 
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://pullserver.local:8080/PSDSCPullServer/Action(ConfigurationId='adaba4f6-b2b6-420d-a1dd-3714106451d6')/GetAction returned unexpected response code InternalServerError.

When I manually hit that URL, after enabling CustomErrors, here is the error:

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Isam.Esent.Interop, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

I tried googling for this error (no luck) and I can't find helpful information on this DLL. It looks like it's supposed to come with some parts of Windows, but I don't see it on my system. I'm reluctant to download it from one of those "DLL Downloader" sites.

Any ideas why the DSC Pull Server seems to require this DLL and I don't have it?


回答1:


It seems that the PSDSCPullServer resource out of xPSDesiredStateConfiguration defaults to using Esent as a database provider, which only works with Windows 8.1 (not Server 2012). I found some documentation here with some code I could copy. I just had to edit the web.config for my pull server and change this:

<add key="dbprovider" value="ESENT" />
<add key="dbconnectionstr" value="C:\Program Files\WindowsPowerShell\DscService\Devices.edb" />

with this:

<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;"/>

The fact that the original configuration tried to point to a Devices.edb (which did not exist on my system, .mdb did) is further evidence that something funky was going on.




回答2:


What method have you used? The xPSDesiredConfiguration module from the resource kit or manual steps? I have not gone through the DSC book myself. So, I wouldn't know what they are recommending.

The Microsoft.Isam.Esent.Interop assembly is the ESE database provider. However, you need to use this provider only for Blue OS (Windows 8.1). Which OS are you using for the Pull Server? For all supported OS other than the Blue OS, you are supposed to use the Jet provider for the devices.mdb.



来源:https://stackoverflow.com/questions/24252635/powershell-dsc-pull-server-throws-internal-error-microsoft-isam-esent-interop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!