-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
winrm_https_listener_parent_path command causes failure #10878
Comments
Could you provide more information on your version of Windows and PowerShell? Are you connecting to Windows over HTTPS or just HTTP? |
Remote host is running Windows 2008 Server R2 Enterprise, SP1, Powershell 3 & Ansible prep were run on this host. Connection is using local account, and connection is over HTTPS. If I comment out that Powershell command the fact collection is successful:
|
Does the user you are connecting as have Administrator permissions, or is it a member of the (see https://msdn.microsoft.com/en-us/library/aa384295(v=vs.85).aspx ) If not I think this is likely to fail (I just tried locally on a windows 7 box and found I had to be running as Administrator to get just this part of the command to run): get-childitem -Path WSMan:\localhost\ Could you try this out with and without the group membership? If it fixes it then I think I need to |
No luck @jhawkesworth . I tried with the account as a member of both Administrators and WinRMRemoteWMIUsers__ and each group individually. When I tried WinRMRemoteWMIUsers__ only, the connection failed. |
Ok let's try a few other ideas. First, is the windows box fully up to date with windows updates? I had trouble with a fresh Windows Server 2008 install which were fixed by http://support.microsoft.com/kb/2842230. My guess about the exception is that there's something unexpected about the winrm configuration itself. Can you run Get-PSProvider in powershell on the affected machine and see if WSMan is listed? Also, can you share the machine's winrm configuration (from memory this command will display)? winrm get winrm/config |
I confirmed that the host is up-to date on Windows updates, here is the output you requested:
|
I stopped running the command in verbose mode "-vvvv" and started seeing out of memory errors. Adjusting MaxMemoryPerShellMB didn't help. Applying the hotfix mentioned here and in #8345 (comment) worked however, http://support.microsoft.com/kb/2842230 @jhawkesworth thanks for the tip. |
Ah glad it's working. Was about to try and spin up a 2008 machine to try On Fri, May 1, 2015 at 8:00 PM, Nathan Gourley notifications@github.com
|
Hopefully this should reduce bug reports like ansible#10878 and ansible#10825
The running of this PS command:
https://github.com/ansible/ansible-modules-core/blob/devel/windows/setup.ps1#L72
causes error on JSON conversion:
https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/powershell.ps1#L68
Its a bit confusing since it doesn't appear that $winrm_https_listener_parent_path is used for anything but getting a substring and in fact, the error persists if you run the command and do not assign the output to a variable leaving $winrm_https_listener_parent_path undefined.
The text was updated successfully, but these errors were encountered: