Bit of a guess but I wonder if you are hitting a quota limit in the winrm configuration on your windows machine?
MaxMemoryPerShellMB looks the most likely - see https://msdn.microsoft.com/en-us/library/windows/desktop/ee309367(v=vs.85).aspx Unpatched Server 2008 R2 had a bug that mis-set the quotas which makes me think that might explain the difference - bug detailed here: https://social.technet.microsoft.com/Forums/windows/en-US/51810d3b-6236-44f8-99fd-10f004ad8002/winrm-quotas-setting-ignored-since-kb2506143?forum=w7itproinstall To debug.. you could try running with -vvvvvv to get full stdout/stderr from when the compile runs. Also check windows event logging for winrm / winrs to see if winrm is reporting any errors. If the quota size is the problem, I have read somewhere, -sorry can't find the link now - that you can't reconfigure winrm remotely so you might have to workaround changing the quota settings if that is in fact the problem. If it can't be done in the configure ansible for remoting script then might be possible by creating a scheduled task. Hope this helps, Jon On Monday, 15 February 2016 05:40:06 UTC, Slim Slam wrote: > > I'm using the Ansible "raw" module to compile a Java app on Windows Server > 2008 and 2012. Both have the Oracle 64-bit Java 8 JDK. Windows Server 2008 > has Powershell 3 and > Windows Server 2012 has Powershell 4. These servers are the stock Windows > AMIs running on AWS. > > On Windows Server 2012, it almost completes but always eventually bombs > out with: > > error occurred during error reporting (null), id 0xc0000005]", "", "#", > "# There is insufficient memory for the Java Runtime Environment to > continue.", "# Native memory allocation (malloc) failed to allocate 32744 > bytes for ChunkPool::allocate", > > This is on a machine with 15 gig of RAM with max RAM for the compilation > at 8gig. > Notably, the compilation always completes if I go to the machine's command > line and run it by hand (it only fails when Ansible runs it). > > On Windows Server 2008, it mysteriously fails every time: > > > > TASK [compile the app] ************************************************** > task path: /mycorp_CODE/ansible/building_scripts/build_win.yml:126 > <52.24.206.112> ESTABLISH WINRM CONNECTION FOR USER: Administrator on > PORT 5986 TO 52.24.28.18 > <52.24.206.112> WINRM CONNECT: transport=ssl endpoint=https:// > 52.24.28.18:5986/wsman > <52.24.206.112> EXEC .\activator dist > <52.24.206.112> WINRM OPEN SHELL: E6D0B5A6-99CD-47C7-845E-BF9B7DB72FB2 > <52.24.206.112> WINRM EXEC 'PowerShell' ['-NoProfile', '-NonInteractive', > '-ExecutionPolicy', 'Unrestricted', '-EncodedCommand', > 'YwBoAGQAaQByACAAQwA6AFwAYwBhAHAAcwBlAAdQB3AG0AYQBwAHAAZQByAF8AcgBlAHAAbwBcAFUATABUAFIAQQBXAFAIAAuAFwAYQBjAHQAAHIALgBiAGEAdAaQBzAHQA' > ] > <52.24.206.112> WINRM RESULT u'<Response code 0, out "", err "">' > <52.24.206.112> WINRM STDOUT > <52.24.206.112> WINRM STDERR > <52.24.206.112> WINRM CLOSE SHELL: E6D0B5A6-99CD-47C7-845E-BF9B7DB72FB2 > ok: [52.24.28.18] => {"changed": false, "invocation": {"module_args": { > "_raw_params": ".\\activator dist"}, "module_name": "raw"}, "rc": 0, > "stderr": "", "stdout": "", "stdout_lines": []} > > But again, if I go to the Windows command line, I can run it by hand > successfully every time. > > Any ideas? > > J > -- 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/fff9cb8c-6848-4b3a-b4f2-04b3468354c1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
