Hmm, at a glance it looks like maybe there's a problem in the error handler 
where it's expecting an ErrorRecord to always be present, but in this case 
it's not. If that's what's happening, it's masking whatever the real error 
is because it's blowing up in the error handler. Can you file that output 
in a Github issue against https://github.com/ansible/ansible? 

Thanks,

-Matt


On Wednesday, June 12, 2019 at 9:23:05 AM UTC-7, William Dossett wrote:
>
> I increased memory to the VM and now getting the original error on 
> win_ping using domain acccount (sorry about the first post, just found the 
> code button)
>
>  ansible -i winhosts win-update-prod -m win_ping -vvv
> ansible 2.8.0
>   config file = /etc/ansible/ansible.cfg
>   configured module search path = 
> [u'/home/bi003do/.ansible/plugins/modules', 
> u'/usr/share/ansible/plugins/modules']
>   ansible python module location = /usr/lib/python2.7/site-packages/ansible
>   executable location = /usr/bin/ansible
>   python version = 2.7.5 (default, Apr  9 2019, 14:30:50) [GCC 4.8.5 
> 20150623 (Red Hat 4.8.5-36)]
> Using /etc/ansible/ansible.cfg as config file
> host_list declined parsing /home/domainuser/Playbooks/WinUpdate/winhosts 
> as it did not pass it's verify_file() method
> script declined parsing /home/domainuser/Playbooks/WinUpdate/winhosts as 
> it did not pass it's verify_file() method
> auto declined parsing /home/domainuser/Playbooks/WinUpdate/winhosts as it 
> did not pass it's verify_file() method
> [DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set 
> to allow bad characters in group names by
> default, this will change, but still be user configurable on deprecation. 
> This feature will be removed in version 2.10.
>  Deprecation warnings can be disabled by setting 
> deprecation_warnings=False in ansible.cfg.
>  [WARNING]: Invalid characters were found in group names but not replaced, 
> use -vvvv to see details
>
> Parsed /home/domainuser/Playbooks/WinUpdate/winhosts inventory source with 
> ini plugin
> META: ran handlers
> Using module file 
> /usr/lib/python2.7/site-packages/ansible/modules/windows/win_ping.ps1
> Pipelining is enabled.
> <covmgrid83> ESTABLISH WINRM CONNECTION FOR USER: 
> [email protected] on PORT 5986 TO covmgrid83
> EXEC (via pipeline wrapper)
> The full traceback is:
> Property 'ErrorRecord' cannot be found on this object. Make sure that it 
> exists.
> At line:61 char:5
> +     Write-AnsibleError -Message "Unhandled exception while executing 
> module" `
> +    
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     + CategoryInfo          : NotSpecified: (:) [], 
> PropertyNotFoundException
>     + FullyQualifiedErrorId : PropertyNotFoundStrict
>
> ScriptStackTrace:
> at <ScriptBlock>, <No file>: line 61
> at <ScriptBlock>, <No file>: line 26
> at <ScriptBlock><End>, <No file>: line 137
> at <ScriptBlock>, <No file>: line 7
>
> System.Management.Automation.PropertyNotFoundException: Property 
> 'ErrorRecord' cannot be found on this object. Make sure                    
>               that it exists.
>    at 
> System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext
>  
> funcContext, Exception exc                                 eption)
>    at 
> System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame
>  
> frame)
>    at 
> System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
>  
> frame)
>    at 
> System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
>  
> frame)
> covmgrid83 | FAILED! => {
>     "changed": false,
>     "msg": "Failed to invoke PowerShell module: Property 'ErrorRecord' 
> cannot be found on this object. Make sure that it                          
>         exists."
> }
>
>
>
>
> On Wednesday, June 12, 2019 at 11:00:38 AM UTC-4, William Dossett wrote:
>>
>> Hi,
>> (sorry, this turned out rather long)
>>
>> I had windows updates running using an ansible playbook.
>>
>> I was using domain account, become, runas etc all working pretty well for 
>> the last 9 months...
>>
>> Then I upgraded ansible running on my centos 7.5 system to version 2.8 as 
>> I was working on the same system but was going to write a playbook to add a 
>> user account to aws instances...  
>>
>> someone that used this same system and a playbook I wrote to run windows 
>> updates on their windows VMs then told me his playbook stopped working
>>
>> I looked at it and it seemed there might have been kerberos problems, or 
>> domain membership problems - I wasn't getting anywhere so..
>>
>> I build a new ansible control server, joined to domain, setup 
>> pywinrm[kerberos] and more or less have a pristine system now with ansible 
>> 2.8, but I have the same problem, so it seems as though it is the uprgrade 
>> to 2.8 maybe that has caused this.
>>
>> basically, I run the playbook, it connects and gets to:
>>
>> TASK [Install Updates] 
>> ****************************************************************************************************************
>> task path: /home/bi003do/Playbooks/WinUpdate/win-update-prod.yml:12
>> win_updates: running win_updates module
>> Using module file 
>> /usr/lib/python2.7/site-packages/ansible/modules/windows/win_updates.ps1
>> Pipelining is enabled.
>> <covmgrid83> ESTABLISH WINRM CONNECTION FOR USER: 
>> [email protected] on PORT 5986 TO covmgrid83
>> EXEC (via pipeline wrapper)
>>
>> and thats as far as it gets...   on the VM itself I can see processes 
>> running under the mydomainuser ID in task manager, so I know it is 
>> connecting correctly, I have googled on this and found some info, but 
>> nothing that has helped yet...  Unfortunately, the user that runs my 
>> playbook to update templates has a limited window each month to get this 
>> done before they start a long process that last several weeks and we can't 
>> run updates and if we don't the security team gets hot and bothered.
>> The window is quickly closing for this month and I am at a loss.  How can 
>> I troubleshoot this futher.
>>
>> Also I was able to do a win_ping on this server, but only using a local 
>> domain account, when I tried it with a domain account, it actually crashed 
>> - it goes by the sticking line above and I get this
>>
>> EXEC (via pipeline wrapper)
>> The full traceback is:
>> Exception of type 'System.OutOfMemoryException' was thrown.
>> At line:13 char:1
>> + $module = [Ansible.Basic.AnsibleModule]::Create($args, $spec)
>> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>     + CategoryInfo          : OperationStopped: (:) [], 
>> OutOfMemoryException
>>     + FullyQualifiedErrorId : System.OutOfMemoryException
>>
>> ScriptStackTrace:
>> at <ScriptBlock>, <No file>: line 13
>>
>> System.OutOfMemoryException: Exception of type 
>> 'System.OutOfMemoryException' was thrown.
>>    at 
>> System.Runtime.CompilerServices.RuntimeHelpers._CompileMethod(IRuntimeMethodInfo
>>  
>> method)
>>    at System.Reflection.Emit.DynamicMethod.CreateDelegate(Type 
>> delegateType, Object target)
>>    at 
>> System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression 
>> lambda, DebugInfoGenerator debugInfoGenerator)
>>    at System.Linq.Expressions.Expression`1.Compile()
>>    at 
>> System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, 
>> Object[] args)
>>    at 
>> System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite 
>> site, T0 arg0, T1 arg1, T2 arg2)
>>    at 
>> System.Management.Automation.Interpreter.DynamicInstruction`4.Run(InterpretedFrame
>>  
>> frame)
>>    at 
>> System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
>>  
>> frame)
>> covmgrid83 | FAILED! => {
>>     "changed": false,
>>     "msg": "Unhandled exception while executing module: Exception of type 
>> 'System.OutOfMemoryException' was thrown."
>>
>> actually, this is now saying out of memory, which was different than 
>> before... is that really a memory errror?
>>
>> Well, any advice on what I should be checking next would be appreciated.
>>
>> Thanks
>> Bill
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e49b80fd-98f7-4e3d-a24b-cdf5c76fc554%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to