Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-8955

WS_Man datacollection using WQL fails with 'unsupported element'

    Details

      Description

      Group defined as:

          <group name="windows-os-wmi-processor"
                 resource-uri="http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/*"
                 dialect="http://schemas.microsoft.com/wbem/wsman/1/WQL"
                 filter="select Name,InterruptsPersec,PercentProcessorTime,PercentDPCTime,PercentInterruptTime,PercentUserTime from Win32_PerfFormattedData_PerfOS_Processor where Name ='_Total'"
                 resource-type="wmiOSCpu">
           <attrib name="Name" alias="wmiOSCpuName" instance="wsProcIndex" type="string"/>
           <attrib name="InterruptsPersec" alias="wmiOSCpuIntsPerSec" instance="wsProcIndex" type="Gauge"/>
           <attrib name="PercentProcessorTime" alias="wmiOSCpuPctProcTime" instance="wsProcIndex" type="Gauge"/>
           <attrib name="PercentDPCTime" alias="wmiOSCpuPctDPCTime" instance="wsProcIndex" type="Gauge"/>
           <attrib name="PercentInterruptTime" alias="wmiOSCpuPctIntrTime" instance="wsProcIndex" type="Gauge"/>
           <attrib name="PercentUserTime" alias="wmiOSCpuPctUserTime" instance="wsProcIndex" type="Gauge"/>
          </group>
      

      Resource type is bog standard:

          <resourceType name="wmiOSCpu" label="Processor (wsman)"
                        resourceLabel="Processor (${wmiOSCpuName})">
            <persistenceSelectorStrategy class="org.opennms.netmgt.collection.support.PersistAllSelectorStrategy"/>
            <storageStrategy class="org.opennms.netmgt.dao.support.SiblingColumnStorageStrategy">
              <parameter key="sibling-column-name" value="wmiOSCpuName" />
            </storageStrategy>
          </resourceType>
      

      WQL Query succeeds and a result is returned:

      2016-12-14 14:37:41,681 DEBUG [Collectd-Thread-7-of-100] o.a.c.p.PhaseInterceptorChain: Invoking handleMessage on interceptor org.apache.cxf.interceptor.LoggingInInterceptor@3c25d1ae
      2016-12-14 14:37:41,681 INFO  [Collectd-Thread-7-of-100] o.a.c.s.E.E.EnumerationOperations: Inbound Message
      ----------------------------
      ID: 658
      Response-Code: 200
      Encoding: UTF-8
      Content-Type: application/soap+xml;charset=UTF-8
      Headers: {Content-Length=[1162], content-type=[application/soap+xml;charset=UTF-8], Date=[Wed, 14 Dec 2016 20:37:41 GMT], Server=[Microsoft-HTTPAPI/2.0], WWW-Authenticate=[Negotiate oYG3MIG0oAMKAQChCwYJKoZIhvcSAQICooGfBIGcYIGZBgkqhkiG9xIBAgICAG+BiTCBhqADAgEFoQMCAQ+iejB4oAMCARKicQRv8dVSAoMw4C0/C5QzRuIpWl5enTpzvQmIx/wLoAxwRzQlVFZiTQoAZ0NHm8UWVP95WnCdWNOyRi48rT+oimRvXSVXoDyfrdaxkcZHnA8fhTeLaRow94Dnut8J2xRjaDm4Pj1lf1CGDpLpDJy8zWGB]}
      Payload: <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xml:lang="en-US">
        <s:Header>
          <a:Action>http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse</a:Action>
          <a:MessageID>uuid:0740DA61-3330-496F-AEF8-4894E4A37691</a:MessageID>
          <a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
          <a:RelatesTo>urn:uuid:0f8e9d67-cd0a-4cce-866e-b1d664ae2658</a:RelatesTo>
        </s:Header>
        <s:Body>
          <n:EnumerateResponse>
            <n:EnumerationContext/>
            <w:Items>
              <w:XmlFragment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:m="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd">
                <InterruptsPersec>20955</InterruptsPersec>
                <Name>_Total</Name>
                <PercentDPCTime>1</PercentDPCTime>
                <PercentInterruptTime>0</PercentInterruptTime>
                <PercentProcessorTime>1</PercentProcessorTime>
                <PercentUserTime>0</PercentUserTime>
              </w:XmlFragment>
            </w:Items>
            <w:EndOfSequence/>
          </n:EnumerateResponse>
        </s:Body>
      </s:Envelope>
      
      --------------------------------------
      2016-12-14 14:37:41,681 DEBUG [Collectd-Thread-7-of-100] o.a.c.p.PhaseInterceptorChain: Invoking handleMessage on interceptor org.apache.cxf.interceptor.AttachmentInInterceptor@4faa711a
      2016-12-14 14:37:41,681 DEBUG [Collectd-Thread-7-of-100] o.a.c.p.PhaseInterceptorChain: Invoking handleMessage on interceptor org.apache.cxf.interceptor.StaxInInterceptor@242167b1
      

      But an exception follows:

      2016-12-14 14:37:42,893 DEBUG [Collectd-Thread-7-of-100] o.a.c.p.PhaseInterceptorChain: Invoking handleMessage on interceptor org.apache.cxf.binding.soap.interceptor.SoapHeaderInterceptor@41ac9244
      2016-12-14 14:37:42,893 DEBUG [Collectd-Thread-7-of-100] o.a.c.p.PhaseInterceptorChain: Invoking handleMessage on interceptor org.apache.cxf.ws.addressing.impl.MAPAggregatorImpl@82a185a
      2016-12-14 14:37:42,893 DEBUG [Collectd-Thread-7-of-100] o.a.c.w.a.ContextUtils: retrieving MAPs from context property javax.xml.ws.addressing.context.inbound
      2016-12-14 14:37:42,893 DEBUG [Collectd-Thread-7-of-100] o.a.c.w.a.ContextUtils: current MAPs [MessageId: uuid:0740DA61-3330-496F-AEF8-4894E4A37691, Action: http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse, To: http://www.w3.org/2005/08/addressing/anonymous, RelatesTo: urn:uuid:0f8e9d67-cd0a-4cce-866e-b1d664ae2658]
      2016-12-14 14:37:42,893 DEBUG [Collectd-Thread-7-of-100] o.a.c.p.PhaseInterceptorChain: Invoking handleMessage on interceptor org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor@dd67b1
      2016-12-14 14:37:42,893 DEBUG [Collectd-Thread-7-of-100] o.a.c.p.PhaseInterceptorChain: Invoking handleMessage on interceptor org.apache.cxf.interceptor.StaxInEndingInterceptor@7b943f2c
      2016-12-14 14:37:42,893 DEBUG [Collectd-Thread-7-of-100] o.a.c.p.PhaseInterceptorChain: Invoking handleMessage on interceptor org.apache.cxf.jaxws.interceptors.SwAInInterceptor@5d1063b7
      2016-12-14 14:37:42,893 DEBUG [Collectd-Thread-7-of-100] o.a.c.p.PhaseInterceptorChain: Invoking handleMessage on interceptor org.apache.cxf.jaxws.interceptors.HolderInInterceptor@1907d814
      2016-12-14 14:37:42,893 DEBUG [Collectd-Thread-7-of-100] o.a.c.p.PhaseInterceptorChain: Invoking handleMessage on interceptor org.apache.cxf.ws.policy.PolicyVerificationInInterceptor@224eaffd
      2016-12-14 14:37:42,893 DEBUG [Collectd-Thread-7-of-100] o.a.c.w.p.PolicyVerificationInInterceptor: Verified policies for inbound message.
      2016-12-14 14:37:42,894 WARN  [Collectd-Thread-7-of-100] o.o.n.c.CollectableService: run: failed collection for 2299/10.20.20.157/WSMan/example1
      2016-12-14 14:37:42,894 ERROR [Collectd-Thread-7-of-100] o.o.n.c.CollectableService: Collecting group 'windows-os-wmi-processor' on Agent[nodeid = 2299 ipaddr= 10.20.20.157] failed with 'Unsupported element in EnumerateResponse: javax.xml.bind.JAXBElement@5c042370'. See logs for details.
      org.opennms.netmgt.collection.api.CollectionException: Collecting group 'windows-os-wmi-processor' on Agent[nodeid = 2299 ipaddr= 10.20.20.157] failed with 'Unsupported element in EnumerateResponse: javax.xml.bind.JAXBElement@5c042370'. See logs for details.
              at org.opennms.netmgt.collectd.WsManCollector.collect(WsManCollector.java:147) ~[org.opennms.features.wsman-18.0.2.jar:?]
              at org.opennms.netmgt.collectd.CollectionSpecification.collect(CollectionSpecification.java:274) ~[opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.collectd.CollectableService.doCollection(CollectableService.java:395) ~[opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.collectd.CollectableService.doRun(CollectableService.java:337) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.collectd.CollectableService.access$200(CollectableService.java:69) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.collectd.CollectableService$1.run(CollectableService.java:315) [opennms-services-18.0.2.jar:?]
              at org.opennms.core.logging.Logging.withPrefix(Logging.java:70) [org.opennms.core.logging-18.0.2.jar:?]
              at org.opennms.netmgt.collectd.CollectableService.run(CollectableService.java:304) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.scheduler.LegacyScheduler$1.run(LegacyScheduler.java:209) [opennms-services-18.0.2.jar:?]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45]
              at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124) [opennms-util-18.0.2.jar:?]
              at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
      Caused by: org.opennms.core.wsman.exceptions.WSManException: Unsupported element in EnumerateResponse: javax.xml.bind.JAXBElement@5c042370
              at org.opennms.core.wsman.cxf.TypeUtils.getItemsFrom(TypeUtils.java:94) ~[org.opennms.core.wsman.cxf-1.1.1.jar:?]
              at org.opennms.core.wsman.cxf.CXFWSManClient.enumerateAndPull(CXFWSManClient.java:207) ~[org.opennms.core.wsman.cxf-1.1.1.jar:?]
              at org.opennms.core.wsman.cxf.CXFWSManClient.enumerateAndPullUsingFilter(CXFWSManClient.java:278) ~[org.opennms.core.wsman.cxf-1.1.1.jar:?]
              at org.opennms.netmgt.collectd.WsManCollector.collectGroupUsing(WsManCollector.java:181) ~[org.opennms.features.wsman-18.0.2.jar:?]
              at org.opennms.netmgt.collectd.WsManCollector.collect(WsManCollector.java:141) ~[org.opennms.features.wsman-18.0.2.jar:?]
              ... 12 more
      2016-12-14 14:37:42,894 DEBUG [Collectd-Thread-7-of-100] o.o.n.s.LegacyScheduler: schedule: Adding ready runnable CollectableService for service 2299:/10.20.20.157:WSMan (ready in 300000ms) at interval 300000
      

      Data collection of other resource types not using WQL is succeeding as expected. Switching this to use a node-level resource has no effect, the exception is the same.

        Attachments

          Activity

            People

            • Assignee:
              j-white Jesse White
              Reporter:
              dino2gnt Dino Yancey
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: