Kafka Connect "worker_id" 设置为环回“127.0.1.1:8083”?
Kafka Connect "worker_id" set to loopback "127.0.1.1:8083"?
我有一个三节点 Confluent Kafka 集群。每个节点都在运行 zookeeper、kafka broker、schema-registry 和 kafka connect。
我配置了 S3 接收器。它似乎在运行,但是 worker_id
设置为环回 IP 地址而不是唯一 IP,这看起来是错误的:
curl "localhost:8083/connectors/my-s3-sink/status" | jq '.'
{
"name": "my-s3-sink",
"connector": {
"state": "RUNNING",
"worker_id": "127.0.1.1:8083"
},
"tasks": [
{
"state": "RUNNING",
"id": 0,
"worker_id": "127.0.1.1:8083"
}
],
"type": "sink"
}
Kafka Connect 如何获取 127.0.1.1:8083
环回地址?我认为这对于生产三节点集群是不正确的。
如何检查我的集群配置以找出问题?
我通过 /usr/bin/connect-distributed /etc/kafka/connect-distributed.properties
通过 systemd 启动 Kafka Connect,并且 bootstrap.servers
在该属性文件中设置为未解析为环回 IP 的三个节点 IP。 (我 x
出于隐私的实际 IP 值)
bootstrap.servers=172.x.x.x:9092,172.x.x.x:9092,172.x.x.x:9092
我的 Kafka 代理配置了 /etc/kafka/server.properties
设置:
listeners=PLAINTEXT://0.0.0.0:9092
# EC2 public hostname
advertised.listeners=PLAINTEXT://ec2-34-x-x-x.us-west-2.compute.amazonaws.com:9092
# EC2 internal/private hostnames. localhost entry will resolve to 127.0.1.1
zookeeper.connect=ip-172-x-x-x.us-west-2.compute.internal:2181,ip-172-x-x-x.us-west-2.compute.internal:2181,ip-172-x-x-x.us-west-2.compute.internal:2181
并且/etc/kafka/zookeeper.properties
配置为:
server.1=172.x.x.x:2888:3888
server.2=172.x.x.x:2888:3888
server.3=172.x.x.x:2888:3888
属性 rest.host.name
需要配置为 connect-distributed.properties
中每个实例的 IP 或主机名。集群负责人使用其余 api 来平衡集群中的任务,因此如果您不使用 8083,也请更新 rest.host.port
。
# 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=8083
我有一个三节点 Confluent Kafka 集群。每个节点都在运行 zookeeper、kafka broker、schema-registry 和 kafka connect。
我配置了 S3 接收器。它似乎在运行,但是 worker_id
设置为环回 IP 地址而不是唯一 IP,这看起来是错误的:
curl "localhost:8083/connectors/my-s3-sink/status" | jq '.'
{
"name": "my-s3-sink",
"connector": {
"state": "RUNNING",
"worker_id": "127.0.1.1:8083"
},
"tasks": [
{
"state": "RUNNING",
"id": 0,
"worker_id": "127.0.1.1:8083"
}
],
"type": "sink"
}
Kafka Connect 如何获取 127.0.1.1:8083
环回地址?我认为这对于生产三节点集群是不正确的。
如何检查我的集群配置以找出问题?
我通过 /usr/bin/connect-distributed /etc/kafka/connect-distributed.properties
通过 systemd 启动 Kafka Connect,并且 bootstrap.servers
在该属性文件中设置为未解析为环回 IP 的三个节点 IP。 (我 x
出于隐私的实际 IP 值)
bootstrap.servers=172.x.x.x:9092,172.x.x.x:9092,172.x.x.x:9092
我的 Kafka 代理配置了 /etc/kafka/server.properties
设置:
listeners=PLAINTEXT://0.0.0.0:9092
# EC2 public hostname
advertised.listeners=PLAINTEXT://ec2-34-x-x-x.us-west-2.compute.amazonaws.com:9092
# EC2 internal/private hostnames. localhost entry will resolve to 127.0.1.1
zookeeper.connect=ip-172-x-x-x.us-west-2.compute.internal:2181,ip-172-x-x-x.us-west-2.compute.internal:2181,ip-172-x-x-x.us-west-2.compute.internal:2181
并且/etc/kafka/zookeeper.properties
配置为:
server.1=172.x.x.x:2888:3888
server.2=172.x.x.x:2888:3888
server.3=172.x.x.x:2888:3888
属性 rest.host.name
需要配置为 connect-distributed.properties
中每个实例的 IP 或主机名。集群负责人使用其余 api 来平衡集群中的任务,因此如果您不使用 8083,也请更新 rest.host.port
。
# 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=8083