Problem discover Azure datacenters

maxton
Kilo Explorer

After configuring the account principles and then the Cloud Service Account under Cloud Management -> Service Accounts, I hit "Discover Datacenters". A few seconds later the "Datacenter discovery status" is updated with an error.

I can't find anything in the discovery logs but when looking in the System Logs -> All there is an exception generation

Failure to handle chunked result: com.snc.cloud.mgmt.modules.svccatalog.orchestration.BPOException: Failed to execute API - [object Object] (script_include:AzureAPIInvoker; line 38): com.snc.cloud.mgmt.modules.svccatalog.orchestration.result.StepResultHandler.checkCAPIReturnStatus(StepResultHandler.java:201)

com.snc.cloud.mgmt.modules.svccatalog.orchestration.result.StepResultHandler.validateResult(StepResultHandler.java:120)

com.snc.cloud.mgmt.modules.svccatalog.orchestration.result.StepResultHandler.process(StepResultHandler.java:68)

com.snc.cloud.mgmt.modules.svccatalog.service.impl.BlueprintOrchestratorImpl.handleChunkedResult(BlueprintOrchestratorImpl.java:62)

com.snc.cloud.mgmt.modules.svccatalog.service.impl.CloudOrchestrationServiceImpl.handleChunkCompletion(CloudOrchestrationServiceImpl.java:216)

com.snc.cloud.mgmt.modules.svccatalog.scriptinterface.BPOrchestratorServiceScript.jsFunction_handleCAPIResultChunk(BPOrchestratorServiceScript.java:100)

sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

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_4432._c_executeRule_1(sys_script.e99479820b0032003ad5c73ef6673acf.script:3)

org.mozilla.javascript.gen.sys_script_e99479820b0032003ad5c73ef6673acf_script_4432.call(sys_script.e99479820b0032003ad5c73ef6673acf.script)

org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2648)

org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2590)

org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)

6 REPLIES 6

Saketh
ServiceNow Employee
ServiceNow Employee

Looks like an issue with the mid server.


Ensure all the mid server parameters are correct/create a brand new mid server.


davidliu
Kilo Explorer

Hi Max,



Did you ever get to the bottom of this issue? We are seeing the same error and the MID Server definitely has AWS/Cloud Management Capabilities assigned to it.



Thanks


pavanyuvi
Kilo Contributor

Hi Maxton,

We are facing the same issue, is there any workaround for this.we are trying to discovery datacenters.

Failed to execute API - Failed with status code and message: 407:  (script_include:CloudRESTAPIInvoker; line 138)

Thanks,

Pavan

Tom Brown
Mega Guru

I know this is a very old post, and I ran across it while researching this error on ours.  The KB referencing this isn't searchable or accessible unless you are logged into the ServiceNow support portal.  I had opened a ticket about it and they directed me to a KB.  So to help deflect future needs to open support calls, I thought I'd put it in as a reply. 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0891080

excerpt:

  • Ensure that the MID server(s) used for Azure Cloud Resource Discovery have access to the following URLs:
*.windows.net
*.azure.com
*.azure.net
*.microsoftonline.com

Basically, your MID server can't reach the URLs for managing Azure.  Maybe firewall or proxy settings.   The article also has a link about customizing the MID server selection for Cloud Discovery, since the system today ignores specified MIDs for the Azure Service Principal credentials.