Unable to execute Oracle masking job using Docker TDM Masking:

book

Article ID: 198208

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

We are using the TDM portal running in Docker.
Our Oracle instance is also running in a Docker container

It appears the Data Source Oracle Connection Profile is not propagating down to the docker masking container host.

Resolution Steps tried:
I have tried adding properties to the Oracle Connection Profiles
DelimitIdentifier='NO';oracle.jdbc.timezoneAsRegion=false

in masking YML and Data Target, set the environment variable 
 environment:
  - 'TIME_ZONE=EST5DST'

see below logs for troubleshooting..

portal Logs
TDM_MASKING SERVICE LOGS
:/lib:/usr/lib -Djava.util.logging.config.file=/opt/CA/FastDataMasker/logging.properties -Xms100M -Xmx1000M -cp .:/opt/tomcat/jdbc-drivers/*:/opt/CA/FastDataMasker/Fastdatamasker.jar:/opt/CA/FastDataMasker/lib/*:/opt/CA/FastDataMasker/custom/* com.grid_tools.products.datamasker.Datamasker prf.prf csv.csv opt.opt -runbyportal' in directory '/opt/tomcat/temp/8199138005758867893'
2020-08-26 15:22:26.417 UTC [INFO ] [SimpleAsyncTaskExecutor-4] --- [U:][M:][P:]                   c.c.t.f.s.MessageServiceAgent$1:  callMasking: fdm#: 0: schema: E.TRAVEL: has stopped
2020-08-26 15:22:26.417 UTC [INFO ] [SimpleAsyncTaskExecutor-4] --- [U:][M:][P:]                     c.c.t.f.s.MessageServiceAgent:  Compressed AUDIT file by -40%
2020-08-26 15:22:26.418 UTC [INFO ] [SimpleAsyncTaskExecutor-4] --- [U:][M:][P:]                     c.c.t.f.s.MessageServiceAgent:  Sending AUDIT file for jobId: 963 taskId: 21 chunk pos: 0 size: 28 of: 28

see Masking Service Logs
2020-08-26 15:51:52.873 Fastdatamasker version: 4.9.28.0
2020-08-26 15:51:52.883 Fastdatamasker build date - June 4 2020
2020-08-26 15:51:52.886 PID:[email protected]
2020-08-26 15:51:52.886 Java version 1.8.0_212
2020-08-26 15:51:52.887 OPERATING SYSTEM USER: root
2020-08-26 15:51:52.902 Skipping cloakware configuration
2020-08-26 15:51:52.910 attempting to connect
2020-08-26 15:51:52.911 Using URL:jdbc:oracle:thin:@//xxx.xxx.xxx.xxx:1521/xe
2020-08-26 15:51:53.127 Connecting with driver: oracle.jdbc.driver.OracleDriver using URL: jdbc:oracle:thin:@//xxx.xxx.xxx.xxx::1521/xe
2020-08-26 15:51:53.368 Database service has not started
2020-08-26 15:51:53.369 or supplied connection parameters are incorrect: prf.prf
2020-08-26 15:51:53.370 close: closing down. Final job state: FAILED
2020-08-26 15:51:53.373 run: FDM progress thread:  Sending final notification: state: FAILED
2020-08-26 15:51:53.374 #FDM_METRICS{"jobState":"FAILED","totalRows":"0","rowsMasked":"0","errors":"Connection error: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1\nORA-01882: timezone region not found\n, Error connecting with connection parameters"}#END_FDM_METRICS
2020-08-26 15:51:53.375 exit value = 1



see Masking Service Logs in FDM.
2020-08-26 15:51:53.365 Connection error
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found

        at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:509)
        at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:456)
        at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:451)
        at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:1040)
        at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:552)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:550)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:268)
        at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:501)
        at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:1292)
        at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:1025)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
        at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:793)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:57)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:747)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:562)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:247)
        at com.grid_tools.products.datamasker.db.connection.JDBCDriverUtils.createConnection(JDBCDriverUtils.java:14)
        at com.grid_tools.products.datamasker.db.connection.DefaultDriverConnectionProcessor.getConnection(DefaultDriverConnectionProcessor.java:44)
        at com.grid_tools.products.datamasker.DBUtils.performLogon(DBUtils.java:168)
        at com.grid_tools.products.datamasker.DBUtils.<init>(DBUtils.java:143)
        at com.grid_tools.products.datamasker.DBUtils.<init>(DBUtils.java:103)
        at com.grid_tools.products.datamasker.profilegenerator.ProfileGenerator.loadProfile(ProfileGenerator.java:834)
        at com.grid_tools.products.datamasker.profilegenerator.MainProfileGenerator.generateMainProfile(MainProfileGenerator.java:299)
        at com.grid_tools.products.datamasker.Datamasker.main(Datamasker.java:2427)

2020-08-26 15:51:53.370 Error connecting with connection parameters

Cause

As of Docker 17.06-ce, Docker does not yet provide a way to pass down the TZ Unix environment variable from the host to the container.

Environment

TDM version 4.9.50.0
Data Source: Oracle 11g XE

Resolution

Looks time zone issue resolved now. It’s a docker related issue with certain oracle containers. I posted the link here for future KB.

https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/FAQ.md#how-do-i-change-the-timezone-of-my-container

As of Docker 17.06-ce, Docker does not yet provide a way to pass down the TZ Unix environment variable from the host to the container. Because of that all containers run in the UTC timezone. If you would like to have your database run in a different timezone you can pass on the TZ environment variable within the docker run command via the -e option. An example would be: docker run ... -e TZ="Europe/Vienna" oracle/database:12.2.0.1-ee. Another option would be to specify two read-only volume mounts: docker run ... -v /etc/timezone:/etc/timezone:ro -v /etc/localtime:/etc/localtime:ro oracle/database:12.2.0.1-ee. This will synchronize the timezone of the the container with that of the Docker host.

The trick was to update the host time zone and container time zone to match.