While running the masking audit job, we are seeing this below error for Dockerized TDM on Linux.
Connection error: java.sql.SQLException: Error during opening connection: null, Error connecting with connection parameters
Release : TDM Portal 4.10.214.0 on Docker
We need to look at the TDMMaskingService log to get more information regarding the error. You can find the TDM Portal logs inside the TDM volume, which is located at /home/tdm/.tdm/logs/ by default.
Note: there could be more than one masking engine running. You may have to look at more than one log file. For example: TDMMaskingService.1ad3d74b7654.log
When looking through the masking log, we found more information:
[ERROR] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#0-1] --- [U:][M:][P:] c.c.t.f.s.MessageServiceAgent$1: callMasking: job:10 fdm#: 3: schema: <HOSTNAME>.example.com<CONNECTION_PROFILE>: csv: tdm-fdm-0000000010-0000000003-9f7a5dc4043b.csv (1) <HOSTNAME>.example.com<CONNECTION_PROFILE>: java.sql.SQLException: Error during opening connection: null
...
Caused by: java.security.PrivilegedActionException: com.microsoft.sqlserver.jdbc.SQLServerException: The connection to the host <HOSTNAME>.example.com, named instance <INSTANCE> failed. Error: "java.net.SocketTimeoutException: Receive timed out". Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434. For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host.
Checking the SQL Server connection profile in the TDM Portal, we found someone has entered an instance name that does not exist on the SQL Server. This was causing the connection to time out. Removing the instance name from the connection profile resolved the issue.