Smarts Adapter generates an error and cannot read all of the domains from the Smarts Broker
search cancel

Smarts Adapter generates an error and cannot read all of the domains from the Smarts Broker

book

Article ID: 315789

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

When trying to synchronize the NCM Smarts Adapter to the broker, the client GUI for the NCM Smarts Adapter fails and generates error:

Value too long for column "AVAILABLE_SAMS BINARY(255)

Environment

VMware Smart Assurance - SMARTS

Cause

"AVAILABLE_SAMS BINARY(255)" is too short to handle a large number Smarts domains as listed in the brcontrol command on the Smarts Broker.

Resolution

Resolution Pending.

Workaround:

NCM version 10.1.13

  1. Open  $VOYENCE_HOME/NCMSmartsAdapter/webapps/NCMSmartsAdapter-10.1.13.0/WEBINF/classes/application.properties
  2. Add these two spring.h2 lines at the end of the file, after the following line:  

    environments.production.dataSource.properties.defaultTransactionIsolation=2
    spring.h2.console.enabled=true
    spring.h2.console.settings.web-allow-others=true
  3. Save the file.
  4. Restart the NCMSmartsAdapter service.
  5. Skip to Part II:  In Your Web Browser

NCM versions 10.1.1. through 10.1.11

  1. Update the NCM Smarts adapter application.yml file

    source /etc/voyence.conf

  2. Find the application yml file. In this example NCM version 10.1.11 is used.
  3. If your version is older then use the version info of your NCM installation.
  4. Navigate to the $VOYENCE_HOME/NCMSmartsAdapter/webapps directory and review the NCMSmartsAdapter directory name and use this path for the commands below.

    $VOYENCE_HOME/NCMSmartsAdapter/webapps/NCMSmartsAdapter-10.1.11.0/WEB-INF/classes/application.yml
  5. Under the spring heading insert the h2; and the lines below.
    spring:
        h2:
           console:
               enabled: true
               settings:
                    web-allow-others: true
  6. Save the file.
  7. Restart the NCMSmartsAdapter service.

Part II:  In Your Web Browser 

  1. http://IP of the AS Server:11843/NCMSmartsAdapter-10.1.11.0 (or your version) /h2-console
  2. The user is SA and the password is blank.

  3. You will need to type in the JDBC URL as shown above.
  4. Click Test Connection. If successful, then click Connect.
  5. Once connected, you will see a screen that shows fields in the h2-console.  See screenshot below.
  6. Click on the +plus sign on SMARTS_CONFIGURATION
  7. Scroll down and click on the +plus sign on AVAILABLE_SAMS
  8. In the right-hand frame for the SQL statement will show a blank box.
  9. Type
    ALTER TABLE SMARTS_CONFIGURATION ALTER COLUMN AVAILABLE_SAMS Binary(4000)
  10. Then click Run.

  11. Note: If the brcontrol output in larger Smarts environments exceeds 4000 binary characters, you will need to increase this number.
  12. Additional steps to correct an additional issue in the h2 database are required to resolve issues with using Explicit rules for the IP domains.
    1. In the SQL Statement window, type the line below
      ALTER TABLE MAPPING_RULE ALTER COLUMN MAPPING_EXCLUSIONS_ID BIGINT NULL
    2. Click Run
    3. The results should be as shown in the screen shot below:


      The command above:
      Update Count: 0
      (1 ms)
    4. To check this in the left side pane, click on the + next to MAPPING_RULE
    5. Then, click MAPPING_EXCLUSIONS_ID and you should see BIGINT with a NULL entry
    6. Restart the NCM Smarts adapter. This will resolve the errors and you should be able to proceed with adding the IP domains as described in the NCM Smarts Adapter documentation and delete any non-IP domains.

Additional Information

Impact/Risks: High, if there are more characters than 255 the NCM Smarts adapter will not work to sync the Smarts domains to the adapter.