Sending

Search Results

Installing the TIBCO® Metadata Agent

Installation and configuration

TIBCO® Metadata agent is a Java application provided as a jar file configurable by a “properties” file. Its main purpose is to establish interactions between the TIBCO® Data Virtualization (TDV) instance installed on a customer’s server and TIBCO Cloud™ Metadata.

One agent can be connected to one instance of TDV. TIBCO Cloud™ Metadata supports connection to multiple agents that manage different data sources.

Prior to agent configuration, you have to create a technical user in Metadata Administration Menu.

For more details, see this page.

Beware, the technical user created is automatically prefixed with ebx-.

Prerequisites

The TIBCO® Metadata Agent requires:

  • JRE 11 minimum
  • TIBCO® Data Virtualization version 8.3 minimum

Security and Cloud Access

In order to access to TIBCO Cloud Metadata (CIC Cloud), and to allow TIBCO Cloud™ Metadata to access to the TIBCO® Metadata Agent, infrastructure considerations are to be taken into consideration :

  • TIBCO® Metadata Agent hosting server must be opened to the Internet.
  • It is recommended to define a DNS Name for the TIBCO® Metadata Agent hosting server, in order to ease certificate management.
  • TIBCO® Metadata Agent hosting server must be reachable via HTTPs (HTTP over SSL), using a CA-signed certificate (no self-signed certificate).
  • TIBCO® Metadata Agent external port must be port 443 (default HTTPs port), using a reverse-proxy (IIS, Apache, Ngninx, …). (ma.http.ws-url has to be set to the reverse-proxied URL to the agent, reachable from Internet).
  • TIBCO® Metadata Agent internal port can be configured on any available port on the machine (see ma.http.port in Agent configuration properties), and use in the reverse-proxy configuration to expose the TIBCO® Metadata Agent to Internet.

Installation process

Below are the steps to follow to get the TIBCO® Metadata Agent running on your system:

  1. Download TIBCO® Metadata Agent package from the Metadata Administration perspective.
  2. Unpack it on your system.
  3. Fill in properties template as described below in the ‘Properties configuration’ section. Please, note that for some properties it is required to log into Metadata and/or obtain some information from Metadata administrator.
  4. Launch TIBCO® Metadata Agent as described below in the ‘Execution’ section.

Packaging

The agent is available as a standalone Java application (jar file).

It can be downloaded within TIBCO Cloud™ Metadata, in Administration menu.

Properties template

######################################################
######################################################
#####                                            #####
#####               TDV Database                 #####
#####                                            #####
######################################################
######################################################
ma.tdv.datasource.url=jdbc:compositesw:dbapi@[[TDV SERVER HOST]]:9401?domain=composite&dataSource=system
ma.tdv.datasource.username=[[TDV USER]]
ma.tdv.datasource.password=[[TDV PASSWORD]]

#####################################################
######################################################
#####                                            #####
#####               TDV SOAP                     #####
#####                                            #####
######################################################
######################################################
#Base URL for TDV SOAP interfaces
ma.tdv.soap.base-url=http://[[TDV SERVER HOST]]:9400
ma.tdv.soap.username=[[TDV USER]]
ma.tdv.soap.password=[[TDV PASSWORD]]
#A root folder to get private data sources. This folder will be scanned as well as its subfolders
#You can indicate several root comma separated paths
ma.tdv.soap.datasources-root-folder=/shared/examples
#Folder in which Agent will create new private datasources from TCMD. It must exist in your TDV server.
ma.tdv.soap.new-datasources-folder=/shared/examples
#Additional SQL data types not supported for profiling feature
ma.tdv.profiling.not-supported-types=
#Additional SQL data types supported by profiling feature except for the cardinality analyses
ma.tdv.profiling.not-supported-types-for-cardinality=

######################################################
######################################################
#####                                            #####
#####               Metadata connection          #####
#####                                            #####
######################################################
######################################################
ma.metadata.context=[[METADATA BASE URL]]
ma.metadata.username=[[METADATA TECHNICAL USER NAME]]
ma.metadata.password=[[METADATA TECHNICAL USER PASSWORD]]
ma.metadata.public-key=[[METADATA TECHNICAL USER JWT]]
ma.metadata.label=[[LABEL FOR THIS AGENT]]
####
#### Uncomment this line if you want to use encryption for agent passwords. 
#### In this case, you will have to enrypt password using TIBCO Metadata Agent Tools
#### Read the documentation for more informations
####
#ma.metadata.useEncryption=true

######################################################
######################################################
#####                                            #####
#####               Agent properties             #####
#####                                            #####
######################################################
######################################################
ma.http.port=[[AGENT PORT]]	
ma.http.ws-url=[[AGENT CONTEXT URL]]

######################################################
######################################################
#####                                            #####
#####               Agent log properties         #####
#####                                            #####
######################################################
######################################################
#Folder where the logs will be stored
ma.logging.path=./logs
#Log level for technical logs (Spring framework, external libraries).
ma.logging.level.root=INFO
#Log level for the Agent's functional logs.
ma.logging.level.agent=INFO
#Log level for the SOAP messages. Set to TRACE to see full request body.
ma.logging.level.soap.sent=INFO
#Log level for the SOAP messages. Set to TRACE to see full response body.
ma.logging.level.soap.received=INFO

Properties configuration

Prior to launching the TIBCO® Metadata Agent, you need to complete the information in the properties file to check the connection to the TDV and to TIBCO Cloud™ Metadata.

Users are strongly discouraged to modify properties that are not described in the table below but are present in the properties file, especially specific URLs configured for Metadata operation or the H2 database JDBC URL. A good practice is to remove old specific properties from your prior-to-version 3 agent, in order to keep only specific properties in your configuration file.

Property nameDescription
TDV Database connection
ma.tdv.datasource.urlThe composite data source URL to connect the Agent to the system database of TDV. The expected format is jdbc:compositesw:dbapi@\<host\>:\<port\>?domain=composite&dataSource=system
ma.tdv.datasource.usernameTDV user name with read permission on the system data sources
ma.tdv.datasource.passwordCorresponding password
TDV SOAP connection
ma.tdv.soap.base-urlURL of the TDV SOAP operations. The expected format is https://\<host\>:\<port\>
ma.tdv.soap.usernameTDV user name with read-write permissions for the SOAP operations
ma.tdv.soap.passwordCorresponding password
ma.tdv.soap.datasources-root-folderA root folder to get private data sources. This folder will be scanned as well as its subfolders. You can indicate several comma separated paths.
ma.tdv.soap.new-datasources-folderFolder in which Agent will create new private data sources from TIBCO Cloud™ Metadata
ma.tdv.profiling.not-supported-typesList of SQL data types that are not supported for profiling function. Types should be listed in lower case comma-separated.
ma.tdv.profiling.not-supported-types-for-cardinalityList of SQL data types that are supported for profiling, but not for the cardinality functions. Types should be listed in lower case comma-separated.
TIBCO Cloud Metadata connection
ma.metadata.contextREST Endpoint for TIBCO Cloud™ Metadata Advanced Data Services. Expected format is: https://\<host\>:\<port\>\<contextRoot\>
ma.metadata.usernameMetadata technical user name. Please, contact TIBCO Cloud™ Metadata administrator to receive this information.
ma.metadata.passwordMetadata technical user password. Please, contact TIBCO Cloud™ Metadata administrator to receive this information.
ma.metadata.public-keyPublic key (JWT) associated with the TIBCO Cloud™ Metadata technical user. Please, contact TIBCO Cloud™ Metadata administrator to receive this information.
ma.metadata.labelA user-friendly label to show in the Metadata for this agent.
ma.metadata.useEncryptionDefine if encryption is used for ma.tdv.datasource.password, ma.tdv.soap.password and ma.metadata.password. If activated, all passwords must be encrypted using TIBCO Metadata Agent Tools, see below.
Agent properties
ma.http.portThe port on which the agent listens for incoming REST connections
ma.http.ws-urlThe URL of the agent's REST endpoint.
You have to set HTTPs on the agent (using reverse proxy for instance, or TIBCO Cloud™ Metadata won't be able to connect).
You also have to allow incoming connections from cloud (Internet) to agent's host & port
Agent logging properties
ma.logging.pathThe folder where the agent's logs will be stored. Agent must have write permission on this folder.
ma.logging.level.rootLog level for the technical logs generated by the technical framework that the Agent runs on.
ma.logging.level.agentLog level for the functional logs generated by the the Agent.
ma.logging.level.soap.sentLog level for the SOAP messages that are sent to the TDV from the Agent. By default, they are not logged. If you want to log them for debug or any other purposes, set this property to TRACE.
ma.logging.level.soap.receivedLog level for the SOAP messages that are received from the TDV to the Agent. By default, they are not logged. If you want to log them for debug or any other purposes, set this property to TRACE.
Private properties (should only be overwritten in particular cases)
ma.tdv.soap.public-databases-folderFolder for the public data sources creation. Metadata Provisioning function will create public containers under this folder. This folder must point to the TDV '/services/databases' folder. This property is not defined in the public properties and must not be overwritten except for the cases where TDV upgrade includes change in the internal structure.
ma.tdv.soap.introspect-result-timeoutTimeout for the introspection task execution (real time in seconds is calculated as timeout * interval). Default value if property is not provided equals to 600 seconds. If this timeout is reached, Agent will stop checking state of the introspection task in TDV and will return error for ongoing harvesting request.
ma.tdv.soap.introspect-result-intervalInterval in seconds with which Agent checks the state of an introspection task in TDV. Default value if this property is not provided equals to 5s.
ma.tdv.datasource.max-query-timeoutInterval in seconds for the query timeout on the TDV datasource. By default it is equal to 600s.

 

Once these properties are configured, you can launch the agent as a Java application, using command line or any other suitable tool (see below on this page).

The configuration file should be named application.properties

Upon the first launch, the agent will query TIBCO Cloud™ Metadata REST API for registration and will obtain a GUID to be used in all information exchanges between the two applications.

Please, check that in the agent’s log file after start up you see the message ‘Started MetadataAgentApplication in xx seconds’. This indicates that the start up was correct and the agent is running.

If you don’t see this message, your need to check the log file for error messages explaining the issue preventing agent to start.

Once registered, the agent will be displayed in TIBCO Cloud™ Metadata Administration Menu, as described here

TDV Connection rights

The agent must be authorized to connect to TDV using two connections flows:

  1. JDBC connection to the TDV system datasource using JDBC URL defined in property ‘ma.tdv.datasource.url’.
  2. SOAP connection using URL defined in property ‘ma.tdv.soap.resources-url’.

Check that this is authorized on your TDV instance prior launching the Agent.

TDV and Metadata Connection Encryption

If ma.metadata.useEncryption is activated, then ma.tdv.datasource.password, ma.tdv.soap.password and ma.metadata.password must be encrypted into application.properties before starting the agent :

  • As a prerequisite, ma.metadata.public-key must be defined in application.properties according to the corresponding TIBCO Cloud™ Metadata Technical User.
  • Use TIBCO Metadata Agent Tools to encrypt the original password. Launch in a terminal :

    java -jar metadata-agent-tools.jar MY_PLAIN_PASSWORD

The output provided is as follows :

 `**************************`
 `Value to encrypt is MY_PLAIN_PASSWORD`
 `**************************`
 `Encrypted value is : I7UOEPOHtF+J4EYPTPRxR0++QG4hoXFe87uSPluI1lbi`
 `**************************`
  • Copy-paste the encrypted values into application.properties for each corresponding password property.

Caution : with this feature enabled, encrypted password must be re-encrypted on each renewal of JWT key.

Agent execution (as a Standalone Java Application)

You have to configure a launcher to execute the agent, adding the configuration (application.properties) file into a config directory under the directory where is placed the agent.

logs and storage directories are created by the agent itself directly under the structure.

Under storage, two files are created, one for agent local database (configDB.mv.db), one for scheduling (quartzDB.mv.db). If you have previously used different names for these files in your previous configuration, please rename these files accordingly in your file system, after stopping the current agent.

To launch the agent, you can create a shell file as follows (in this example the jar is placed in a /metadata-agent directory):

You have to define the default encoding as UTF-8 for the JVM using -Dfile.encoding=UTF-8, if not already set.

Example on Linux :

java -jar metadata-agent.jar >> /logs/metadata-agent.log  2>&1

Example on Windows :

java -Dfile.encoding=UTF-8 -jar metadata-agent.jar > /logs/metadata-agent.log  2>&1

Once started, an application.pid file is created containing the process id of the agent. You can stop the agent by killing this process.

kill $(cat application.pid)

Troubleshooting

TDV connection issues

Error messageReasons and resolution
Failed to initialize TDV datasource: Invalid login attempt.This error appears when the Agent cannot connect to the TDV instance because login or password are not correct. Check the information you set up in properties 'ma.tdv.datasource.username' and 'ma.tdv.datasource.password'.
Failed to initialize TDV datasource: Failed to finish connect: 'Connection timed out: no further information'This kind of issue can be caused by different reasons. Here are some most common ones: - incorrect host and port for TDV datasource connection. Check the value in 'ma.tdv.datasource.url' property - port not opened on the TDV server. Check that the port you indicated in 'ma.tdv.datasource.url' property is opened on the server and connections are allowed from the machine where the agent is installed - firewall blocking access between TDV server and the machine where the agent is installed
Failed to initialize TDV datasource:Cannot load driver classCheck that 'ma.tdv.datasource.driver-class-name' property is set to the 'cs.jdbc.driver.CompositeDriver' value.

Metadata connection issues

Error messageReasons and resolution
Error in exchanges with Metadata: { "localizedMessage":"HTTP error 401.", "messages":[ "HTTP 401 Unauthorized" ] }This error appears when the agent cannot connect to Metadata using credentials provided in properties 'ma.metadata.username' and 'ma.metadata.password'.
Failed to connect to Metadata I/O error on GET request for "http://localhost:8081/ebx-ca-tabula-tdv/tdv-rest/health"This error message indicates that Metadata is not responding on the 'ma.metadata.context'. Check that Metadata URL is correct and it can be reached from the machine where the Agent is installed (including firewall and proxy settings)