Notifications

65 views

Issue

Symptoms

The Azure Subscription Discovery fails with below error.

Error while executing translator script : List_Subscriptions_Response_Processor
Failed to process the payload for translator List_Subscriptions_Response_Processor.Azure Datacenter: com.snc.cloud.mgmt.modules.svccatalog.orchestration.BPOException:
Failed to process the payload for translator List_Subscriptions_Response_Processor: com.snc.cloud.mgmt.modules.svccatalog.service.impl.ResponseProcessorImpl.processPayLoadError(ResponseProcessorImpl.java:180)
com.snc.cloud.mgmt.modules.svccatalog.service.impl.ResponseProcessorImpl.processResponse(ResponseProcessorImpl.java:137)
com.snc.cloud.mgmt.modules.svccatalog.orchestration.result.StepResultHandler.process(StepResultHandler.java:198)
com.snc.cloud.mgmt.modules.svccatalog.orchestration.result.StepResultHandler.process(StepResultHandler.java:96)
com.snc.cloud.mgmt.modules.svccatalog.service.impl.BlueprintOrchestratorImpl.handleChunkedResult(BlueprintOrchestratorImpl.java:82)
com.snc.cloud.mgmt.modules.svccatalog.service.impl.CloudOrchestrationServiceImpl.handleChunkCompletion(CloudOrchestrationServiceImpl.java:312)
com.snc.cloud.mgmt.modules.svccatalog.scriptinterface.BPOrchestratorServiceScript.jsFunction_handleCAPIResultChunk(BPOrchestratorServiceScript.java:103)
sun.reflect.GeneratedMethodAccessor2745.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138)
org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:670)
org.mozilla.javascript.FunctionObject.call(FunctionObject.java:614)
org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2582)
org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
org.mozilla.javascript.gen.sys_script_e99479820b0032003ad5c73ef6673acf_script_11563._c_executeRule_1(sys_script.e99479820b0032003ad5c73ef6673acf.script:3)

Steps to Reproduce

  1. Log into the instance 
  2. Activate the Cloud Management Core Plugin.
  3. Add Azure Service Principal Credentials.
  4. Click Discover Subscription
  5. The azure subscription discovery fails with error 

Environment

  • Instance with Cloud Management Core plugin activated.

Observation

  • Looking at the Discovery logs,  we observe it failed with below error
Discovery Subscription Error : Error executing translator script :Azure Datacenter.List_Subscriptions_Response_Processor
com.snc.cloud.mgmt.modules.svccatalog.orchestration.BPOException: Failed to process the payload for translator List_Subscriptions_Response_Processor
  • Looking at  CMP "Order Step" the Order fails with the error as explained above
https://<Instancename>.service-now.com/sn_cmp_order_list.do 
  • Looking at CMP "Order Step Status" the status still appears in the Error state with all input parameters passed
https://<Instancename>.service-now.com/sn_cmp_order_step_status_list.do
  • Looking at CAPI trails the CAPI passed Successfully
https://<Instancename>.service-now.com/sn_capi_api_trail_list.do
  • As the CAPI trails show success, which means the Discovery was successful but the Insert Operation to CMDB from IRE.

Hence we conclude the issue is not with the Discovery but from the  IRE 

 

Cause (Why the API trail succeeded but still the Discovery status failed) 

  • When GlideRecord.setAbortAction() is called. Glide Record will set "lastErrorMessage" on the transaction. 
  • After the insertion call, IRE checks the "lastErrorMessage" to see if there are something wrong with the insert/update call. Since lastErrorMessage is not empty, IRE returned output result with error message failing the discovery.
  • In this specific case, it is observered a Custom BR caused the issue
  • IRE attempted to insert a record which triggered the "Create Asset on insert" custom BR, and the failure to pass the info to IRE.
  • Hence the Discovery status shows Fail with IRE errors 

Resolution

  • Follow the steps  provided under the observation fields and understand the real cause 
  • Look at the Node logs / System logs or  Enable additional debugging to understand what are the Business Rules getting executed just prior to the Discovery failure
  • Communicate with Customer and understand if there is any customization made recently on the instance 
  • Look at the additional Script includes / Business  rules or UI policies added to below tables  

    • cmdb_ci_azure_subscription
    • cmdb_ci_cloud_service_account 

  • Verify "install_status" field is set to "Not Mandatory" if it is checked uncheck Mandatory field on above tables 

 

Additional Information

  • These issues are observed if the Instance is customized with Custom Business rules or Choice Fields, but not CMP issue.

Article Information

Last Updated:2019-08-02 20:43:25
Published:2019-05-14