2

Java 11 and yourkit 2020.9 working for me. Made upgrade to java 17 and yourkit 2021.11, yourkit not working for me.

Used this doc: https://www.yourkit.com/docs/java/help/docker.jsp to add yourkit 2021.11 to docker but getting error when running it:

[YourKit Java Profiler 2021.11-b220] Log file: /home/kek/.yjp/log/test-8.log
terminate called after throwing an instance of 'std::system_error'
what():  No error information

How I can see what inside of /home/kek/.yjp/log/test-8.logor does java 17 and yourkit 2021.11 work for you?

Serhii Zadorozhnyi
  • 576
  • 2
  • 8
  • 25
  • 1
    It works for me without any issues. Are you sure you updated `libyjpagent.so` ? – Mirek Pluta Dec 03 '21 at 08:33
  • this file exists inside of yourkit.zip under bin folder, should i copy it somewhere else? – Serhii Zadorozhnyi Dec 03 '21 at 08:40
  • 2
    `libyjpagent.so` is the only file that you have to deploy together with your application, it just has to be in such a location so that you can reference it from run script. I.e if it's in `libs` directory you'd add `-agentpath:./libs/libyjpagent.so=port=` to the param list when running java. – Mirek Pluta Dec 03 '21 at 08:43
  • I did but getting error mentioned above – Serhii Zadorozhnyi Dec 03 '21 at 08:48
  • Then you'll have to check that log file. What do you mean by "How I can see what inside of ..." ? Do you mean, how to open file that is within the docker container? If you have access to that machine then you can run a bash command to get "inside" of container, i.e. `docker exec -it bash`. – Mirek Pluta Dec 03 '21 at 08:55
  • Appearently `yourkit 2021.11` should work on Java 17... I followed [Yourkit Profiling in Docker container](https://www.yourkit.com/docs/java/help/docker.jsp) instructions but I have the same issue here. – mdaliyan Dec 03 '21 at 08:59
  • I meant that docker crashing with error and can't get inside of the container to see what's inside, I thought if I can check what was inside of the file might give me some hints why it's happening – Serhii Zadorozhnyi Dec 03 '21 at 09:05
  • You can mount local directory to the path within container, so that everything that app in the container writes in there you could access outside of the container as well. – Mirek Pluta Dec 03 '21 at 09:11
  • thanks, forgot about this option, will try – Serhii Zadorozhnyi Dec 03 '21 at 09:11

2 Answers2

1

The issue was that azul/zulu-openjdk-alpine:17-jre-headless and yourkit not compatible, some library were not there for yourkit(didn't dig much), so by moving to azul/zulu-openjdk-debian:17-jre-headless fixed incompatibility for me.

Serhii Zadorozhnyi
  • 576
  • 2
  • 8
  • 25
1

There might be problems with v2021.11 in musl-based Linuxes. Please use v2022.3 which has special profiling agent for musl https://www.yourkit.com/docs/java/help/docker.jsp