Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Yourkit profiler not starting up with docker adoptopenjdk

Moderators: Vladimir Kondratyev, Anton Katilin

Yourkit profiler not starting up with docker adoptopenjdk

Postby tbohnen » Thu Aug 01, 2019 10:43 am

Hi

I'm getting the following error when trying to run YourKit agent within docker:

Code: Select all
Error opening zip file or JAR manifest missing : /usr/local/YourKit-JavaProfiler-2019.1/bin/linux-x86-64/libyjpagent.so
Error occurred during initialization of VM
agent library failed to init: instrument


Running Docker image: FROM adoptopenjdk:11.0.3_7-jre-hotspot-bionic

Not sure what I'm doing wrong.

Extra info:
Code: Select all
ldd libyjpagent.so
   linux-vdso.so.1 (0x00007fff97c6e000)
   librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fd8b2245000)
   libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd8b2041000)
   libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd8b1ca3000)
   libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd8b18b2000)
   /lib64/ld-linux-x86-64.so.2 (0x00007fd8b29f1000)
   libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd8b1693000)
tbohnen
 
Posts: 3
Joined: Thu Aug 01, 2019 10:03 am

Re: Yourkit profiler not starting up with docker adoptopenjd

Postby Anton Katilin » Thu Aug 01, 2019 11:12 am

What is the platform ("uname -a")?
What is the output of "java -version"?
Error opening zip file or JAR manifest missing

The error message is strange, it looks like the JVM wants to open the agent library as a ZIP/JAR which is wrong. How do you specify the agent in command line? It should be -agentpath:<path to .so>, and it should be among other JVM options like -Xmx or -D.

See profiling in docker instructions for detail:
https://www.yourkit.com/docs/java/help/docker.jsp
Anton Katilin
 
Posts: 5824
Joined: Wed Aug 11, 2004 8:37 am

Re: Yourkit profiler not starting up with docker adoptopenjd

Postby tbohnen » Thu Aug 01, 2019 11:26 am

Thanks. I used the docker links as reference. Just to add, I'm running in k8s but don't think that will make a difference. It could be a typo but I checked and it isn't. I've also confirmed that the agent is in that path.

This is my command:
Code: Select all
java -javaagent:/usr/local/YourKit-JavaProfiler-2019.1/bin/linux-x86-64/libyjpagent.so=port=10001,listen=all -cp run.ja org....
tbohnen
 
Posts: 3
Joined: Thu Aug 01, 2019 10:03 am

Re: Yourkit profiler not starting up with docker adoptopenjd

Postby Ilya Kalikin » Thu Aug 01, 2019 11:34 am

The command should be:
Code: Select all
java -agentpath:/usr/local/YourKit-JavaProfiler-2019.1/bin/linux-x86-64/libyjpagent.so=port=10001,listen=all -cp run.ja org....

Note agentpath instead of javaagent. Please refer to this help topic.
Ilya Kalikin
 
Posts: 11
Joined: Mon Jun 12, 2017 3:06 pm

Re: Yourkit profiler not starting up with docker adoptopenjd

Postby tbohnen » Thu Aug 01, 2019 11:47 am

Thanks. I'm changing from another agent and obviously didn't check that that was the same. Works now :-)
tbohnen
 
Posts: 3
Joined: Thu Aug 01, 2019 10:03 am

Re: Yourkit profiler not starting up with docker adoptopenjd

Postby Anton Katilin » Thu Aug 01, 2019 12:28 pm

Thank you for the confirmation.
Anton Katilin
 
Posts: 5824
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: Google [Bot] and 13 guests

cron