Spectrum Modeling Gateway throwing error "java.lang.Throwable: Parse error: attribute SNMPv3Profiles "
search cancel

Spectrum Modeling Gateway throwing error "java.lang.Throwable: Parse error: attribute SNMPv3Profiles "

book

Article ID: 139536

calendar_today

Updated On:

Products

CA eHealth CA Spectrum Network Observability

Issue/Introduction

Running the modelinggateway tool on a prior release of Spectrum, such as 10.2, to export data, the following error is thrown:

spectrum@SPECSRV1 SS-Tools]$ ./modelinggateway -vnm <hostname> -user spectrum -e /opt/application/database_backup/E-<hostname> -o /opt/application/database_backup/O-<hostname>

Modeling Gateway export started.  Wed, Oct 30, 2019, at 07:09:33 PM CET

Error parsing .modelinggatewayresource.xml: java.lang.Throwable: Parse error: attribute SNMPv3Profiles was assigned with two different ID: 0x13388 and 0x12bd4

Modeling Gateway export exception:

java.lang.Throwable: Parse error: attribute SNMPv3Profiles was assigned with two different ID: 0x13388 and 0x12bd4

        at com.aprisma.tie.util.TieTables.addAttrNameID(TieTables.java:352)

        at com.aprisma.tie.util.TieTables.addAttrNameID(TieTables.java:335)

        at com.aprisma.tie.util.TieTables.addConfigAttr(TieTables.java:305)

        at com.aprisma.tie.util.TieTables.initTables(TieTables.java:223)

        at com.aprisma.tie.ModelingGateway.performAction(ModelingGateway.java:279)

        at com.aprisma.tie.ModelingGatewayMain.main(ModelingGatewayMain.java:180)

 

Environment

Spectrum 10.2.x export to 10.4 or later

Cause

This results when exporting data from a prior version of Spectrum (for example, 10.2.x) but using a .modelinggatewayresource.xml from Spectrum 10.4 or later that contains:

<SpectrumConfigurationExport model_type="GlobalConfig" >

        <SNMPv3Profiles attribute_id="0x13388" />

        <HibernationCommSuccessTries attribute_id="0x12acb" />

</SpectrumConfigurationExport>

In Spectrum 10.2.0, the SNMPv3Profiles attribute_id="0x12bd4", not 0x13388 as per the above example.

 

Resolution

As you are running the export on Spectrum 10.2.0, you cannot reference SNMPv3Profiles with the new attribute 0x13388, but for the export you should still reference it as 0x12bd4.

In fact in the default  .modelinggatewayresource.xml file of 10.2, you have:

<SpectrumConfigurationExport model_type="GlobalConfig" >

        <SNMPv3Profiles attribute_id="0x12bd4" />

        <HibernationCommSuccessTries attribute_id="0x12acb" />

</SpectrumConfigurationExport>

So, please correct your  .modelinggatewayresource.xml to have the line:

 <SNMPv3Profiles attribute_id="0x12bd4" />

and then rerun the export. This time it should work fine.

The SNMPv3Profiles attribute_id of 0x12bd4 has changed from (pre 10.2.2) to oldSNMPv3Profiles (post 10.2.2). And a new attribute 0x13388 is added for SNMPv3Profiles in 10.2.2 and above, before running the import on your 10.4 machine, to prevent exceptions such as this, do the following:

  1. Add the below entry in .modelinggatewayresource.xml, just above the "SNMPv3Profiles attr 0x13388" entry.

     <oldSNMPv3Profiles attribute_id="0x12bd4" />

    So, basically you should have:

    <SpectrumConfigurationExport model_type="GlobalConfig" >

           <oldSNMPv3Profiles attribute_id="0x12bd4" />

           <SNMPv3Profiles attribute_id="0x13388" />

           <HibernationCommSuccessTries attribute_id="0x12acb" />

    </SpectrumConfigurationExport>

  2. And in the import file (you obtained from the export), change the tag from SNMPv3Profiles to oldSNMPv3Profiles, for the attribute 0x12bd4This step can be avoided if in 10.2 you export data using a .modelinggatewayresource.xml file that already contains:

           <oldSNMPv3Profiles attribute_id="0x12bd4" />

           <SNMPv3Profiles attribute_id="0x13388" />


    In this way, in the exported xml file you will find  oldSNMPv3Profiles="........"

  3. Now run the modelinggateway import.

  4. After 3rd step the old Profiles may not be seen in OneClick. To get them, run the following action.

     

    cd $SPECROOT/vnmsh
    ./connect
    ./update.exe action=0x10332 mh=<MH of GlobalConfig model>

    To find the <MH of GlobalConfig model>, run (the 1st column returned is the Model_Handle (MH)):

    ./show models | grep GlobalConfig 

Note: If new SNMPV3 profiles had been created post upgrade to 10.2.3 or above, they will be lost after 0x10332 action, and need to be created again if needed.