kafka+kubernetes+helm+`/usr/bin/kafka avro console consumer`?

4ioopgfo  于 2021-06-06  发布在  Kafka
关注(0)|答案(1)|浏览(638)

如何使用标准 kafka-avro-console-consumer Kafka通过合流舵图运行的工具?这个 confluentinc/cp-kafka:5.0.0 建议用于运行cli实用程序的映像不包含 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)

zvokhttg

zvokhttg1#

java.rmi.server.exportexception:端口已在使用:5555;
听起来您已经通过启用了jmx作为容器的一部分 KAFKA_JMX_PORT 变量。
如果是这种情况,则需要通过导出(或 unset )在运行任何其他kafka脚本之前,它会在shell会话中设置一个不同的值

相关问题