Quantcast
Channel: VMware Communities : All Content - vRealize Automation Tools
Viewing all articles
Browse latest Browse all 9859

vRO 8.1 scriptable task with PowerShell error: Function was stopped. Most likely because it hit an OOM (out of memory) condition.

$
0
0

Hi,

 

I just deployed the brand new vRO 8.1 appliance and did the initial configuration. The “validate configuration” shows only green checkmarks. I desperately wanted to try out the new PowerShell support for scriptable tasks and actions.

 

I created a simple workflow without any in- or outputs and just one scriptable task. The scriptable tasks is set to PowerCLI11 (PowerShell 6.2) runtime. I modified the auto-generated code and added one line “Get-Module –ListAvailable”.

 

Code:

 

function Handler($context, $inputs) {

    $inputsString = $inputs | ConvertTo-Json -Compress

 

    Write-Host "Inputs were $inputsString"

 

    Get-Module -ListAvailable

   

    $output=@{status = 'done'}

 

    return $output

}

 

When I run this the workflow fails with the following error:

 

2020-04-14 20:47:51.000 +02:00INFO__item_stack:/item1

2020-04-14 20:47:55.000 +02:00INFOInputs were {}

2020-04-14 20:47:57.000 +02:00ERROR/var/run/vco-polyglot/entrypoint.sh: line 9:     6 Killed                  pwsh -NoProfile -NonInteractive index.ps1 "$@"

2020-04-14 20:47:57.000 +02:00ERRORError in (Workflow:Test 1 / Scriptable task (item1)#12758) Wrapped ch.dunes.scripting.server.polyglot.PolyglotRunner$PolyglotRunnerException: Function was stopped. Most likely because it hit an OOM (out of memory) condition.

2020-04-14 20:47:57.000 +02:00ERRORWorkflow execution stack:

***

item: 'Test 1/item1', state: 'failed', business state: 'null', exception: 'Wrapped ch.dunes.scripting.server.polyglot.PolyglotRunner$PolyglotRunnerException: Function was stopped. Most likely because it hit an OOM (out of memory) condition. (Workflow:Test 1 / Scriptable task (item1)#12758)'

workflow: 'Test 1' (6ff6be6d-2741-4dc0-9552-6a9b6fab9e80)

|  'no inputs'

|  'no outputs'

|  'no attributes'

*** End of execution stack.

 

When I remove the Get-Module line, the workflow doesn't fail.

 

I tried to use the cmdlet Connect-VIServer but hit the above same error.

 

Is anyone out there experiencing the same issue or should I just open a SR with GSS?


Viewing all articles
Browse latest Browse all 9859

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>