haifxu opened a new issue, #7387:
URL: https://github.com/apache/inlong/issues/7387

   ### What happened
   
   Fix the agent of the `SqlServer` connector.
   1.
   ```
   2023-02-17 00:59:43.420 -ERROR  [               task-job_69_1-6] 
o.a.i.a.c.t.TaskWrapper       :211 error while running wrapper
   java.lang.NullPointerException: null value for key 
job.sqlserverJob.serverName
           at 
org.apache.inlong.agent.conf.AbstractConfiguration.get(AbstractConfiguration.java:233)
 ~[agent-common-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT]
           at 
org.apache.inlong.agent.plugin.sources.reader.SQLServerReader.init(SQLServerReader.java:203)
 ~[agent-plugins-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT]
           at org.apache.inlong.agent.core.task.Task.init(Task.java:77) 
~[agent-core-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT]
           at 
org.apache.inlong.agent.core.task.TaskWrapper.run(TaskWrapper.java:203) 
~[agent-core-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT]
           at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
~[?:1.8.0_322]
           at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
~[?:1.8.0_322]
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
~[?:1.8.0_322]
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
~[?:1.8.0_322]
           at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_322]
   ```
   2.
   ```
   2023-02-16 23:43:09.973 -ERROR  [                 job-job_66-11] 
o.a.i.a.c.j.JobWrapper        :194 Create task for 
profile(org.apache.inlong.agent.conf.TriggerProfile@616c0c5b) failed
   java.lang.NullPointerException: null
           at java.security.MessageDigest.update(MessageDigest.java:338) 
~[?:1.8.0_322]
           at java.security.MessageDigest.digest(MessageDigest.java:413) 
~[?:1.8.0_322]
           at 
org.apache.commons.codec.digest.DigestUtils.md5(DigestUtils.java:468) 
~[commons-codec-1.15.jar:1.15]
           at 
org.apache.commons.codec.digest.DigestUtils.md5(DigestUtils.java:493) 
~[commons-codec-1.15.jar:1.15]
           at 
org.apache.commons.codec.digest.DigestUtils.md5Hex(DigestUtils.java:529) 
~[commons-codec-1.15.jar:1.15]
           at 
org.apache.inlong.agent.core.job.JobWrapper.submit(JobWrapper.java:189) 
~[agent-core-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT]
           at 
org.apache.inlong.agent.core.job.JobWrapper.run(JobWrapper.java:216) 
~[agent-core-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT]
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
~[?:1.8.0_322]
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
~[?:1.8.0_322]
           at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_322]
   ```
   3.
   ```
   2023-02-17 01:20:35.837 -ERROR  [hange-event-source-coordinator] 
i.d.p.ErrorHandler            :31 Producer failure
   io.debezium.DebeziumException: 
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 
'cdc.lsn_time_mapping'.
           at 
io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:85)
 ~[debezium-core-1.8.0.Final.jar:1.8.0.Final]
           at 
io.debezium.pipeline.ChangeEventSourceCoordinator.doSnapshot(ChangeEventSourceCoordinator.java:153)
 ~[debezium-core-1.8.0.Final.jar:1.8.0.Final]
           at 
io.debezium.connector.sqlserver.SqlServerChangeEventSourceCoordinator.executeChangeEventSources(SqlServerChangeEventSourceCoordinator.java:69)
 ~[debezium-connector-sqlserver-1.8.0.Final.jar:1.8.0.Final]
           at 
io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:108)
 ~[debezium-core-1.8.0.Final.jar:1.8.0.Final]
           at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
~[?:1.8.0_322]
           at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
~[?:1.8.0_322]
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
~[?:1.8.0_322]
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
~[?:1.8.0_322]
           at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_322]
   Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object 
name 'cdc.lsn_time_mapping'.
           at 
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262)
 ~[mssql-jdbc-7.2.2.jre8.jar:?]
           at 
com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(SQLServerResultSet.java:5427)
 ~[mssql-jdbc-7.2.2.jre8.jar:?]
           at 
com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResultSet.java:1758)
 ~[mssql-jdbc-7.2.2.jre8.jar:?]
           at 
com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:1016)
 ~[mssql-jdbc-7.2.2.jre8.jar:?]
           at 
io.debezium.jdbc.JdbcConnection.lambda$singleResultMapper$7(JdbcConnection.java:1423)
 ~[debezium-core-1.8.0.Final.jar:1.8.0.Final]
           at 
io.debezium.jdbc.JdbcConnection.queryAndMap(JdbcConnection.java:645) 
~[debezium-core-1.8.0.Final.jar:1.8.0.Final]
           at 
io.debezium.jdbc.JdbcConnection.queryAndMap(JdbcConnection.java:513) 
~[debezium-core-1.8.0.Final.jar:1.8.0.Final]
           at 
io.debezium.connector.sqlserver.SqlServerConnection.getMaxLsn(SqlServerConnection.java:234)
 ~[debezium-connector-sqlserver-1.8.0.Final.jar:1.8.0.Final]
           at 
io.debezium.connector.sqlserver.SqlServerSnapshotChangeEventSource.determineSnapshotOffset(SqlServerSnapshotChangeEventSource.java:168)
 ~[debezium-connector-sqlserver-1.8.0.Final.jar:1.8.0.Final]
           at 
io.debezium.connector.sqlserver.SqlServerSnapshotChangeEventSource.determineSnapshotOffset(SqlServerSnapshotChangeEventSource.java:33)
 ~[debezium-connector-sqlserver-1.8.0.Final.jar:1.8.0.Final]
           at 
io.debezium.relational.RelationalSnapshotChangeEventSource.doExecute(RelationalSnapshotChangeEventSource.java:110)
 ~[debezium-core-1.8.0.Final.jar:1.8.0.Final]
           at 
io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:76)
 ~[debezium-core-1.8.0.Final.jar:1.8.0.Final]
           ... 8 more
   ```
   
   ### What you expected to happen
   
   Continuous collection of `SqlServer`.
   
   ### How to reproduce
   
   Use the `SqlServer` source.
   
   ### Environment
   
   _No response_
   
   ### InLong version
   
   master
   
   ### InLong Component
   
   InLong Agent
   
   ### Are you willing to submit PR?
   
   - [X] Yes, I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to