Cannot install MySQL database connector JAR file for Orchestrator SQL Plug-in in VCF Automation 9
search cancel

Cannot install MySQL database connector JAR file for Orchestrator SQL Plug-in in VCF Automation 9

book

Article ID: 432791

calendar_today

Updated On:

Products

VCF Automation

Issue/Introduction

 

  • Following the documentation for Adding a JDBC connector for the VCF Operations orchestrator SQL plug-in fails to load the plugin
  • The expected directory path (/data/vco/var/run/vco) may not exist on the VCF Automation appliances.

  • After manually creating the directories, copying the JAR file, and restarting the vco-app pods per official documentation, the JAR file is not processed.

  • The JDBC driver remains unavailable within the Orchestrator UI, and no related errors are found in the container logs.

 

Environment

  • VCF Automation 9
  • VCF Operations Orchestrator 9

Cause

The CLASSPATH variable defined within the vco-server-app container (located in the vco-app pod) is set to /var/run/vco/plugins/**/*.jar. The official documentation instructs administrators to place the JAR file into a nested lib directory (e.g., /var/run/vco/plugins/SQL/lib/). This nested path is not evaluated by the configured CLASSPATH wildcard, causing the Orchestrator service to bypass the JAR file during startup.

Resolution

Manually place the driver on the appliance(s) and copy to the vco-app pods:

  1. Copy the desired JDBC Connector file manually from the local machine to one of the VCF Automation nodes:

    1. Log into your local machine and open a terminal window.
    2. Change to the directory where the JDBC Connector file resides:
      cd <file-dir>
    3. Copy the file:
      scp <file-name> vmware-system-user@<ip-address>:<dest-dir>

      Where:

      • <file-dir> is the local directory where the JDBC Connector file resides.
      • <file-name> is the name of the JDBC Connector file to copy. You must be in the directory where the file resides.
      • <ip-address> is the IP address of one of the VCF Automation node machines.
      • <dest-dir> is the directory in the destination where the copied file shall reside.

      Example:

      cd ~/Downloads
      scp mysql-connector-j-9.1.0.jar vmware-system-user@###.###.###.###:/tmp/
  2. Copy the desired JDBC Connector from the VCF Automation node used in step 1 to each Orchestrator pod:

    1. Log into the VCF Automation node:
      ssh vmware-system-user@<ip-address>
    2. Elevate your privilege to root:
      sudo -i
    3. Change to the directory where the JDBC Connector was copied into:
      cd <dest-dir>
    4. Copy the the JDBC Connector file to each Orchestrator pod:
      kubectl cp <file-name> -n prelude -c vco-server-app vco-app-0:/var/run/vco/plugins/<plugin-name>
      kubectl cp <file-name> -n prelude -c vco-server-app vco-app-1:/var/run/vco/plugins/<plugin-name>
      kubectl cp <file-name> -n prelude -c vco-server-app vco-app-2:/var/run/vco/plugins/<plugin-name>

      Where:

      • <plugin-name> is the name of the plugin that the JDBC Connector file implements.
      • <file-name> is the name of the JDBC Connector file to copy.
      • <ip-address> is the IP address of one of the VCF Automation node machines.
      • <dest-dir> is the directory in the destination where the copied file shall reside.

      Example:

      ssh vmware-system-user@###.###.###.###
      sudo -i
      cd /tmp
      kubectl cp mysql-connector-j-9.1.0.jar -n prelude -c vco-server-app vco-app-0:/var/run/vco/plugins/SQL
      kubectl cp mysql-connector-j-9.1.0.jar -n prelude -c vco-server-app vco-app-1:/var/run/vco/plugins/SQL
      kubectl cp mysql-connector-j-9.1.0.jar -n prelude -c vco-server-app vco-app-2:/var/run/vco/plugins/SQL
  3. Restart each Orchestrator pod so it can detect and use the new JDBC Connector:

    1. If not yet done, log into the VCF Automation node:
      ssh vmware-system-user@<ip-address>
    2. If not yet done, escalate your privilege:
      sudo -i
    3. Delete each Orchestrator pod:
      kubectl delete pod vco-app-0 -n prelude
      kubectl delete pod vco-app-1 -n prelude
      kubectl delete pod vco-app-2 -n prelude
    4. Verify all Orchestrator pods are ready:
      kubectl get pods -n prelude | grep vco-app
  4. Test the Orchestrator for the capacity to use the new JDBC Connector:

    1. Log into the VCF Automation UI and navigate to the Orchestrator.
    2. Select "Workflows".
    3. Search for the "JDBC connection example" workflow.
    4. Run the "JDBC connection example" workflow, passing the proper parameters. Ensure the JDBC URL corresponds to an existing database of the same type of the JDBC Connector file just installed. The workflow should run without errors.

Additional Information

Important: Please note that currenlty, the JDBC Driver is not preserved when the appliances are backed up, so in the even that you need to restore from backup, you will need to repeat these steps to reinstall the JDBC Driver.