Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
0.8.3.Final
-
None
Description
While running the Debezium connect (debezium/connect:0.8.3.Final) docker images, we noticed that when our connector is stopped, we always see the following stacktrace appearing in our logs:
2018-10-16 04:20:06,714 INFO || Stopping task connector-tst-0 [org.apache.kafka.connect.runtime.Worker] 2018-10-16 04:20:06,716 WARN Postgres|audit|records-stream-producer Closing replication stream due to db connection IO exception... [io.debezium.connector.postgresql.RecordsStreamProducer] 2018-10-16 04:20:07,139 INFO || WorkerSourceTask{id=connector-tst-0} Committing offsets [org.apache.kafka.connect.runtime.WorkerSourceTask] 2018-10-16 04:20:07,140 INFO || WorkerSourceTask{id=connector-tst-0} flushing 0 outstanding messages for offset commit [org.apache.kafka.connect.runtime.WorkerSourceTask] 2018-10-16 04:20:07,142 ERROR || WorkerSourceTask{id=connector-tst-0} Task threw an uncaught and unrecoverable exception [org.apache.kafka.connect.runtime.WorkerTask] org.apache.kafka.connect.errors.ConnectException: An exception ocurred in the change event producer. This connector will be stopped. at io.debezium.connector.base.ChangeEventQueue.throwProducerFailureIfPresent(ChangeEventQueue.java:168) at io.debezium.connector.base.ChangeEventQueue.poll(ChangeEventQueue.java:149) at io.debezium.connector.postgresql.PostgresConnectorTask.poll(PostgresConnectorTask.java:146) at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:186) at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:170) at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:214) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.postgresql.util.PSQLException: Database connection failed when reading from copy at org.postgresql.core.v3.QueryExecutorImpl.readFromCopy(QueryExecutorImpl.java:964) at org.postgresql.core.v3.CopyDualImpl.readFromCopy(CopyDualImpl.java:41) at org.postgresql.core.v3.replication.V3PGReplicationStream.receiveNextData(V3PGReplicationStream.java:145) at org.postgresql.core.v3.replication.V3PGReplicationStream.readInternal(V3PGReplicationStream.java:114) at org.postgresql.core.v3.replication.V3PGReplicationStream.read(V3PGReplicationStream.java:60) at io.debezium.connector.postgresql.connection.PostgresReplicationConnection$1.read(PostgresReplicationConnection.java:198) at io.debezium.connector.postgresql.RecordsStreamProducer.streamChanges(RecordsStreamProducer.java:128) at io.debezium.connector.postgresql.RecordsStreamProducer.lambda$start$1(RecordsStreamProducer.java:114) ... 5 more Caused by: java.net.SocketException: Socket closed at java.net.SocketInputStream.read(SocketInputStream.java:204) at java.net.SocketInputStream.read(SocketInputStream.java:141) at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:140) at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:109) at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:67) at org.postgresql.core.PGStream.receiveChar(PGStream.java:282) at org.postgresql.core.v3.QueryExecutorImpl.processCopyResults(QueryExecutorImpl.java:1006) at org.postgresql.core.v3.QueryExecutorImpl.readFromCopy(QueryExecutorImpl.java:962) ... 12 more
In the code of RecordsStreamProducer class we already saw that a TODO is added for this WARN message. But the fact that along with this warning also a stacktrace in our logs is printed, now triggers alerts in our system.
Are there any plans to solve this TODO and have this warning be caught in more cleaner way?