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

Error opening zip file or JAR manifest missing jmx_prometheus_javaagent.jar:9200:/jmx-prometheus-kafka-metrics.yaml #878

Closed
nkol2307 opened this issue Oct 3, 2023 · 5 comments

Comments

@nkol2307
Copy link

nkol2307 commented Oct 3, 2023

hi all we have an issue with .JAR file it is downloaded from this repo https://repo.maven.apache.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.20.0/jmx_prometheus_javaagent-0.20.0.jar

and indead .jar file doesn't have MAIN class definition

Screenshot 2023-10-03 at 13 38 44

we are starting it using
KAFKA_OPTS="-javaagent:..../jmx_prometheus_javaagent.jar=9200:...jmx-prometheus-kafka-metrics.yaml"

how is then possible to start this jar file if it doesn't contain main class

@nkol2307 nkol2307 changed the title Error opening zip file or JAR manifest missing jmx_prometheus_javaagent.jar:9200:/etc/kafka/jmx-prometheus-kafka-metrics.yaml Error opening zip file or JAR manifest missing jmx_prometheus_javaagent.jar:9200:/jmx-prometheus-kafka-metrics.yaml Oct 3, 2023
@dhoard
Copy link
Collaborator

dhoard commented Oct 3, 2023

Java agents hook into the JVM via the -javagent flag and do not have a Main-Class manifest attribute.

@nkol2307
Copy link
Author

nkol2307 commented Oct 3, 2023

Java agents hook into the JVM via the -javagent flag and do not have a Main-Class manifest attribute.

but why we then got this issue to open file jar with error JAR manifest missing with error that there is no main class
how we can resolve this
Screenshot 2023-10-03 at 15 54 57

@dhoard
Copy link
Collaborator

dhoard commented Oct 3, 2023

Can you provide the full command line for the process? ps -f <PID> > output.txt

@nkol2307
Copy link
Author

nkol2307 commented Oct 3, 2023

Can you provide the full command line for the process? ps -f <PID> > output.txt

-javaagent:/usr/bin/jmx_prometheus_javaagent.jar=9200:/etc/kafka/jmx-prometheus-kafka-metrics.yaml kafka.Kafka /usr/hdp/5.0.11.8/kafka/config/server.properties this part is releveant for us not whole java command

@dhoard
Copy link
Collaborator

dhoard commented Oct 3, 2023

The exporter jars are valid. Unzip correctly lists the contents and the MANIFEST.MF is correct. All integration tests pass.

This appears to be an application startup issue. Have you checked permissions on the jar and exporter YAML file related to the account running Kafka?

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

2 participants