Ansible Tower: error running Apache Ant.exe command

246 views
Skip to first unread message

JeffElep

unread,
Jun 3, 2016, 10:58:50 AM6/3/16
to Ansible Project
we are currently running Ansible Tower 2.1

target is Windows Server 2012 with SP2 \ running WinRM 3.0

in a playbook i have the following task

    - name: string text togeter
      raw: cmd /c ant -buildfile deploy.xml stop-srvc1

i also tried:

    - name: string text togeter
      raw: ant -buildfile deploy.xml stop-srvc1

Initially, the ant command was included in a PowerShell script and my playbook tasks looked like:

    - name: string text togeter
      script: files/scripts/antScript.ps1

each run, we encountered the following error:
 Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
with stderr:
  Error occurred during initialization of VM
  Unable to allocate 32768KB bitmaps for parallel garbage collection for the requested 1048576KB heap.

I have increased the value for WinRM's MaxMemoryPerShellMB to 2048, which produced the same error. I later found that this property is being ignored by WinRM.

note: when "ant -buildfile deploy.xml stop-srvc1" is run locally at the Windows server, it is completed successfully.

please let me know if there is anything we can do at the Ansible side to reduce the amount of details being pushed to the target server along with the payload.

thanks

Matt Davis

unread,
Jun 3, 2016, 11:49:01 AM6/3/16
to Ansible Project

JeffElep

unread,
Jun 3, 2016, 1:40:29 PM6/3/16
to Ansible Project
Thanks Matt,

i looked at the KB article and the download files available. They did not have a hotfix specific to Windows 2012 Server  :(

cheers!

Matt Davis

unread,
Jun 4, 2016, 1:13:54 AM6/4/16
to Ansible Project
It's the same hotfix for Windows 8 and Server 2012 (it's in the fine print).

Bessie

unread,
Jun 6, 2016, 8:54:38 AM6/6/16
to Ansible Project
Hi Jeff, Matt,

I am experiencing a similiar issue trying to execute a jvm based command with cmd over winrm using Ansible. Tried to apply the hotfix for Windows 8 on my Windows 2012 Server, but the hotfix simply said it is not applicable, so still no fix.

Any feedback would be appreciated.

JeffElep

unread,
Jun 13, 2016, 9:06:29 AM6/13/16
to Ansible Project
Hi Matt,

I opened a ticket with Micorosoft, tech sent me a specific KB2842230 bundle, from which i manually installed update-bf.mum (included in the .cab file) usign dism.exe.

Reply all
Reply to author
Forward
0 new messages