This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

REST API - Network Sonar Discovery Gets Created, but fails to complete

Hello Orion SDK Community,

I have automation in place that is working to create discoveries, run the discovery, and complete the import - I have this working fine in multiple instances of solarwinds.

However in one specific instance (which is on the same version of NPM and all other modules) I'm getting a few random errors. Any help would be greatly appreciated.

One set of weird errors:

2017-08-22 15:58:54,105 [85] ERROR SolarWinds.Orion.Core.SharedCredentials.CredentialDAL - (null) (null)     Unable to find credential with ID = 3, owner =  and credentialType = SolarWinds.Orion.Core.SharedCredentials.Credentials.UsernamePasswordCredential

2017-08-22 15:59:35,215 [17] ERROR SolarWinds.InformationService.Core.InformationService - (null) (null)     Exception for Operation: <root type="array">

  <item type="number">18</item>

</root>

I should note that CredentialID 3 is type: SolarWinds.Orion.Core.Models.Credentials.SnmpCredentialsV2 NOT SolarWinds.Orion.Core.SharedCredentials.Credentials.UsernamePasswordCredential,

so I'm wondering why it is being interpreted as a different type.

Here is the statusdescription as reported by Orion.DiscoveryProfiles - I'm not suer why it is referencing "DeviceStudioDiscoveryPluginJobDescription" when I only am using the Core, Interface, and VIM Plugins....

Network Discovery job has failed to complete.\r\nState: Failed\r\nProfile id: 28.\r\nThe Job Scheduler is reporting the following error:\r\nSolarWinds.JobEngine.WorkerProcess.JobExecutionException: System.Exception: Unable to deserialize job description. ---> System.Runtime.Serialization.SerializationException: Error in line 0 position 0. Element 'http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Discovery:DiscoveryPluginJobDescriptionBase' contains data from a type that maps to the name 'http://schemas.solarwinds.com/2008/DeviceStudio:DeviceStudioDiscoveryPluginJobDescription'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver if you are using DataContractSerializer or add the type corresponding to 'DeviceStudioDiscoveryPluginJobDescription' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to the serializer.

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String ns)

   at ReadArrayOfDiscoveryPluginJobDescriptionBaseFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString , XmlDictionaryString , CollectionDataContract )

   at System.Runtime.Serialization.CollectionDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader)

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String ns)

   at ReadDiscoveryJobDescriptionFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] )

   at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader)

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns)

   at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName, DataContractResolver dataContractResolver)

   at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)

   at System.Runtime.Serialization.DataContractSerializer.ReadObject(XmlReader reader, Boolean verifyObjectName)

   at SolarWinds.Orion.Common.SerializationHelper.FromXmlReader[T](XmlReader reader, Boolean verifyObjectName, IEnumerable`1 knownTypes)

   at SolarWinds.Orion.Common.SerializationHelper.FromXmlReader[T](XmlReader reader, IEnumerable`1 knownTypes)

   at SolarWinds.Orion.Discovery.Job.OrionDiscoveryJob.GetDiscoveryJobContext(String jobDetailConfiguration, IDiscoveryPluginFactory pluginFactory, List`1& plugins)

   --- End of inner exception stack trace ---

   at SolarWinds.Orion.Discovery.Job.OrionDiscoveryJob.GetDiscoveryJobContext(String jobDetailConfiguration, IDiscoveryPluginFactory pluginFactory, List`1& plugins)

   at SolarWinds.Orion.Discovery.Job.OrionDiscoveryJob.ConfigureJobContext()

   at SolarWinds.Orion.Discovery.Job.OrionDiscoveryJob.Execute(IJobExecutionHost host)

   at SolarWinds.JobEngine.WorkerProcess.Job2Adapter.Execute(IInternalJobExecutionHost host)

   at SolarWinds.JobEngine.WorkerProcess.Job2Adapter.Execute(IInternalJobExecutionHost host)

   at SolarWinds.JobEngine.WorkerProcess.JobDecorator.Execute(IInternalJobExecutionHost host)

   at SolarWinds.JobEngine.WorkerProcess.AgentDispatcher.ExecuteJobSynchronously(ActiveJob activeJob)

   at SolarWinds.JobEngine.WorkerProcess.AgentDispatcher.ExecuteJob(ActiveJob activeJob)

   at SolarWinds.JobEngine.WorkerProcess.AgentDispatcher.WorkItemDispatched(Object state)

   at SolarWinds.JobEngine.WorkerProcess.Job2Adapter.Execute(IInternalJobExecutionHost host)

   at SolarWinds.JobEngine.WorkerProcess.JobDecorator.Execute(IInternalJobExecutionHost host)

   at SolarWinds.JobEngine.WorkerProcess.AgentDispatcher.ExecuteJobSynchronously(ActiveJob activeJob)

   at SolarWinds.JobEngine.WorkerProcess.AgentDispatcher.ExecuteJob(ActiveJob activeJob)

   at SolarWinds.JobEngine.WorkerProcess.AgentDispatcher.WorkItemDispatched(Object state)

Lastly, here is my discovery context:

[

  "Name": "AutoDiscovery_08222017035855", 

  "EngineID":5, 

  "JobTimeoutSeconds": 3600, 

  "SearchTimeoutMiliseconds": 3000, 

  "SnmpTimeoutMiliseconds": 2000, 

  "SnmpRetries": 1, 

  "RepeatIntervalMiliseconds": 1800, 

  "SnmpPort": 161, 

  "HopCount": 0, 

  "PreferredSnmpVersion": "SNMP2c", 

  "DisableIcmp": "False", 

  "AllowDuplicateNodes": "True", 

  "IsAutoImport": "False", 

  "IsHidden": "False", 

  "PluginConfigurations":

       {"PluginConfigurationItem": "<?xml version=\"1.0\" encoding=\"utf-16\"?><PluginItems><knownTypes><ArrayOfstring xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><string>SolarWinds.Orion.Core.Models.Discovery.CoreDiscoveryPluginConfiguration,SolarWinds.Orion.Core.Models</string></ArrayOfstring></knownTypes><pluginItem><ArrayOfDiscoveryPluginConfigurationBase xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Discovery\"><DiscoveryPluginConfigurationBase xmlns:d2p1=\"http://schemas.solarwinds.com/2008/Orion\" i:type=\"d2p1:CoreDiscoveryPluginConfiguration\"><d2p1:ActiveDirectoryList /><d2p1:AddressRange /><d2p1:AgentsAddresses xmlns:d3p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" /><d2p1:AutoImportVolumeTypes xmlns:d3p1=\"http://schemas.datacontract.org/2004/07/SolarWinds.Common.Snmp\" i:nil=\"true\" /><d2p1:BulkList xmlns:d3p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><d3p1:string>10.75.146.120</d3p1:string><d3p1:string>10.75.146.121</d3p1:string><d3p1:string>10.75.146.122</d3p1:string></d2p1:BulkList><d2p1:Credentials><d2p1:credentials><knownTypes><ArrayOfstring xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" /></knownTypes><pluginItem><d2p1:ArrayOfCredential xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" /></pluginItem></d2p1:credentials></d2p1:Credentials><d2p1:DiscoverAgentNodes>false</d2p1:DiscoverAgentNodes><d2p1:PreferredPollingMethod>SNMP</d2p1:PreferredPollingMethod><d2p1:SharedCredentials xmlns:d3p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><d3p1:KeyValueOfintint><d3p1:Key>1</d3p1:Key><d3p1:Value>3</d3p1:Value></d3p1:KeyValueOfintint></d2p1:SharedCredentials><d2p1:SubnetList /><d2p1:WMICredentials /><d2p1:WmiRetries>1</d2p1:WmiRetries><d2p1:WmiRetryInterval>PT1.5S</d2p1:WmiRetryInterval></DiscoveryPluginConfigurationBase></ArrayOfDiscoveryPluginConfigurationBase></pluginItem></PluginItems>"}, 

       {"PluginConfigurationItem": "<?xml version=\"1.0\" encoding=\"utf-16\"?><PluginItems><knownTypes><ArrayOfstring xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><string>SolarWinds.Interfaces.Common.Models.Discovery.InterfacesDiscoveryPluginConfiguration,SolarWinds.Interfaces.Common</string></ArrayOfstring></knownTypes><pluginItem><ArrayOfDiscoveryPluginConfigurationBase xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Discovery\"><DiscoveryPluginConfigurationBase xmlns:d2p1=\"http://schemas.solarwinds.com/2008/Interfaces\" i:type=\"d2p1:InterfacesDiscoveryPluginConfiguration\"><d2p1:AutoImportExpressionFilter xmlns:d3p1=\"http://schemas.datacontract.org/2004/07/\" /><d2p1:AutoImportStatus xmlns:d3p1=\"http://schemas.datacontract.org/2004/07/SolarWinds.Interfaces.Common.Enums\"><d3p1:IfAutoImportStatus>Up</d3p1:IfAutoImportStatus></d2p1:AutoImportStatus><d2p1:AutoImportVirtualTypes xmlns:d3p1=\"http://schemas.datacontract.org/2004/07/System\"><d3p1:boolean>false</d3p1:boolean></d2p1:AutoImportVirtualTypes><d2p1:AutoImportVlanPortTypes xmlns:d3p1=\"http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Enums\" /><d2p1:DiscoverVLANs>false</d2p1:DiscoverVLANs></DiscoveryPluginConfigurationBase></ArrayOfDiscoveryPluginConfigurationBase></pluginItem></PluginItems>"},

       {"PluginConfigurationItem": "<?xml version=\"1.0\" encoding=\"utf-16\"?><PluginItems><knownTypes><ArrayOfstring xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><string>SolarWinds.VIM.Common.Configuration.VimDiscoveryPluginConfiguration,SolarWinds.VIM.Common</string><string>SolarWinds.VIM.Common.Configuration.HyperVDiscoveryPluginConfiguration,SolarWinds.VIM.Common</string></ArrayOfstring></knownTypes><pluginItem><ArrayOfDiscoveryPluginConfigurationBase xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Discovery\"><DiscoveryPluginConfigurationBase xmlns:d2p1=\"http://schemas.solarwinds.com/2008/Virtualization\" i:type=\"d2p1:VimDiscoveryPluginConfiguration\"><d2p1:IsDiscoveryForVimEnabled>true</d2p1:IsDiscoveryForVimEnabled><d2p1:SelectedVmWareCredentials xmlns:d3p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" /></DiscoveryPluginConfigurationBase><DiscoveryPluginConfigurationBase xmlns:d2p1=\"http://schemas.solarwinds.com/2008/Virtualization\" i:type=\"d2p1:HyperVDiscoveryPluginConfiguration\" /></ArrayOfDiscoveryPluginConfigurationBase></pluginItem></PluginItems>"}

}

]

Thank you,


=SWQL

HHelOne