[sarah@hadoop100 maxwell]$ bin/maxwell --config config.properties
Using kafka version: 1.0.0
03:52:39,032 INFO Maxwell - Starting Maxwell. maxMemory: 12620660736 bufferMemoryUsage: 0.25
03:52:43,065 INFO ProducerConfig - ProducerConfig values:
com.github.shyiko.mysql.binlog.network.ServerException: Could not find first log file name in binary log index file
at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:937) [mysql-binlog-connector-java-0.24.0.jar:0.24.0]
at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:606) [mysql-binlog-connector-java-0.24.0.jar:0.24.0]
at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:850) [mysql-binlog-connector-java-0.24.0.jar:0.24.0]
at java.lang.Thread.run(Thread.java:834) [?:?]
03:52:45,269 INFO BinlogConnectorReplicator - Binlog disconnected.
03:52:45,302 INFO TaskManager - Stopping 4 tasks
03:52:45,302 ERROR TaskManager - cause:
com.github.shyiko.mysql.binlog.network.ServerException: Could not find first log file name in binary log index file
at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:937) ~[mysql-binlog-connector-java-0.24.0.jar:0.24.0]
at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:606) ~[mysql-binlog-connector-java-0.24.0.jar:0.24.0]
at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:850) ~[mysql-binlog-connector-java-0.24.0.jar:0.24.0]
at java.lang.Thread.run(Thread.java:834) [?:?]
03:52:45,304 INFO TaskManager - Stopping: com.zendesk.maxwell.schema.PositionStoreThread@3b9f5177
03:52:45,308 INFO TaskManager - Stopping: com.zendesk.maxwell.producer.MaxwellKafkaProducerWorker@665c6dbc
03:52:45,311 INFO KafkaProducer - [Producer clientId=producer-1] Closing the Kafka producer with timeoutMillis = 9223372036854775807 ms.
03:52:45,319 INFO TaskManager - Stopping: com.zendesk.maxwell.bootstrap.BootstrapController@72e1e09a
03:52:45,319 INFO TaskManager - Stopping: com.zendesk.maxwell.replication.BinlogConnectorReplicator@308790df
03:52:45,320 ERROR Maxwell - Maxwell couldn't find the requested binlog, exiting...
03:52:46,886 INFO TaskManager - Stopped all tasks
show binary logs;
原因是因爲MySQL的binlog現在只有這些了,所以找不到
解決辦法:
1.清空maxwell數據庫
2.雖然MySQL設置了永不過期,但是大小有限,後面的數據會覆蓋掉前面的數據,可以將最大的binlogsize調大