Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jmx exporter inside Confluent Kafka broker container #954

Open
lijie123bes opened this issue May 6, 2024 · 2 comments
Open

jmx exporter inside Confluent Kafka broker container #954

lijie123bes opened this issue May 6, 2024 · 2 comments

Comments

@lijie123bes
Copy link

I'm using the following Kafka container (as a part of docker-compose.yml)

broker:
    image: confluentinc/cp-kafka:6.0.1
    hostname: broker
    container_name: broker
    depends_on:
      - zookeeper
    ports:
      - "29092:29092"
      - "9092:9092"
      - "9101:9101"
    environment:
      KAFKA_BROKER_ID: 1
      KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
      KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
      KAFKA_JMX_PORT: 9101
      KAFKA_JMX_HOSTNAME: localhost
      EXTRA_ARGS: '-javaagent:/usr/share/jmx-exporter/jmx_prometheus_javaagent-0.15.0.jar=7101:/etc/jmx-exporter/config.yml'
    volumes:
      - ./kafka/data:/var/lib/kafka/data
      - ./jmx-exporter/kafka-2_0_0.yml:/etc/jmx_exporter/config.yml
      - ./jmx-exporter/jar:/usr/share/jmx_exporter/

Jmx exporter causes container to crash, here are the logs:

===> Launching ... 
===> Launching kafka ... 
Error occurred during initialization of VM
Error opening zip file or JAR manifest missing : /usr/share/jmx-exporter/jmx_prometheus_javaagent-0.15.0.jar
agent library failed to init: instrument

I verified jmx exporter jar and it's config to be available inside container.

jmx_prometheus_javaagent-0.15.0.jar has been downloaded from here: github.com/prometheus/jmx_exporter

Any ideas?

@JasirVoriya
Copy link

I encountered the same issue

@dhoard dhoard self-assigned this May 6, 2024
@dhoard
Copy link
Collaborator

dhoard commented May 6, 2024

This is a configuration issue. You will need to look at your ultimate command line to launch the Confluent Platform server (Kafka.)

Also, 0.15.0 is old (released on 2021-01-25.) I suggest you upgrade to the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants