Error opening zip file or JAR manifest missing : /home/ec2-user/elastic-apm-agent-1.36.0.jar
agent library failed to init: instrument
This means that the JVM couldn't find the jar at this path: /home/ec2-user/elastic-apm-agent-1.36.0.jar. Please make sure you set your command line properly.
I don't know why the below says: -javaagent:/home/ec2-user/elastic-apm-agent-1.16.0.jar, the error would have been for 1.16.0. I am also not sure if what you provided is trimmed in the middle, or you really didn't set a value to the -Delastic.apm.service_name system property.
This should be an easy fix, it is only a matter of getting the command line right.
Feb 13 05:38:33 ip-10-0-1-5.us-west-2.compute.internal server[6037]: arguments used: start
Feb 13 05:38:33 ip-10-0-1-5.us-west-2.compute.internal server[6037]: Error opening zip file or JAR manifest missing : /var/lib/tomcat/webapps/elastic-apm-agent-1.36.0.jar -Delastic.apm.service_name
Feb 13 05:38:33 ip-10-0-1-5.us-west-2.compute.internal server[6037]: Error occurred during initialization of VM
Feb 13 05:38:33 ip-10-0-1-5.us-west-2.compute.internal server[6037]: agent library failed to init: instrument
I am not familiar with JVM_OPTIONS, so I cannot say whether this is the right one.
I normally use CATALINA_OPTS, which is appended only when using the startup script with start.
In your last comment there is a bigger problem, where you added the agent to the webapps folder.
The agent jar should never be loaded by the application other than through the -javaagent command! Make sure you move it from the webapps folder and any other folder from which jars are loaded by the app. It should also not be a dependency anywhere in your project.
Please revert all changes you did, move the agent to a separate directory (like /home/ec2-user/elastic-apm-agent-1.36.0.jar) and follow our documentation. This should work. Your errors clearly indicate that the command line that gets built by the startup script is erroneous, so you will have to make sure you get it right.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.