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

vmware importer fails with NPE

    Details

    • Sprint:
      Horizon - September 6th, Horizon - September 13th

      Description

      In a customer environment, triggering an import from:

      vmware://vcenter?importIPv4Only=true
      

      Fails with:

      Caused by: java.lang.NullPointerException
              at org.opennms.netmgt.provision.service.vmware.VmwareImporter.checkHostPowerState(VmwareImporter.java:542) ~[opennms-vmware-20.0.1.jar:?]
              at org.opennms.netmgt.provision.service.vmware.VmwareImporter.iterateHostSystems(VmwareImporter.java:605) ~[opennms-vmware-20.0.1.jar:?]
              at org.opennms.netmgt.provision.service.vmware.VmwareImporter.buildVMwareRequisition(VmwareImporter.java:204) ~[opennms-vmware-20.0.1.jar:?]
              at org.opennms.netmgt.provision.service.vmware.VmwareImporter.getRequisition(VmwareImporter.java:109) ~[opennms-vmware-20.0.1.jar:?]
              at org.opennms.netmgt.provision.service.vmware.VmwareRequisitionUrlConnection.getInputStream(VmwareRequisitionUrlConnection.java:128) ~[opennms-vmware-20.0.1.jar:?]
              at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:168) ~[org.apache.servicemix.bundles.spring-core-4.1.6.RELEASE_1.jar:?]
      

      Before the NPE, provisiond.log shows:

      2017-08-31 15:33:59,839 DEBUG [importExecutor-1] o.o.n.p.s.v.VmwareImporter: Adding Host System 'esx70' (ID: host-205702)
      2017-08-31 16:10:19,113 WARN  [importExecutor-1] o.o.n.p.s.v.VmwareImporter: Only non-reachable interfaces found, using first one for primary interface '10.18.2.70'
      2017-08-31 16:10:19,344 WARN  [importExecutor-1] o.o.n.p.s.v.VmwareImporter: Can't add topologyInformation because either the parentEntity or the MOR is null for null
      2017-08-31 16:10:19,449 DEBUG [importExecutor-1] o.o.n.p.s.v.VmwareImporter: hostRuntimeInfo=null
      2017-08-31 16:10:19,875 DEBUG [importExecutor-1] o.o.n.p.s.v.VmwareImporter: Can't find CPU information for null (ID: host-205702)
      2017-08-31 16:10:20,086 DEBUG [importExecutor-1] o.o.n.p.s.v.VmwareImporter: Can't find Memory information for null (ID: host-205702)
      2017-08-31 16:10:20,192 DEBUG [importExecutor-1] o.o.n.p.s.v.VmwareImporter: Iterating host systems on VMware management server vcenter : null (ID: host-206917)
      2017-08-31 16:10:20,405 DEBUG [importExecutor-1] o.o.n.p.s.v.VmwareImporter: Checking power state for host system null (ID host-206917)
      2017-08-31 16:10:20,618 WARN  [importExecutor-1] o.o.n.p.s.v.VmwareRequisitionUrlConnection: Problem getting input stream: '{}'
      

      There appears to be two related problems here:
      1. It takes 30+ minutes to attempt to find a primary interface on esx70
      2. By the time we finished the primary interface search on esx70, the vcenter session is no longer valid. Subsequent requests return a fault with "NotAuthenticated", which is not handled properly, and leads to the observed NPE.

        Attachments

          Activity

            People

            • Assignee:
              cpape Christian Pape
              Reporter:
              j-white Jesse White
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: