sentrysoftware / metricshub

Universal Metrics Collection for OpenTelemetry
https://metricshub.com
GNU Affero General Public License v3.0
15 stars 4 forks source link

An exception occurs when monitoring `ESXi` through vCenter authentication #456

Closed NassimBtk closed 1 month ago

NassimBtk commented 1 month ago

Problem

Encountered exception when monitoring ESXi through vCenter auth.

[ERROR] [o.s.m.e.w.WbemRequestExecutor] Hostname {} - Vcenter ticket refresh query failed. Exception: {}
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class com.vmware.vim25.ws.XmlGen
    at java.base/java.util.concurrent.FutureTask.report(Unknown Source) ~[?:?]
    at java.base/java.util.concurrent.FutureTask.get(Unknown Source) ~[?:?]
    at org.sentrysoftware.metricshub.engine.common.helpers.ThreadHelper.execute(ThreadHelper.java:62) ~[metricshub-enterprise-agent-1.0.01-SNAPSHOT.jar:?]
    at org.sentrysoftware.metricshub.extension.wbem.WbemRequestExecutor.refreshVCenterTicket(WbemRequestExecutor.java:177) ~[metricshub-wbem-extension.jar:?]
    at org.sentrysoftware.metricshub.extension.wbem.WbemRequestExecutor.doVCenterQuery(WbemRequestExecutor.java:114) ~[metricshub-wbem-extension.jar:?]
    at org.sentrysoftware.metricshub.extension.wbem.WbemRequestExecutor.executeWbem(WbemRequestExecutor.java:85) ~[metricshub-wbem-extension.jar:?]
    at org.sentrysoftware.metricshub.extension.wbem.WbemCriterionProcessor.performDetectionTest(WbemCriterionProcessor.java:324) ~[metricshub-wbem-extension.jar:?]
    at org.sentrysoftware.metricshub.extension.wbem.WbemCriterionProcessor.process(WbemCriterionProcessor.java:408) ~[metricshub-wbem-extension.jar:?]
    at org.sentrysoftware.metricshub.extension.wbem.WbemExtension.processCriterion(WbemExtension.java:167) ~[metricshub-wbem-extension.jar:?]
    at org.sentrysoftware.metricshub.engine.strategy.detection.CriterionProcessor.lambda$processCriterionThroughExtension$0(CriterionProcessor.java:358) ~[metricshub-enterprise-agent-1.0.01-SNAPSHOT.jar:?]
    at java.base/java.util.Optional.map(Unknown Source) ~[?:?]
    at org.sentrysoftware.metricshub.engine.strategy.detection.CriterionProcessor.processCriterionThroughExtension(CriterionProcessor.java:358) ~[metricshub-enterprise-agent-1.0.01-SNAPSHOT.jar:?]
    at org.sentrysoftware.metricshub.engine.strategy.detection.CriterionProcessor.process(CriterionProcessor.java:392) ~[metricshub-enterprise-agent-1.0.01-SNAPSHOT.jar:?]
    at org.sentrysoftware.metricshub.engine.strategy.detection.CriterionProcessorRegistry.lambda$static$10(CriterionProcessorRegistry.java:62) ~[metricshub-enterprise-agent-1.0.01-SNAPSHOT.jar:?]
    at org.sentrysoftware.metricshub.engine.strategy.detection.CriterionProcessor.test(CriterionProcessor.java:402) ~[metricshub-enterprise-agent-1.0.01-SNAPSHOT.jar:?]
    at org.sentrysoftware.metricshub.engine.strategy.detection.AbstractConnectorProcessor.lambda$processCriterion$8(AbstractConnectorProcessor.java:331) ~[metricshub-enterprise-agent-1.0.01-SNAPSHOT.jar:?]
    at org.sentrysoftware.metricshub.engine.strategy.detection.AbstractConnectorProcessor.processCriterion(AbstractConnectorProcessor.java:344) ~[metricshub-enterprise-agent-1.0.01-SNAPSHOT.jar:?]
    at org.sentrysoftware.metricshub.engine.strategy.detection.AbstractConnectorProcessor.runConnectorDetectionCriteria(AbstractConnectorProcessor.java:401) ~[metricshub-enterprise-agent-1.0.01-SNAPSHOT.jar:?]
    at org.sentrysoftware.metricshub.engine.strategy.AbstractStrategy.validateConnectorDetectionCriteria(AbstractStrategy.java:420) ~[metricshub-enterprise-agent-1.0.01-SNAPSHOT.jar:?]
    at org.sentrysoftware.metricshub.engine.strategy.AbstractAllAtOnceStrategy.process(AbstractAllAtOnceStrategy.java:101) ~[metricshub-enterprise-agent-1.0.01-SNAPSHOT.jar:?]
    at org.sentrysoftware.metricshub.engine.strategy.AbstractAllAtOnceStrategy.lambda$run$13(AbstractAllAtOnceStrategy.java:475) ~[metricshub-enterprise-agent-1.0.01-SNAPSHOT.jar:?]
    at java.base/java.util.ArrayList.forEach(Unknown Source) [?:?]
    at org.sentrysoftware.metricshub.engine.strategy.AbstractAllAtOnceStrategy.run(AbstractAllAtOnceStrategy.java:475) [metricshub-enterprise-agent-1.0.01-SNAPSHOT.jar:?]
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:?]
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
    at java.base/java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.vmware.vim25.ws.XmlGen
    at com.vmware.vim25.ws.WSClient.createSoapMessage(WSClient.java:220) ~[metricshub-wbem-extension.jar:?]
    at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:171) ~[metricshub-wbem-extension.jar:?]
    at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:125) ~[metricshub-wbem-extension.jar:?]
    at com.vmware.vim25.ws.VimStub.retrieveServiceContent(VimStub.java:1409) ~[metricshub-wbem-extension.jar:?]
    at com.vmware.vim25.mo.ServiceInstance.<init>(ServiceInstance.java:85) ~[metricshub-wbem-extension.jar:?]
    at com.vmware.vim25.mo.ServiceInstance.<init>(ServiceInstance.java:69) ~[metricshub-wbem-extension.jar:?]
    at org.sentrysoftware.vcenter.VCenterClient.requestCertificate(VCenterClient.java:97) ~[metricshub-wbem-extension.jar:?]
    at org.sentrysoftware.metricshub.extension.wbem.WbemRequestExecutor.lambda$refreshVCenterTicket$1(WbemRequestExecutor.java:178) ~[metricshub-wbem-extension.jar:?]
    ... 4 more
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NoClassDefFoundError: org/dom4j/Namespace [in thread "pool-4-thread-1"]
    at com.vmware.vim25.ws.XmlGen.<clinit>(XmlGen.java:60) ~[metricshub-wbem-extension.jar:?]
    at com.vmware.vim25.ws.WSClient.createSoapMessage(WSClient.java:220) ~[metricshub-wbem-extension.jar:?]
    at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:171) ~[metricshub-wbem-extension.jar:?]
    at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:125) ~[metricshub-wbem-extension.jar:?]
    at com.vmware.vim25.ws.VimStub.retrieveServiceContent(VimStub.java:1409) ~[metricshub-wbem-extension.jar:?]
    at com.vmware.vim25.mo.ServiceInstance.<init>(ServiceInstance.java:85) ~[metricshub-wbem-extension.jar:?]
    at com.vmware.vim25.mo.ServiceInstance.<init>(ServiceInstance.java:69) ~[metricshub-wbem-extension.jar:?]
    at org.sentrysoftware.vcenter.VCenterClient.requestCertificate(VCenterClient.java:97) ~[metricshub-wbem-extension.jar:?]
    at org.sentrysoftware.metricshub.extension.wbem.WbemRequestExecutor.lambda$refreshVCenterTicket$1(WbemRequestExecutor.java:178) ~[metricshub-wbem-extension.jar:?]
    ... 4 more

Actions