mlapeyre
Contributor
Contributor

Sometimes vm object do not have attributes

Jump to solution

Hello

"Sometimes" the attribute vm of VcHostGraphicsInfo return an array of vm which seems not being complete, there is no "name" attibute:

System.log(graphicInfo.vm[0]);

System.log(graphicInfo.vm[0].id);

System.log(graphicInfo.vm[0].name);

Prints:

[2018-11-22 16:08:25.808] [I] DynamicWrapper (Instance) : [VcVirtualMachine]-[class com.vmware.o11n.plugin.vsphere_gen.VirtualMachine_Wrapper] -- VALUE : Stub: moRef = (ManagedObjectReference: type = VirtualMachine, value = 171, serverGuid = null), binding = https://*********.corp:443/sdk

[2018-11-22 16:08:25.812] [I] 171

[2018-11-22 16:08:25.819] [I] undefined

On the vco logs i get the following error:

2018-11-22 15:19:03.662+0000 [WorkflowExecutorPool-Thread-140] WARN   {******@****.corp:Get host information:205a8559-5e23-48cd-b4dc-75b35000a13f:token=8afd4018673af3eb01673c00bbe80588} [DynamicWrapper] Unable to get property 'name' on object VcVirtualMachine

java.lang.reflect.InvocationTargetException

         at sun.reflect.GeneratedMethodAccessor656.invoke(Unknown Source)

         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

         at java.lang.reflect.Method.invoke(Method.java:498)

         at ch.dunes.vso.sdk.DynamicWrapperHelper.dynamicGet(DynamicWrapperHelper.java:133)

         at ch.dunes.vso.sdk.DynamicWrapper.get(DynamicWrapper.java:146)

         at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:2184)

         at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1492)

         at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1485)

         at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1239)

         at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)

         at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)

         at org.mozilla.javascript.NativeArray.iterativeMethod(NativeArray.java:1584)

         at org.mozilla.javascript.NativeArray.execIdCall(NativeArray.java:318)

         at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)

         at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1473)

         at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)

         at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)

         at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)

         at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)

         at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120)

         at ch.dunes.scripting.server.script.MainScriptingObject.executeScript(MainScriptingObject.java:259)

         at ch.dunes.scripting.server.script.MainScriptingObject.executeScript(MainScriptingObject.java:245)

         at ch.dunes.workflow.engine.mbean.WorkflowScriptRunner.execute(WorkflowScriptRunner.java:187)

         at ch.dunes.workflow.engine.mbean.runner.WorkflowItemTaskRunner.execute(WorkflowItemTaskRunner.java:44)

         at ch.dunes.workflow.engine.mbean.runner.WorkflowItemTaskRunner.execute(WorkflowItemTaskRunner.java:25)

         at ch.dunes.workflow.engine.mbean.helper.WorkflowHandler.executeItem(WorkflowHandler.java:1179)

         at ch.dunes.workflow.engine.mbean.helper.WorkflowHandler.requestElementExecution(WorkflowHandler.java:1139)

         at ch.dunes.workflow.engine.mbean.helper.WorkflowHandler.handleWorkflowTokenNextStep(WorkflowHandler.java:804)

         at ch.dunes.workflow.engine.mbean.helper.WorkflowHandler.executeToken(WorkflowHandler.java:693)

         at ch.dunes.workflow.engine.mbean.helper.WorkflowHandler.handleTokenExecution(WorkflowHandler.java:615)

         at ch.dunes.workflow.engine.mbean.helper.WorkflowHandler.access$100(WorkflowHandler.java:114)

         at ch.dunes.workflow.engine.mbean.helper.WorkflowHandler$1.execute(WorkflowHandler.java:404)

         at ch.dunes.model.ar.AccessRightsTemplate.executeWithAccessRights(AccessRightsTemplate.java:16)

         at ch.dunes.workflow.engine.mbean.helper.WorkflowHandler.doExecute(WorkflowHandler.java:400)

         at ch.dunes.workflow.engine.mbean.helper.WorkflowHandler.run(WorkflowHandler.java:271)

         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

         at java.util.concurrent.FutureTask.run(FutureTask.java:266)

         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

         at java.lang.Thread.run(Thread.java:748)

Caused by: (vmodl.fault.ManagedObjectNotFound) {

    faultCause = null,

    faultMessage = null,

    obj = ManagedObjectReference: type = ManagedEntity, value = 171, serverGuid = null

}

         at sun.reflect.GeneratedConstructorAccessor1009.newInstance(Unknown Source)

         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

         at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

         at java.lang.Class.newInstance(Class.java:442)

         at com.vmware.vim.vmomi.core.types.impl.ComplexTypeImpl.newInstance(ComplexTypeImpl.java:172)

         at com.vmware.vim.vmomi.core.types.impl.DefaultDataObjectFactory.newDataObject(DefaultDataObjectFactory.java:25)

         at com.vmware.vim.vmomi.core.soap.impl.unmarshaller.ComplexStackContext.<init>(ComplexStackContext.java:30)

         at com.vmware.vim.vmomi.core.soap.impl.unmarshaller.UnmarshallerImpl$UnmarshallSoapFaultContext.parse(UnmarshallerImpl.java:150)

         at com.vmware.vim.vmomi.core.soap.impl.unmarshaller.UnmarshallerImpl$UnmarshallSoapFaultContext.unmarshall(UnmarshallerImpl.java:101)

         at com.vmware.vim.vmomi.core.soap.impl.unmarshaller.UnmarshallerImpl.unmarshalSoapFault(UnmarshallerImpl.java:88)

         at com.vmware.vim.vmomi.core.soap.impl.unmarshaller.UnmarshallerImpl.unmarshalSoapFault(UnmarshallerImpl.java:83)

         at com.vmware.vim.vmomi.client.common.impl.SoapFaultStackContext.setValue(SoapFaultStackContext.java:40)

         at com.vmware.vim.vmomi.client.common.impl.ResponseUnmarshaller.processNextElement(ResponseUnmarshaller.java:127)

         at com.vmware.vim.vmomi.client.common.impl.ResponseUnmarshaller.unmarshal(ResponseUnmarshaller.java:70)

         at com.vmware.vim.vmomi.client.common.impl.ResponseImpl.unmarshalResponse(ResponseImpl.java:272)

         at com.vmware.vim.vmomi.client.common.impl.ResponseImpl.setResponse(ResponseImpl.java:229)

         at com.vmware.vim.vmomi.client.http.impl.HttpExchangeBase.parseResponse(HttpExchangeBase.java:150)

         at com.vmware.vim.vmomi.client.http.impl.HttpExchange.run(HttpExchange.java:48)

         at com.vmware.vim.vmomi.client.http.impl.HttpProtocolBindingBase.executeRunnable(HttpProtocolBindingBase.java:226)

         at com.vmware.vim.vmomi.client.http.impl.HttpProtocolBindingImpl.send(HttpProtocolBindingImpl.java:145)

         at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl$CallExecutor.sendCall(MethodInvocationHandlerImpl.java:580)

         at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl$CallExecutor.executeCall(MethodInvocationHandlerImpl.java:561)

         at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl.completeCall(MethodInvocationHandlerImpl.java:347)

         at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl.invokeFetch(MethodInvocationHandlerImpl.java:331)

         at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl.invoke(MethodInvocationHandlerImpl.java:177)

         at com.sun.proxy.$Proxy523.getName(Unknown Source)

         at sun.reflect.GeneratedMethodAccessor1347.invoke(Unknown Source)

         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

         at java.lang.reflect.Method.invoke(Method.java:498)

         at com.vmware.o11n.plugin.vsphere.connect.CommonInvocationHandler$1.call(CommonInvocationHandler.java:119)

         at com.vmware.o11n.plugin.vsphere.caching.InventoryCacheImpl.lambda$optional$3(InventoryCacheImpl.java:223)

         at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4793)

         at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3542)

         at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2323)

         at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2286)

         at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)

         at com.google.common.cache.LocalCache.get(LocalCache.java:3953)

         at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4790)

         at com.vmware.o11n.plugin.vsphere.caching.InventoryCacheImpl.getCopyOrLoad(InventoryCacheImpl.java:235)

         at com.vmware.o11n.plugin.vsphere.connect.CommonInvocationHandler.invoke(CommonInvocationHandler.java:128)

         at com.sun.proxy.$Proxy524.getName(Unknown Source)

         at com.vmware.o11n.plugin.vsphere_gen.ManagedEntity_Wrapper.getName(ManagedEntity_Wrapper.java:129)

         ... 40 more

I suspect a cache issue of the vcenter plugin, but i can't find how to get fresh information i tried to "reload()" the host but it doesn't change anything.
Restarting the vco-server service "fixed" the problem for a moment but it finally re-occured.

I use vRO 7.3 with VCenter plugin 6.5.

0 Kudos
1 Solution

Accepted Solutions
mlapeyre
Contributor
Contributor

A ticket has been opened.
The workaround for this issue is to use the property collector for getting the objects.

View solution in original post

0 Kudos
1 Reply
mlapeyre
Contributor
Contributor

A ticket has been opened.
The workaround for this issue is to use the property collector for getting the objects.

View solution in original post

0 Kudos