Broken pipe (Write failed)

473 views
Skip to first unread message

Sabyasachi Mohanty

unread,
Nov 26, 2017, 5:28:37 AM11/26/17
to debezium


Hello guys, Everytime I start my kafka-connect with debezium, the snapshot process takes up around 40gb of disk space for a 2.5gb Mysql data base. And then when the snapshot process is completed I get a ConnectionException with Broken pipe (Write failed).


Can you please help me to sort it out? And the snapshot is taking around 10times more space than the DB, Can I limit the snapshot to only my specific tables instead of the entire DB ? 



2017-11-24 18:00:58,825 INFO   MySQL|dbStreamer|snapshot  Step 8: scanned 7803647 rows in 461 tables in 00:10:29.806   [io.debezium.connector.mysql.SnapshotReader]

2017-11-24 18:00:58,825 INFO   MySQL|dbStreamer|snapshot  Step 9: committing transaction   [io.debezium.connector.mysql.SnapshotReader]

2017-11-24 18:00:58,826 INFO   MySQL|dbStreamer|snapshot  Completed snapshot in 00:10:33.383   [io.debezium.connector.mysql.SnapshotReader]

2017-11-24 18:00:59,508 INFO   ||  Finished WorkerSourceTask{id=azugaSqlConnector-0} commitOffsets successfully in 473 ms   [org.apache.kafka.connect.runtime.WorkerSourceTask]

2017-11-24 18:00:59,510 ERROR  ||  Task azugaSqlConnector-0 threw an uncaught and unrecoverable exception   [org.apache.kafka.connect.runtime.WorkerTask]

org.apache.kafka.connect.errors.ConnectException: Unable to connect to the MySQL database at localhost:3306 with user 'root': Broken pipe (Write failed)

at io.debezium.connector.mysql.BinlogReader.doStart(BinlogReader.java:232)

at io.debezium.connector.mysql.AbstractReader.start(AbstractReader.java:76)

at io.debezium.connector.mysql.ChainedReader.startNextReader(ChainedReader.java:181)

at io.debezium.connector.mysql.ChainedReader.readerCompletedPolling(ChainedReader.java:134)

at io.debezium.connector.mysql.AbstractReader.cleanupResources(AbstractReader.java:230)

at io.debezium.connector.mysql.AbstractReader.poll(AbstractReader.java:210)

at io.debezium.connector.mysql.ChainedReader.poll(ChainedReader.java:120)

at io.debezium.connector.mysql.MySqlConnectorTask.poll(MySqlConnectorTask.java:207)

at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:163)

at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:146)

at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:190)

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:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

Caused by: java.net.SocketException: Broken pipe (Write failed)

at java.net.SocketOutputStream.socketWrite0(Native Method)

at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)

at java.net.SocketOutputStream.write(SocketOutputStream.java:134)

at com.github.shyiko.mysql.binlog.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:68)

at java.io.OutputStream.write(OutputStream.java:116)

at com.github.shyiko.mysql.binlog.network.protocol.PacketChannel.write(PacketChannel.java:68)

at com.github.shyiko.mysql.binlog.BinaryLogClient.authenticate(BinaryLogClient.java:567)

at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:428)

at com.github.shyiko.mysql.binlog.BinaryLogClient$5.run(BinaryLogClient.java:657)

... 1 more

2017-11-24 18:00:59,513 ERROR  ||  Task is being killed and will not recover until manually restarted   [org.apache.kafka.connect.runtime.WorkerTask]

2017-11-24 18:00:59,513 INFO   ||  Closing the Kafka producer with timeoutMillis = 30000 ms.   [org.apache.kafka.clients.producer.KafkaProducer]





Gunnar Morling

unread,
Nov 27, 2017, 4:02:49 AM11/27/17
to debezium
Hi Sabyasachi,


Am Sonntag, 26. November 2017 11:28:37 UTC+1 schrieb Sabyasachi Mohanty:


Hello guys, Everytime I start my kafka-connect with debezium, the snapshot process takes up around 40gb of disk space for a 2.5gb Mysql data base.


That's interesting, where do you see this space being used? Any indications about the contents of the files? I don't think that's an expected behavior.
 

And then when the snapshot process is completed I get a ConnectionException with Broken pipe (Write failed).


Do you get the same behavior when using the "never" or "schema_only" snapshot modes (connector config option "snapshot.mode")? Could it perhaps be that you've set a very low value for "connect.timeout.ms"? If so, you should try and increase it.


Can you please help me to sort it out? And the snapshot is taking around 10times more space than the DB, Can I limit the snapshot to only my specific tables instead of the entire DB ? 


Yes, you can. See the whitelist/blacklist options of the connector config: http://debezium.io/docs/connectors/mysql/.
Reply all
Reply to author
Forward
0 new messages