Google Cloud Stackdriver Profiler GKE 安装
Google Cloud Stackdriver Profiler GKE installation
我在 Google Kubernetes Engine 上有一个 java dropwizard 微服务 运行ning。
我正在尝试将 stackdriver profiler 集成到我的项目中。
我按照官方文档中的描述添加了代理。当我尝试 运行 我的 docker 容器时,出现以下错误:
Error occurred during initialization of VM
Could not find agent library /opt/cprof/profiler_java_agent.so in absolute path, with error: Error relocating /opt/cprof/profiler_java_agent.so: __printf_chk: symbol not found
这是我的docker文件:
FROM java:openjdk-8-jre-alpine
COPY build/libs/com.company.my-api-*.jar /opt/app/com.company.my-api.jar
COPY config.yml /opt/app/config.yml
RUN apk update \
&& apk add ca-certificates wget libc6-compat \
&& update-ca-certificates
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
WORKDIR /opt/app/
EXPOSE 8028
ENTRYPOINT ["java", "-agentpath:/opt/cprof/profiler_java_agent.so=-cprof_service=myApi,-logtostderr", "-jar", "com.companyny-api.jar", "server", "config.yml"]
有什么想法吗?
我在 Google Kubernetes Engine 上有一个 java dropwizard 微服务 运行ning。 我正在尝试将 stackdriver profiler 集成到我的项目中。
我按照官方文档中的描述添加了代理。当我尝试 运行 我的 docker 容器时,出现以下错误:
Error occurred during initialization of VM
Could not find agent library /opt/cprof/profiler_java_agent.so in absolute path, with error: Error relocating /opt/cprof/profiler_java_agent.so: __printf_chk: symbol not found
这是我的docker文件:
FROM java:openjdk-8-jre-alpine
COPY build/libs/com.company.my-api-*.jar /opt/app/com.company.my-api.jar
COPY config.yml /opt/app/config.yml
RUN apk update \
&& apk add ca-certificates wget libc6-compat \
&& update-ca-certificates
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
WORKDIR /opt/app/
EXPOSE 8028
ENTRYPOINT ["java", "-agentpath:/opt/cprof/profiler_java_agent.so=-cprof_service=myApi,-logtostderr", "-jar", "com.companyny-api.jar", "server", "config.yml"]
有什么想法吗?