Typically this problem is seen when the JDBC url is defined as localhost only. Depending on when your OTK_DB was setup it might have gotten automatically replicated between local mysql nodes. If it had gotten replicated a localhost JDBC defined connection string would work on BOTH Primary DB's in the cluster but none of the remote processing hosts. If it did not get replicated then it would only work on a single host, actually hosting the JDBC driver.
To validate which databases are in your mysql:
1) Connect to your Gateway appliance via ssh connecting as ssgconfig.
2) Choose menu item 3) Use a privileged shell (root)
3) Specify the password.
5) mysql> show databases;
This will show ssg and/or otk/otk_db
To check or change your jdbc driver:
1) Login to Policy Manager
2) On the top Menu bar choose Tasks -> Data Sources -> Manage JDBC Connections
3) Select the Oauth or OTK driver and choose Edit
Modify the JDBC url to similar to the below for a 2 node configuration.
For MYSQL Driver
For l7tech Mysql driver