You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JDBC sink does not make an attempt to log into the target database via JDBC until after it receives data from the intended topic(s). I suggest an initial connection attempt be made as soon as activated via REST in order to allow for easier configuration / debugging rather than finding out the connection is invalid only after data is flowing.
[2020-06-29 20:57:32,688] INFO Received 1 records. First record kafka coordinates:(inventory-0-1). Writing them to the database... (com.ibm.eventstreams.connect.jdbcsink.JDBCSinkTask:90)
[2020-06-29 20:57:32,688] INFO # of records: 1 (com.ibm.eventstreams.connect.jdbcsink.JDBCSinkTask:96)
[2020-06-29 20:57:32,691] WARN com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@2091eb53 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: (com.mchange.v2.resourcepool.BasicResourcePool:1841)
com.ibm.db2.jcc.am.SqlInvalidAuthorizationSpecException: [jcc][t4][2013][11249][4.26.14] Connection authorization failure occurred. Reason: User ID or Password invalid. ERRORCODE=-4214, SQLSTATE=28000
The text was updated successfully, but these errors were encountered:
@fwhippleibm thank you for identifying this and making the suggestion!
This is a serious developer UX issue and may even bleed into performance.
At a quick glance, it seems like the solution to this is initializing the DatabaseFactory here
/**
* Start this Connector. This method will only be called on a clean Connector, i.e. it has
* either just been instantiated and initialized or {@link #stop()} has been invoked.
*
* @param props configuration settings
*/
@Override public void start(Map<String, String> props) {
this.props = props;
// ADDITION: from JdbcSInkTask
DatabaseFactory databaseFactory = new DatabaseFactory();
try {
this.database = databaseFactory.makeDatabase(this.config);
} catch (Exception e) {
logger.error("Failed to build the database {} ", e);
e.printStackTrace();
throw e;
}
// TODO Additional tests...
}
@fwhippleibm if you want to take a stab at this - go for it!
If not the team will let you know when we will get to it.
I have a similar problem. The JDBC sink connector can not update the table of Db2.
I'm not sure the way to solve it. Could you tell me how to solve the errors? Could you tell me which file should I edit ?
Error messages are to the following.
[2021-12-29 17:41:25,806] ERROR [jdbc-sink-connector|task-0] java.sql.SQLException: Connections could not be acquired from the underlying database! (com.ibm.eventstreams.connect.jdbcsink.JDBCSinkTask:151)
[2021-12-29 17:41:25,807] ERROR [jdbc-sink-connector|task-0] Write of 1 records failed, remainingRetries=0 (com.ibm.eventstreams.connect.jdbcsink.JDBCSinkTask:106)
java.sql.SQLException: Connections could not be acquired from the underlying database!
The JDBC sink does not make an attempt to log into the target database via JDBC until after it receives data from the intended topic(s). I suggest an initial connection attempt be made as soon as activated via REST in order to allow for easier configuration / debugging rather than finding out the connection is invalid only after data is flowing.
The text was updated successfully, but these errors were encountered: