gpt4 book ai didi

kubernetes - Kafka + Kubernetes + Helm + `/usr/bin/kafka-avro-console-consumer`吗?

转载 作者:行者123 更新时间:2023-12-02 12:06:01 25 4
gpt4 key购买 nike

如何在通过Confluent Helm Charts运行的Kafka中使用标准kafka-avro-console-consumer工具?建议用于运行cli实用程序的confluentinc/cp-kafka:5.0.0镜像不包含kafka-avro-console-consumer

如果我将 shell 注册到schema-registry pod中以使用kafka-avro-console-consumer

kubectl exec -it my-confluent-oss-cp-schema-registry-6c8546c86d-pjpmd -- /bin/bash

/usr/bin/kafka-avro-console-consumer --bootstrap-server my-confluent-oss-cp-kafka:9092 --topic my-test-avro-records --from-beginning

Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 5555; nested exception is:
java.net.BindException: Address already in use (Bind failed)
sun.management.AgentConfigurationError: java.rmi.server.ExportException: Port already in use: 5555; nested exception is:
java.net.BindException: Address already in use (Bind failed)
at sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:480)
at sun.management.Agent.startAgent(Agent.java:262)
at sun.management.Agent.startAgent(Agent.java:452)
Caused by: java.rmi.server.ExportException: Port already in use: 5555; nested exception is:
java.net.BindException: Address already in use (Bind failed)

最佳答案

java.rmi.server.ExportException: Port already in use: 5555;



听起来好像您已经通过 KAFKA_JMX_PORT变量在该容器中启用了JMX。

如果是这样,您将需要在运行任何其他Kafka脚本之前,通过在shell session 中将其导出(或 unset)导出为其他值来暂时覆盖该设置。

关于kubernetes - Kafka + Kubernetes + Helm + `/usr/bin/kafka-avro-console-consumer`吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52997194/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com