Cloud Account are unable to discover datacenters and throws and Exception - java.lang.RuntimeException: Could not login on vmware instance


Description

Description


When we run Discovery using Cloud Account, we are unable to discover them sucessfully.

 

Procedure


  • Login into the instance
  • Navigate to Cloud Management > Service Accounts
  • Open the Service Account [ which is used Discover Datacenter ]
  • Click the Discover Datacenters related link.

 

Goto CAPI Trail and look for the exception below

Route error says - Could not log in on VMware instance 

Error details
java.lang.RuntimeException: Could not login on vmware instance 
at com.snc.cmp.connector.cloud.compute.provider.impl.vSphereComputeProvider.login(vSphereComputeProvider.java:701) 
at com.snc.cmp.connector.cloud.compute.provider.impl.vSphereComputeProvider.listDatacenters(vSphereComputeProvider.java:1860) 
at com.snc.cmp.connector.cloud.compute.customizer.impl.vSphereComputeCustomizer.listDatacenters(vSphereComputeCustomizer.java:399) 
at com.snc.cmp.connector.cloud.compute.component.CloudComputeProducer.process(CloudComputeProducer.java:78) 
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) 
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145) 
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77) 
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468) 
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190) 
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190) 
at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62) 
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190) 
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109) 
at org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:68) 
at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:412) 
at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:380) 
at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:270) 
at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:380) 
at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:238) 
at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:128) 
at org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:253) 
at org.apache.camel.impl.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:313) 
at org.apache.camel.impl.DefaultProducerTemplate$10.call(DefaultProducerTemplate.java:588) 
at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
at java.lang.Thread.run(Thread.java:748) 
Caused by: java.net.SocketException: Software caused connection abort: recv failed 
at java.net.SocketInputStream.socketRead0(Native Method) 
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) 
at java.net.SocketInputStream.read(SocketInputStream.java:189) 
at java.net.SocketInputStream.read(SocketInputStream.java:141) 
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) 
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) 
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)

 

Now check for the Datacenter URL, Ideally, we should set it http://<IP Address>/sdk.

If we set it as http://< IP Address >:< Port number >, we will get the above exception

 

 

Applicable Versions


All version

Additional Information


Please refer to docs below

https://docs.servicenow.com/bundle/london-it-operations-management/page/product/cloud-management-v2-setup/task/vmware-create-creds-cloud-mgt.html