binkleys
Contributor
Contributor

Getting this error: "java.io.IOException: error=12, Cannot allocate memory"

Jump to solution

I have been trying to run a simple workflow in vCenter Orchestrator(VCO) that accesses the command prompt using this script:

     var myCommand = new Command("ls");
     myCommand.execute(true);
     System.log(myCommand.result);

We are using VCO vApp and we keep getting this error:

"Wrapped java.io.IOException: Cannot run program "ls": java.io.IOException: error=12, Cannot allocate memory (Workflow:Test2 / Scriptabletask (item0)#1)"

Any suggestions? This script is copied and pasted straight from the VCO manuals, hence our confusion.

0 Kudos
1 Solution

Accepted Solutions
cdecanini_
VMware Employee
VMware Employee

Have you tried to increase the memory of the VM ?

I guess you must already have tried to restart the VM without increasing memory, right ?

Christophe.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter

View solution in original post

0 Kudos
6 Replies
cdecanini_
VMware Employee
VMware Employee

Your code is not the problem, it runs perfectly fine here once local execution has been enabled (com.vmware.js.allow-local-process=true).

On what OS are you running vCO and what version of vCO is this ?

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
0 Kudos
dimitrovg
VMware Employee
VMware Employee

Can you tell me if you are using a vCO appliace? And the vCO version used?

I guess this is Linux. Please send the output of commands

  free

  top -n 1 -b -c

from the command prompt.

The error you see is maybe connected to not enough  free memory in the OS. If this is virtual machine then you may try to  increase the memory of the VM. Otherwise try to stop some programs to free some mem.

binkleys
Contributor
Contributor

I am running VCO vApp 4.2.1(which is the Appliance) and that runs on Linux. We did set permissions (com.vmware.js.allow-local-process=true).

0 Kudos
binkleys
Contributor
Contributor

Attatched screenshots are the results of the commands you said to run.

0 Kudos
cdecanini_
VMware Employee
VMware Employee

Have you tried to increase the memory of the VM ?

I guess you must already have tried to restart the VM without increasing memory, right ?

Christophe.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter

View solution in original post

0 Kudos
binkleys
Contributor
Contributor

Thank you very much. We increased memory allocation and everything worked.

0 Kudos