Network Management
Error: Unable to locate or error loading device template
This article describes the reasons NCM jobs would return the following error, and provides resolutions for each scenario: Unable to locate or error loading device template.
First published date
Last published date
Overview
This article describes the reasons NCM jobs would return the following error, and provides resolutions for each scenario:
Unable to locate or error loading device template.
Product section
Cause
This error is caused by one of the following situations.
Scenario #1: A device template is missing or incorrect
- The device template format or command lines are incorrect.
- In NCM 7.3.2 or earlier, the device template is missing or was not copied over after an application migration.
Scenario #2: Corrupted SCP encrypted data
If this is the cause, you will see the following additional symptoms:
- The job doesn't work on a particular Polling Engine.
- The
SolarWinds.Orion.NCM.Security-SWJobEngineWorker2.log filecontains the following error:
STP SmartThreadPool Thread #0 ERROR SolarWinds.Orion.NCM.Security.CryptoHelperWrapper - Unable to decrypt encrypted text due to exceptionSystem.Security.Cryptography.CryptographicException: The parameter is incorrect.
Note: Logs are in the following location:C:\ProgramData\Solarwinds\Logs\Orion\NCM\
- When you Adjust logging levels with the Orion Log Adjuster to DEBUG, the
NcmBusinessLayerPlugin.logfile contains the following error:
DEBUG SolarWinds.Orion.Common.SqlHelper - SQL: SELECT SettingValue FROM NCM_NCMSettings WHERE SettingName=@settingName AND EngineID=@engineId (@settingName=SCP User Name, @engineId=6)
ERROR SolarWinds.Cirrus.BusinessLayer.TransferExtensions - NCMTransfer RefreshDeviceCommands error. DeviceTemplateXml: <Configuration-Management
......
</Configuration-Management>System.Security.Cryptography.CryptographicException: The parameter is incorrect. - NCM returns an error when you click Settings > All Settings > NCM Settings > SCP Server.
Scenario #3: Orion server is under hardware specification
- Orion server is already at 100% capacity for the CPU and memory which is causing the timeout and produces error message "Error: Unable to locate or error loading device template"
Resolution
Scenario #1
- Double check command lines and make sure they are correct in the templates. To access device templates:
- In NCM 7.3.2 or earlier, the device templates are located on the Orion server in the following location:
C:\Program Files\SolarWinds\Orion\NCM\Device Type - In NCM 7.4.0 through NCM 7.6.x:
- In the Orion Web Console, click Settings > All Settings.
- Under Product Specific Settings, click NCM Settings.
- Under Advanced, click Device Templates.
- In NCM 7.7 and later:
- In the Orion Web Console, click Settings > All Settings.
- Under Node and Group Management, click Manage Device Templates.
- In NCM 7.3.2 or earlier, the device templates are located on the Orion server in the following location:
- When you copy commands from a text file or another document, make sure there is no strange formatting. To remove any formatting, paste the command into Notepad, and then copy it from there and paste it into the XML editor. Or manually type in the command.
- For NCM 7.3.2 or earlier, make sure the device template is on the Orion server in the location below. (If the there was a recent migration, the Device Templates must be copied over from the original server and placed in the same directory.)
C:\Program Files\SolarWinds\Orion\NCM\Device Type
Scenario #2
You will notice that a particular Polling Engine is not able to download device configurations.
- Look at the DEBUG message in the
NcmBusinessLayerPlugin.logfile and find the EngineID of the Polling Engine that is affected. (In the example above, the message contains EngineID=6). - To verify, you can use the following SQL query:
-- Scripts are not supported under any SolarWinds support program or service. -- Scripts are provided AS IS without warranty of any kind. SolarWinds further -- disclaims all warranties including, without limitation, any implied warranties -- of merchantability or of fitness for a particular purpose. The risk arising -- out of the use or performance of the scripts and documentation stays with you. -- In no event shall SolarWinds or anyone else involved in the creation, -- production, or delivery of the scripts be liable for any damages whatsoever -- (including, without limitation, damages for loss of business profits, business -- interruption, loss of business information, or other pecuniary loss) arising -- out of the use of or inability to use the scripts or documentation. SELECT * FROM Engines WHERE EngineID = __
For example:-- Scripts are not supported under any SolarWinds support program or service. -- Scripts are provided AS IS without warranty of any kind. SolarWinds further -- disclaims all warranties including, without limitation, any implied warranties -- of merchantability or of fitness for a particular purpose. The risk arising -- out of the use or performance of the scripts and documentation stays with you. -- In no event shall SolarWinds or anyone else involved in the creation, -- production, or delivery of the scripts be liable for any damages whatsoever -- (including, without limitation, damages for loss of business profits, business -- interruption, loss of business information, or other pecuniary loss) arising -- out of the use of or inability to use the scripts or documentation. SELECT * FROM Engines WHERE EngineID = 6
- First, remove the Orion certificate and How to Recreate the SolarWinds-Orion certificate
- If the problem persists, run the following query to drop the credentials:
-- Scripts are not supported under any SolarWinds support program or service. -- Scripts are provided AS IS without warranty of any kind. SolarWinds further -- disclaims all warranties including, without limitation, any implied warranties -- of merchantability or of fitness for a particular purpose. The risk arising -- out of the use or performance of the scripts and documentation stays with you. -- In no event shall SolarWinds or anyone else involved in the creation, -- production, or delivery of the scripts be liable for any damages whatsoever -- (including, without limitation, damages for loss of business profits, business -- interruption, loss of business information, or other pecuniary loss) arising -- out of the use of or inability to use the scripts or documentation. DELETE FROM NCM_NCMSettings where SettingName='SCP User Name' and EngineID = __ DELETE FROM NCM_NCMSettings where SettingName='SCP Password' and EngineID = __
For example:-- Scripts are not supported under any SolarWinds support program or service. -- Scripts are provided AS IS without warranty of any kind. SolarWinds further -- disclaims all warranties including, without limitation, any implied warranties -- of merchantability or of fitness for a particular purpose. The risk arising -- out of the use or performance of the scripts and documentation stays with you. -- In no event shall SolarWinds or anyone else involved in the creation, -- production, or delivery of the scripts be liable for any damages whatsoever -- (including, without limitation, damages for loss of business profits, business -- interruption, loss of business information, or other pecuniary loss) arising -- out of the use of or inability to use the scripts or documentation. DELETE FROM NCM_NCMSettings where SettingName='SCP User Name' and EngineID = 6 DELETE FROM NCM_NCMSettings where SettingName='SCP Password' and EngineID = 6
Scenario #3
- Make sure the Orion server meets the minimum or the recommended requirement for the CPU and memory specifications
Links
Best practices for device command templates
Creating a new NCM Device Template explained
Multi-module system guidelines for the Orion Platform