启动nohup bin/connect-standalone.sh config/connect-standalone.properties config/connect-file-source.properties config/connect-file-sink.properties &报错
[2020-01-30 19:05:35,287] WARN [Consumer clientId=connector-consumer-local-file-sink-0, groupId=connect-local-file-sink] Error while fetching metadata with correlation id 35 : {connect-test=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient:1063) [2020-01-30 19:05:35,303] WARN [Producer clientId=connector-producer-local-file-source-0] Error while fetching metadata with correlation id 24 : {connect-test=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient:1063) [2020-01-30 19:05:35,401] WARN [Consumer clientId=connector-consumer-local-file-sink-0, groupId=connect-local-file-sink] Error while fetching metadata with correlation id 37 : {connect-test=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient:1063) [2020-01-30 19:05:35,423] INFO [Log partition=connect-test-0, dir=/data/kafka/kafka-logs] Loading producer state till offset 0 with message format version 2 (kafka.log.Log) [2020-01-30 19:05:35,434] WARN [Producer clientId=connector-producer-local-file-source-0] Error while fetching metadata with correlation id 25 : {connect-test=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient:1063) [2020-01-30 19:05:35,461] INFO [Log partition=connect-test-0, dir=/data/kafka/kafka-logs] Completed load of log with 1 segments, log start offset 0 and log end offset 0 in 1171 ms (kafka.log.Log) [2020-01-30 19:05:35,469] INFO Created log for partition connect-test-0 in /data/kafka/kafka-logs/connect-test-0 with properties {compression.type -> producer, message.downconversion.enable -> true, min.insync.replicas -> 1, segment.jitter.ms -> 0, cleanup.policy -> [delete], flush.ms -> 9223372036854775807, segment.bytes -> 1073741824, retention.ms -> 604800000, flush.messages -> 9223372036854775807, message.format.version -> 2.4-IV1, file.delete.delay.ms -> 60000, max.compaction.lag.ms -> 9223372036854775807, max.message.bytes -> 1000012, min.compaction.lag.ms -> 0, message.timestamp.type -> CreateTime, preallocate -> false, min.cleanable.dirty.ratio -> 0.5, index.interval.bytes -> 4096, unclean.leader.election.enable -> false, retention.bytes -> -1, delete.retention.ms -> 86400000, segment.ms -> 604800000, message.timestamp.difference.max.ms -> 9223372036854775807, segment.index.bytes -> 10485760}. (kafka.log.LogManager) 1234567
1.报错别紧张,可能是没有启动完呢,等几分钟再查看一下日志
2.删除一下文件
rm -rf /tmp/kafka-logs/ /tmp/zookeeper/ /tmp/connect. offsets 1