Smarts Network Configuration Manager: bulk-import importCredentials snmpv3 failing with array index out of bounds exception
search cancel

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:
  1. Open the csv file in Excel
  2. Add a new column CREDENTIAL_TYPE after cell A. Set the value for each entry in that column to SnmpV3 (example attached).
  3. Save the file as csv and load the file . It will be loaded correctly.


Attachments

new.snmpv3-global.csv get_app