Smarts Network Configuration Manager: bulk-import importCredentials snmpv3 failing with array index out of bounds exception
book
Article ID: 331088
calendar_today
Updated On:
Products
VMware Smart Assurance
Issue/Introduction
Symptoms:
Bulk import of SNMPv3 credentials fails from NCM 4.1.1 to a current version.
Environment
VMware Smart Assurance - NCM
Cause
A change in column formatting causes the import to fail with the following errors seen in the commandLineUtil.log ($VOYENCE_HOME/logs:
at com.powerup.configmgr.util.commandline.CommandController.commandPrompt(CommandController.java:135) at com.powerup.configmgr.util.commandline.CommandController.main(CommandController.java:81) 2017-10-27 16:43:28,872 ERROR [com.powerup.configmgr.util.commandline.credentials.ImportCredentialsCmd] ImportCredentials Error java.lang.ArrayIndexOutOfBoundsException: 1 at com.powerup.configmgr.util.commandline.credentials.ImportCredentialsCmd.fillInV3Object(ImportCredentialsCmd.java:124) at com.powerup.configmgr.util.commandline.credentials.ImportCredentialsCmd.parseSnmpV3CSVFile(ImportCredentialsCmd.java:198) at com.powerup.configmgr.util.commandline.credentials.ImportCredentialsCmd.execute(ImportCredentialsCmd.java:272) at com.powerup.configmgr.util.commandline.CommandController.processCommand(CommandController.java:164) at com.powerup.configmgr.util.commandline.CommandController.commandPrompt(CommandController.java:135) at com.powerup.configmgr.util.commandline.CommandController.main(CommandController.java:81)
or:
017-10-30 17:33:11,950 ERROR [com.powerup.configmgr.util.commandline.credentials.ImportCredentialsCmd] ImportCredentials Error java.lang.ArrayIndexOutOfBoundsException: 1 at com.powerup.configmgr.util.commandline.credentials.ImportCredentialsCmd.fillInV3Object(ImportCredentialsCmd.java:124) at com.powerup.configmgr.util.commandline.credentials.ImportCredentialsCmd.parseSnmpV3CSVFile(ImportCredentialsCmd.java:198) at com.powerup.configmgr.util.commandline.credentials.ImportCredentialsCmd.execute(ImportCredentialsCmd.java:272) at com.powerup.configmgr.util.commandline.CommandController.processCommand(CommandController.java:164) at com.powerup.configmgr.util.commandline.CommandController.commandPrompt(CommandController.java:135) at com.powerup.configmgr.util.commandline.CommandController.main(CommandController.java:81)
Resolution
Please follow these steps to bypass the issue and load the credentials:
Open the csv file in Excel
Add a new column CREDENTIAL_TYPE after cell A. Set the value for each entry in that column to SnmpV3 (example attached).
Save the file as csv and load the file . It will be loaded correctly.