Java agent configuration for Alpine 3.3 based OpenJDK image
Closed this issue · 8 comments
Hi,
I'm trying to configure the DT agent for a Spring boot app running in a Alpine 3.3 based OpenJDK 7 image. I'm installing the required the glibc dependency in my image and mounting a volume which has the libdtagent.so. But I get the following error when running a container based of that image.
Error occurred during initialization of VM Could not find agent library /apps/Dynatrace/agent/lib64/libdtagent.so in absolute path, with error: Error relocating /apps/Dynatrace/agent/l ib64/libdtagent.so: __isnan: symbol not found
Here is how I'm installing the glibc deps.
mkdir /tmp/apk \
&& curl -o /tmp/apk/glibc-2.21-r2.apk "https://<registry>/artifactory/apk-local/v3.2/custom/x86_64/glibc-2.21-r2.apk" \
&& curl -o /tmp/apk/glibc-bin-2.21-r2.apk "https://<registry>/artifactory/apk-local/v3.2/custom/x86_64/glibc-bin-2.21-r2.apk" \
&& apk add --no-cache libgcc \
&& apk add --allow-untrusted /tmp/apk/glibc-2.21-r2.apk \
&& apk add --allow-untrusted /tmp/apk/glibc-bin-2.21-r2.apk \
&& /usr/glibc/usr/bin/ldconfig /lib /usr/glibc/usr/lib \
&& echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf \
I am getting the same error using Dynatrace-Agent slim, and adding my application in that dockerfile, and running it.
Why is this happening?
@grabnerandi do you know if anyone has knowledge of this problem? I find it kind of odd to have this problem and yet there is a Dockefile.slim in the dynatrace-docker project
Hi @jimonreal. Such things are better handled on answers.dynatrace.com. I do not have an immediate answer, but it seems like OpenJDK on Alpine has a tight dependency on musl and the current agent version does not yet support musl libc (we do have an agent in beta mode though).
Hi,
Did anyone implemented dynatrace agent running on alpine linux. above posts shows some errors, is it resolved ?
We are also trying to implement same and using docker slim file.
Thanks
Hi,
Dynatrace agent is not working on Alpine Linux and giving below error. can you please share the beta agent if available.
Could not find agent library /dynatrace/agent/lib64/libdtagent.so in absolute path, with error: Error relocating /dynatrace/agent/lib64/libdtagent.so: __isnan: symbol not found
We've updated our community documentation on Monitoring Dockerized Apps with Dynatrace AppMon with a Q&A section on how to integrate with Alpine-based Docker images. Helpful? Looking forward to reading your feedback!
@ramrei we've answered your request via email!
@dtmistry @jimonreal @ramrei
In EAP_7.0.0.2346 version we use Alpine 3.5 by default and agent libraries are no longer an issue. From what we found the cause was in Alpine 3.3. Please play with it and we're looking forward to your feedback!