[core] [windows] Fixes windows agent for windows server 2008 and earlier #2486
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
A client contacted us telling us that the agent had stopped working on Windows Server 2008. There were a few things obscuring what was going on, I won't go into detail about how I figured it out. But, after digging through their logs for a while, the root of it was the following error:
WindowsError: [Error -2146893795] Provider DLL failed to initialize correctly
.This is a known py2exe issue in Windows. Amazon had the same issue last year with their AWS cli not working on Windows Server 2008 and earlier, if it had been built on a later system.
What's happening is that py2exe is bundling all the necessary .dll's into the installer. However, in this case, the .dll is an Operating System .dll. It's not appropriate to bundle the OS specific .dll into the installer. It will cause an error that looks exactly like this.
Our error was propagating from the python random number generators, just like Amazon's. And, like Amazon's, excluding
crypt32.dll
from py2exe was sufficient to fix it.I have tested this on a Windows 2008 system. And, the client has also confirmed to me that an installer bundled with this specific change fixes their issues.
Open Questions