Issue Summary

      Assets Discovery scan fails with "Object reference not set to an instance of an object" error.

      This is reproducible on Data Center: (yes)

      Steps to Reproduce

       
      Whenever a scan is executed with an IP range or an IP subnet, the scan fails in the host, the log shows:

      27/06/2023 16:29:03: [Normal] Object reference not set to an instance of an object.
         at Insight.Discovery.ProviderClasses.AssetProvider.GetHostInfoResultByKnownCredentials(List`1 knownCredentials, Int32 ttl, HostInfoDto additionalData, String ip) in C:\build\DISCOVERY-DISCOVERYCLOUDRELEASE127-BUILD\ProviderClasses\AssetProvider.cs:line 221
         at Insight.Discovery.ProviderClasses.AssetProvider.GetHostInfo(String ip, Int32 port, Boolean usePowerShell, Int32 ttl, Boolean autoAddSudo, List`1 enabledPatternFiles, List`1 disabledPatternFiles, String scanSettingsEntryId, Boolean basicHostInfo) in C:\build\DISCOVERY-DISCOVERYCLOUDRELEASE127-BUILD\ProviderClasses\AssetProvider.cs:line 136
      
      • The mentioned path, C:\build\DISCOVERY-DISCOVERYCLOUDRELEASE127-BUILD\ProviderClasses\AssetProvider.cs doesn't exist in the machine running Discovery
      • The credentials test ok.
      • If the scan is done with a single IP, or placing the IPs separated by a semicolon the scan works properly.
      • Same scan settings on 3.1.8 work fine.

      Expected Results

      Scan to complete properly.

      Actual Results

      The below exception is thrown in the discovery log file:

      27/06/2023 16:29:03: [Error] Error scanning host
      27/06/2023 16:29:03: [Normal] Exceptions:
      27/06/2023 16:29:03: [Normal] Object reference not set to an instance of an object.
         at Insight.Discovery.ProviderClasses.AssetProvider.GetHostInfoResultByKnownCredentials(List`1 knownCredentials, Int32 ttl, HostInfoDto additionalData, String ip) in C:\build\DISCOVERY-DISCOVERYCLOUDRELEASE127-BUILD\ProviderClasses\AssetProvider.cs:line 221
         at Insight.Discovery.ProviderClasses.AssetProvider.GetHostInfo(String ip, Int32 port, Boolean usePowerShell, Int32 ttl, Boolean autoAddSudo, List`1 enabledPatternFiles, List`1 disabledPatternFiles, String scanSettingsEntryId, Boolean basicHostInfo) in C:\build\DISCOVERY-DISCOVERYCLOUDRELEASE127-BUILD\ProviderClasses\AssetProvider.cs:line 136
      27/06/2023 16:29:03: [Normal] Finish scan for 192.168.1.9
      

      Workaround

      Use Assets Discovery 3.1.8.

            [JSDSERVER-13651] IP range and IP subnet scan fails on Assets Discovery 3.1.9

            No work has yet been logged on this issue.

              11507b174037 Zakhar Listiev
              09affdc70f32 Sergio Soto Lopez
              Affected customers:
              4 This affects my team
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: