Issue invoking SC 2012 Orchestrator SP1 runbooks using System Center Orchestrator Web Service PowerShell

Mar 20, 2013 at 9:43 AM
Hello,
I'm tryng to invoke remotely SC Orchestrator (SCOrch) runbooks using System Center Orchestrator Web Service PowerShell module.

Actually I'm experiencing some random issue when I invoke more runbooks at the same time.

When there is an error, i recevive this message:

"__You cannot call a method on a null-valued expression.
At C:\Integrations\MSorchestrator_script\OrchestratorServiceModule.psm1:1226 char:24
  • $response.Close <<<< ()
    • CategoryInfo : InvalidOperation: (Close:String) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull
Cannot convert value "System.Object[]" to type "System.Xml.XmlDocument". Error: "Data at the root level is invalid. Lin
e 1, position 1."
At C:\Integrations\MSorchestrator_script\OrchestratorServiceModule.psm1:206 char:18
  • [xml] $xmlDoc <<<< = sendHttpGetRequest -Url $Url -credentials $Credentials
    • CategoryInfo : MetadataError: (:) [], ArgumentTransformationMetadataException
    • FullyQualifiedErrorId : RuntimeException
getEntryNodes : Cannot bind argument to parameter 'XmlDoc' because it is null.
At C:\Integrations\MSorchestrator_script\OrchestratorServiceModule.psm1:217 char:34
  • $jobnodes = getEntryNodes <<<< $xmlDoc
    • CategoryInfo : InvalidData: (:) [getEntryNodes], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,getEntryNodes
getJobObject : Cannot bind argument to parameter 'JobNode' because it is null.
At C:\Integrations\MSorchestrator_script\OrchestratorServiceModule.psm1:224 char:47
  • $jobarray += getJobObject -JobNode <<<< $jobnode
    • CategoryInfo : InvalidData: (:) [getJobObject], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,getJobObject
Get-OrchestratorRunbookInstance : Cannot bind argument to parameter 'Job' because it is null.
At C:\Integrations\Windows_script\testSCOrchCreateSC.ps1:113 char:51
  • $instance = Get-OrchestratorRunbookInstance -job <<<< $job -credentials $creds
    • CategoryInfo : InvalidData: (:) [Get-OrchestratorRunbookInstance], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-OrchestratorRunbookInstance
Instance Status =
Get-OrchestratorRunbookInstanceParameter : Cannot bind argument to parameter 'RunbookInstance' because it is null.

At C:\Integrations\Windows_script\testSCOrchCreateSC.ps1:159 char:75
  • $instparams = Get-OrchestratorRunbookInstanceParameter -RunbookInstance <<<< $instance -Credentials $cre
    ds
    • CategoryInfo : InvalidData: (:) [Get-OrchestratorRunbookInstanceParameter], ParameterBindingValidationE
      xception
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-OrchestratorRunbookInstanceParameter__
      ``
If I send a single execution everything is right.

Note: when I invoke more runbooks at the same time opening more powershell console, it's true that in some console I receive that error but SCOrch has received them and it put them in its queue and execute them when it is their time.

Any ideas ?

Thanks in advance

Giovanni
Mar 22, 2013 at 10:02 AM
The root cause has been identified checking Microsoft KB: http://support.microsoft.com/kb/2738490 .

"You may experience one of the following problems while using the System Center Orchestrator Orchestration Console or when accessing System Center Orchestrator data using the Web Service:
  1. New Runbooks and/or Folders that have been created using the Runbook Designer are not displayed even though the user has the appropriate permissions to see them.
  2. Summary pages have incorrect results for all statistics."
System Center SP1 should have fixed this issue but it did not resolved it.

Giovanni