I am trying to install the GCP Profiler agent for my app which runs in GKE, following instructions here: https://cloud.google.com/profiler/docs/profiling-java
I can't get past this error. Can someone help?
Could not find agent library /opt/cprof/profiler_java_agent.so in absolute path, with error: Error relocating /opt/cprof/profiler_java_agent.so: __pthread_key_create: initial-exec TLS resolves to dynamic definition in /opt/cprof/profiler_java_agent.so
This is the Dockerfile
FROM openjdk:8-jdk-alpine
RUN apk update && apk add --no-cache gcompat
RUN apk update && apk add --no-cache libc6-compat
WORKDIR /app
# The application's jar file
ARG JAR_FILE=target/example-svc-*.jar
# Add the application's jar to the container
ADD ${JAR_FILE} example-svc.jar
EXPOSE 5050
RUN mkdir -p /opt/cprof && \
wget -q -O- https://storage.googleapis.com/cloud-profiler/java/latest/profiler_java_agent.tar.gz \
| tar xzv -C /opt/cprof
ENTRYPOINT ["java", \
"-agentpath:/opt/cprof/profiler_java_agent.so=-cprof_service=example-svc,-cprof_service_version=0.0.1-SNAPSHOT", \
"-jar", "/app/example-svc.jar"]