4

Confluent Kafka 实例通过 docker-compose 在我的 Debian 9 服务器上运行。我按照本教程启动并运行它。但是,控制中心会定期关闭。

sudo docker-compose ps给出以下输出:

control-center    /etc/confluent/docker/run        Exit 1

其余的 Confluent 服务保持正常运行。

检查 docker logs ( sudo docker-compose logs) 时,我可以看到它正在发送以下错误:

control-center     | INFO [Consumer clientId=_confluent-controlcenter-5-3-0-1-9de26cca-62ca-42d6-9d46-86731fc8109a-StreamThread-5-restore-consumer, groupId=null] Unsubscribed all topics or patterns and assigned partitions (org.apache.kafka.clients.consumer.KafkaConsumer)

编辑:发现更多日志:

control-center     | [2019-08-30 23:10:02,304] INFO [Consumer clientId=_confluent-controlcenter-5-3-0-1-39ae65e2-457c-4696-b592-504fe320038e-StreamThread-3-consumer, groupId=_confluent-controlcenter-5-3-0-1] Group coordinator broker:29092 (id: 2147483646 rack: null) is unavailable or invalid, will attempt rediscovery 

control-center     | [2019-08-30 22:38:39,291] INFO [Consumer clientId=_confluent-controlcenter-5-3-0-1-39ae65e2-457c-4696-b592-504fe320038e-StreamThread-8-consumer, groupId=_confluent-controlcenter-5-3-0-1] Attempt to heartbeat failed since group is rebalancing (org.apache.kafka.clients.consumer.internals.AbstractCoordinator)

编辑 2:docker 容器可用的内存:

NAME                  CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
ksql-datagen          0.00%               3.312MiB / 7.792GiB   0.04%               18.2kB / 2.11kB     92.8MB / 65.5kB     1
control-center        0.00%               0B / 0B               0.00%               0B / 0B             0B / 0B             0
ksql-cli              0.00%               484KiB / 7.792GiB     0.01%               19.6kB / 0B         41kB / 0B           1
ksql-server           0.36%               136MiB / 7.792GiB     1.70%               39.8MB / 34.5MB     210MB / 147kB       30
rest-proxy            0.12%               107.2MiB / 7.792GiB   1.34%               22.2kB / 2.41kB     72.6MB / 81.9kB     28
connect               0.60%               1.571GiB / 7.792GiB   20.16%              124MB / 110MB       1.04GB / 81.9kB     36
schema-registry       0.20%               176.8MiB / 7.792GiB   2.22%               40.2MB / 38.4MB     93.7MB / 156kB      32
broker                7.59%               621MiB / 7.792GiB     7.78%               573MB / 791MB       171MB / 335MB       73
zookeeper             0.10%               80.9MiB / 7.792GiB    1.01%               9.56MB / 8.99MB     38.4MB / 410kB      21

系统内存(命令:)free

              total        used        free      shared  buff/cache   available
Mem:     8366596096  6770286592   160227328   219533312  1436082176  1099268096
Swap:   34356588544  2301014016 32055574528

任何想法如何解决这一问题?

4

1 回答 1

0

当分配的内存非常少时会出现此错误。如果您使用的是 Docker Desktop,请增加内存。转到 Docker Desktop->Dashboard->Settings->Preferences->Resources->Advanced 并增加内存,一切就绪。

于 2021-09-03T09:09:09.910 回答