Debezium CDC 连接器在 java.library.path 中显示没有 ocijdbc11



我正在尝试部署debezium CDC连接器以从Oracle DB捕获数据。我们已经准备了Oracle DB和Xstream连接器。

我收到以下异常:

{
"name": "test-debezium-2",
"connector": {
"state": "RUNNING",
"worker_id": "10.230.24.80:8084"
},
"tasks": [
{
"id": 0,
"state": "FAILED",
"worker_id": "10.230.24.80:8084",
"trace": "org.apache.kafka.connect.errors.ConnectException: An exception ocurred in the change event producer. This connector will be stopped.ntat 
io.debezium.connector.base.ChangeEventQueue.throwProducerFailureIfPresent(ChangeEventQueue.java:170)ntat 
io.debezium.connector.base.ChangeEventQueue.poll(ChangeEventQueue.java:151)ntat 
io.debezium.connector.oracle.OracleConnectorTask.poll(OracleConnectorTask.java:110)ntat 
org.apache.kafka.connect.runtime.WorkerSourceTask.poll(WorkerSourceTask.java:259)ntat 
org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:226)ntat 
org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:177)ntat 
org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:227)ntat 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)ntat 
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)ntat 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)ntat 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)ntat 
java.base/java.lang.Thread.run(Thread.java:834)n
Caused by: java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]ntat 
java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)ntat 
java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)ntat 
java.base/java.lang.System.loadLibrary(System.java:1867)ntat 
oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3541)ntat 
java.base/java.security.AccessController.doPrivileged(Native Method)ntat 
oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3537)ntat 
oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:269)ntat 
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)ntat 
oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:165)ntat 
oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)ntat 
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)ntat 
java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)ntat 
java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)ntat 
io.debezium.connector.oracle.OracleConnectionFactory.connect(OracleConnectionFactory.java:25)ntat 
io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:756)ntat 
io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:751)ntat 
io.debezium.connector.oracle.OracleConnection.setSessionToPdb(OracleConnection.java:46)ntat 
io.debezium.connector.oracle.OracleSnapshotChangeEventSource.prepare(OracleSnapshotChangeEventSource.java:70)ntat 
io.debezium.relational.RelationalSnapshotChangeEventSource.execute(RelationalSnapshotChangeEventSource.java:104)ntat 
io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:83)nt... 5 moren"
}
],
"type": "source"
}

我已经验证了/usr/lib文件夹是否包含ocijdbc11.dll文件。我也尝试将文件复制到/lib,但遇到了同样的错误。

我遇到了这个问题。 首先去预言机下载"即时客户端" 即时客户端下载

解压缩------相信你已经将 ojdbc.jar 和 xtream.jar 复制到 kafka lib。

然后添加环境变量

vim /etc/profile

加:

exprot LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/you download file addr/libocijdbc11.so

保存----WQ!

哦,记得---资源/etc/profile

再次运行

相关内容

  • 没有找到相关文章

最新更新