I'm running a docker container based on gliderlabs/alpine:3.3, which then has a JVM app that I'd like to connect yourkit up to. After installing libc6-compat on the container, I still get errors trying to start the agent:
# ./yjp.sh -attach 12
(bunch of stuff)
Caused by: java.lang.UnsatisfiedLinkError: /YourKit-JavaProfiler-2017.02/bin/linux-x86-64/libyjpagent.so: Error relocating /YourKit-JavaProfiler-2017.02/bin/linux-x86-64/libyjpagent.so: backtrace_symbols: symbol not found
We're considering Alpine Linux support, so could you please answer a few questions:
- On which platform(s) do you want to profile on Alpine? Will x86_64 be enough?
- Which Java version do you use? Could you please provide the output of "java -version".
We've tried the latest Alpine Linux 3.7.0 (Released Nov 30, 2017) for x86_64. It works for us with YourKit Java Profiler just fine after installing libc6-compat:
Both the profiler agent and the profiler UI seem to work. At least we didn't notice any problem after short testing.
To let it work with the current profiler build of version 2017.02, we had to remove the directory <YourKit installation directory>/jre64 containing a bundled JRE for a "normal" Linux which is incompatible with Alpine, to ensure that existing yjp.sh and other profiler scripts use the Java installed on your system.
@veritas:
We also found other people experiencing similar "symbol not found" issues (with other software, not with the profiler) with docker on Alpine. Adding the following snippet to the docker file helped them: https://github.com/jeanblanchard/docker ... Dockerfile
[Edited] It seems we've created a better solution. Please see my comments below.
Another big vote for Alpine support. If your hoping to keep us YK fans happy then Alpine + Docker support is critical. FWIW the above workaround seems to work but it's going to be hard to convince people that we need to update our Dockerfile to get YK to work ... when I don't need to do the same for JProfiler.
I've been a YK fan for many years and brought it in to our tool set at a number of previous companies. Your making it a hard sell today without easy support for Alpine. Here's hoping you can offer a quick - clean -
solution.
As for previous questions, X86 64 bit and Java is:
Things are looking good - copying libyjpagent.so into /YourKit-JavaProfiler-2017.02/bin/linux-x86-64/ makes the loader happy (libc6-compat is also required, of course):