简体   繁体   English

集群上的 Confluent 控制中心

[英]Confluent Control Center on a cluster

I've set up a basic three-server cluster of zookeeper and kafka version 5.4.0 using docker.我已经使用 docker 设置了一个基本的 Zookeeper 和 kafka 版本 5.4.0 的三服务器集群。 For zookeeper and kafka, I've specified all three of the bootstrap servers.对于 zookeeper 和 kafka,我已经指定了所有三个引导服务器。 I'm trying to set this up in a manner that allows for one server to go down and the cluster will still operate correctly.我试图以一种允许一台服务器宕机而集群仍能正常运行的方式进行设置。 I'm trying to get control center working and I'm running into problems.我正在尝试让控制中心正常工作,但遇到了问题。 First, it seems as though only one of the servers is successfully able to run control center, and only when i specify the bootstrap server it's running on rather than all three.首先,似乎只有一个服务器能够成功运行控制中心,并且只有当我指定引导服务器时,它才运行而不是所有三个服务器。 If I try to start control center on the other two servers, they fail to start and they continually log the following:如果我尝试在其他两台服务器上启动控制中心,它们将无法启动并不断记录以下内容:

INFO unable to get command store (io.confluent.command.CommandStore)

I'm not certain how best to get this done.我不确定如何最好地完成这项工作。 Since it may be helpful, I'm posting below my docker-compose files for the zookeeper/broker pair as well as the file for control center.由于它可能会有所帮助,我将在我的 docker-compose 文件下方发布 Zookeeper/broker 对以及控制中心的文件。 Please let me know if I've got anything misspecified or if you think a change is in order.如果我有任何错误指定的内容,或者您​​认为需要进行更改,请告诉我。

zookeeper/kafka broker docker-compose.yml (the others differ only by advertised listener IP): zookeeper/kafka 代理 docker-compose.yml(其他的仅因公布的侦听器 IP 不同而不同):

---
version: '2'
services:
  zookeeper:
    image: confluentinc/cp-zookeeper:5.4.0
    hostname: zookeeper
    container_name: zookeeper
    network_mode: host
    restart: always
    ports:
      - "2181:2181"
    environment:
      ZOOKEEPER_SERVER_ID: 2
      ZOOKEEPER_CLIENT_PORT: 2181
      ZOOKEEPER_TICK_TIME: 2000
      ZOOKEEPER_INIT_LIMIT: 5
      ZOOKEEPER_SYNC_LIMIT: 2
      ZOOKEEPER_SERVERS: "10.100.1.1:2888:3888;10.100.1.2:2888:3888;10.100.1.3:2888:3888"
    volumes:
      - ./zk-data:/var/lib/zookeeper/data
      - ./zk-txn-logs:/var/lib/zookeeper/log

  broker:
    image: confluentinc/cp-enterprise-kafka:5.4.0
    hostname: broker
    container_name: broker
    depends_on:
      - zookeeper
    network_mode: host
    restart: always
    ports:
      - "9092:9092"
    environment:
      KAFKA_BROKER_ID: 2
      KAFKA_ZOOKEEPER_CONNECT: '10.100.1.1:2181,10.100.1.2:2181,10.100.1.3:2181'
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT
      KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://10.100.1.1:9092"
      KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
      KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
      CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: 10.100.1.1:9092,10.100.1.2:9092,10.100.1.3:9092
      CONFLUENT_METRICS_REPORTER_ZOOKEEPER_CONNECT: 10.100.1.1:2181,10.100.1.2:2181,10.100.1.3:2181
      CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 2
      CONFLUENT_METRICS_ENABLE: 'true'
      CONFLUENT_SUPPORT_CUSTOMER_ID: 'anonymous'
    volumes:
      - ./kafka-data:/var/lib/kafka/data

control center docker-compose.yml:控制中心 docker-compose.yml:

---
version: '2'
services:
  control-center:
    image: confluentinc/cp-enterprise-control-center:5.4.0
    hostname: control-center
    container_name: control-center
    network_mode: host
    restart: always
    ports:
      - "9021:9021"
    environment:
      CONTROL_CENTER_BOOTSTRAP_SERVERS: '10.100.1.1:9092'
      CONTROL_CENTER_ZOOKEEPER_CONNECT: '10.100.1.1:2181'
      CONTROL_CENTER_REPLICATION_FACTOR: 1
      CONTROL_CENTER_INTERNAL_TOPICS_PARTITIONS: 1
      CONTROL_CENTER_MONITORING_INTERCEPTOR_TOPIC_PARTITIONS: 1
      CONFLUENT_METRICS_TOPIC_REPLICATION: 1
      PORT: 9021
    volumes:
      - ./control-center:/var/lib/confluent-control-center

1) remove network_mode: host 1)删除network_mode: host

2l Add control center to the same compose file 2l 将控制中心添加到同一个撰写文件中

3) use zookeeper:2181 for the Zookeeper connection strings and kafka:9092 for the bootstrap servers. 3) Zookeeper 连接字符串使用zookeeper:2181 ,引导服务器使用kafka:9092 I don't think metrics reporters or control center have a Zookeeper property我认为指标记者或控制中心没有 Zookeeper 属性


If you want to create a cluster of containers, then you probably want to take a look at the Confluent Helm Charts rather than the Docker compose files如果你想创建一个容器集群,那么你可能想看看 Confluent Helm Charts 而不是 Docker compose files

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 融合控制中心未显示系统运行状况(对于多集群配置) - Confluent Control center not showing system health (for a Multi-Cluster Configuration) Confluent 控制中心通过“exit 1”定期关闭 - Confluent Control Center shutting down periodically with "exit 1" 在 Confluent 控制中心找不到连接器 - Can not find connectors in Confluent control center 为什么 http://localhost:9021/ 没有打开 Confluent 控制中心? - Why is http://localhost:9021/ not opening the Confluent Control Center? Confluent 控制中心未启动 cp-all-in-one docker 文件 - Confluent Control Center not starting for cp-all-in-one docker file Apple M1:无法使用 docker 启动融合控制中心 - Apple M1: can't start the confluent control center using docker 在 Redhat Enterprise 7.X VMware 中的 docker 容器上部署 kafka 集群时无法打开控制中心浏览器 - unable to open control center browser when kafka cluster deployed on docker containers in redhat enterprise 7.X VMware 将控制组规则应用于Kubernetes集群中的特定(或所有)Docker容器 - Apply control group rule to specific (or all) Docker containers in Kubernetes cluster Confluent 的 Docker 镜像 - 添加 Confluent Hub 连接器 - Docker image for Confluent - adding Confluent Hub connectors kubectl cluster-info 为什么在控制平面而不是主节点上运行 - kubectl cluster-info why is running on control plane and not master node
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM