Error opening zip file or JAR manifest missing : elastic-apm-agent-1.12.0.jar

I am getting an error trying to run the following command in linux to run the APM application agent:
sudo java -javaagent:elastic-apm-agent-1.12.0.jar
The error is as follows:
Error opening zip file or JAR manifest missing : elastic-apm-agent-1.12.0.jar
Error occurred during initialization of VM
agent library failed to init: instrument

I have given all permissiions to the folder/file
-rwxrwxrwx. 1 root root 134 Apr 1 17:28 elastic-apm-agent-1.12.0.jar

Any clues how do I resolve?

Is this the entire command line?
elastic-apm-agent.jar is not an executable Java app, it is a jar added to the command line when running your Java app. apm-agent-attach-standalone.jar is an executable Java that may be used to remotely attach to another JVM.
See setup instructions for details.

Below is the entire command line:
sudo java -javaagent:elastic-apm-agent-1.12.0.jar
-Delastic.apm.service_name=petclinic-java
-Delastic.apm.server_urls=https://localhost:8200
-Delastic.apm.secret_token=
-Delastic.apm.application_packages=co.elastic.apm.petclient
-jar spring-petclinic-2.4.2.jar

However, the error happens at 1st line as stated previously.

Tried as suggested by you from the below link with no success:

I am a novice at Java

Not sure what happened, but it seems to be working now.

I re-downloaded the file from the URL below and it seems to be fine now:
wget https://search.maven.org/remotecontent?filepath=co/elastic/apm/elastic-apm-agent/1.22.0/elastic-apm-agent-1.22.0.jar

Thanks

:+1:
Glad to hear!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.