启动kafka-connector一直显示warn

U MAKE ME 发表于: 2024-05-09   最后更新时间: 2024-05-15 14:46:58   766 游览

我一共部署了三台虚拟机,一台主机两台从机。然后我分别执行了

bin/connect-distributed.sh config/connect-distributed.properties

但是一启动就会出现warn 的信息一直滚动并且用ctrl+c也关不掉

WARN [Worker clientId=connect-1, groupId=connect-cluster] 25 partitions have leader brokers without a matching listener, including [__consumer_offsets-9, __consumer_offsets-39, __consumer_offsets-11, __consumer_offsets-31, __consumer_offsets-13, __consumer_offsets-43, __consumer_offsets-29, __consumer_offsets-1, __consumer_offsets-41, __consumer_offsets-27] (org.apache.kafka.clients.NetworkClient:1056)
[2024-05-08 17:00:18,892] WARN [Worker clientId=connect-1, groupId=connect-cluster] 25 partitions have leader brokers without a matching listener, including [__consumer_offsets-9, __consumer_offsets-39, __consumer_offsets-11, __consumer_offsets-31, __consumer_offsets-13, __consumer_offsets-43, __consumer_offsets-29, __consumer_offsets-1, __consumer_offsets-41, __consumer_offsets-27] (org.apache.kafka.clients.NetworkClient:1056)
[2024-05-08 17:00:18,994] WARN [Worker clientId=connect-1, groupId=connect-cluster] 25 partitions have leader brokers without a matching listener, including [__consumer_offsets-9, __consumer_offsets-39, __consumer_offsets-11, __consumer_offsets-31, __consumer_offsets-13, __consumer_offsets-43, __consumer_offsets-29, __consumer_offsets-1, __consumer_offsets-41, __consumer_offsets-27] (org.apache.kafka.clients.NetworkClient:1056)
[2024-05-08 17:00:19,096] WARN [Worker clientId=connect-1, groupId=connect-cluster] 25 partitions have leader brokers without a matching listener, including [__consumer_offsets-9, __consumer_offsets-39, __consumer_offsets-11, __consumer_offsets-31, __consumer_offsets-13, __consumer_offsets-43, __consumer_offsets-29, __consumer_offsets-1, __consumer_offsets-41, __consumer_offsets-27] (org.apache.kafka.clients.NetworkClient:1056)
[2024-05-08 17:00:19,197] WARN [Worker clientId=connect-1, groupId=connect-cluster] 25 partitions have leader brokers without a matching listener, including [__consumer_offsets-9, __consumer_offsets-39, __consumer_offsets-11, __consumer_offsets-31, __consumer_offsets-13, __consumer_offsets-43, __consumer_offsets-29, __consumer_offsets-1, __consumer_offsets-41, __consumer_offsets-27] (org.apache.kafka.clients.NetworkClient:1056)

我想是不是我的connect-distributed.properties配置文件有问题?我在三台机器的配置内容都是一致的

# A list of host/port pairs to use for establishing the initial connection to the Kafka cluster.
bootstrap.servers=192.168.245.128:9092,192.168.245.129:9092,192.168.245.130:9092

# unique name for the cluster, used in forming the Connect cluster group. Note that this must not conflict with consumer group IDs
group.id=connect-cluster

key.converter.schemas.enable=false
value.converter.schemas.enable=false

offset.storage.topic=connect-offsets
offset.storage.replication.factor=1
#offset.storage.partitions=25

config.storage.topic=connect-configs
config.storage.replication.factor=1

status.storage.topic=connect-status
status.storage.replication.factor=1
#status.storage.partitions=5

# Flush much faster than normal, which is useful for testing/debugging
offset.flush.interval.ms=10000

# These are provided to inform the user about the presence of the REST host and port configs 
# Hostname & Port for the REST API to listen on. If this is set, it will bind to the interface used to listen to requests.
#rest.host.name=
rest.port=8085

# The Hostname & Port that will be given out to other workers to connect to i.e. URLs that are routable from other servers.
#rest.advertised.host.name=
#rest.advertised.port=

# Examples: 
# plugin.path=/usr/local/share/java,/usr/local/share/kafka/plugins,/opt/connectors,
plugin.path=/home/hadoop/kafka_2.11-2.4.0/plugins
发表于 2024-05-09

日志关不掉是&引起的,异步执行,脱离了控制,可以改成以下的方式执行:

nohup bin/Conekt Distribut. Shkonfiger/Conneket-Distribut. Properdis > /dev/null 2>&1&
U MAKE ME -> 無名 6月前

不好意思,是nohup bin/connect-distributed.sh config/connect-distributed.properties > /dev/null 2>&1,指令我刚才复制错了,但是为啥运行后没有显示信息出来一直卡在那

無名 -> U MAKE ME 6月前

最后少个&,我的错,我重新编辑了。

nohup ... > /dev/null 2>&1&
U MAKE ME -> 無名 6月前

可以了,谢谢大佬

你的答案

查看kafka相关的其他问题或提一个您自己的问题