Elastic APM JAVA Agent not sending out any information

Hello,

I am trying to attach JAVA APM Agent with my SpringBoot Application manually. I am using the generic setup for doing this:

java -javaagent:/root/elastic-apm-agent-1.7.0.jar -Delastic.apm.service_name=AZS-FE-APM-AGENT-JAVA -Delastic.apm.application_packages=org.****** -Delastic.apm.server_urls=http://apm-server-service.mon.svc.cluster.local:8200 -jar amp-azs-fe-1.0.1.jar

This application is dockerized & /root is my working directory. I have copied the the elastic-apm-agent, my-application-jar & the startup-script in this working directory.

My startup-script looks something like this:

#!bin/busybox
echo "Deploying AzS-FE Application....."
java -javaagent:/root/elastic-apm-agent-1.7.0.jar -Delastic.apm.service_name=AZS-FE-APM-AGENT-JAVA -Delastic.apm.application_packages=org.**** -Delastic.apm.server_urls=http://apm-server-service.mon.svc.cluster.local:8200 -jar amp-azs-fe-1.0.1.jar
echo "Deployment process complete...."
sleep 5
tail -f /root/logs/events.log

& my DockerFile looks like this:

FROM java:openjdk-8-jre-alpine
RUN cd /root && mkdir logs
COPY target/amp-azs-fe-1.0.1.jar /root/amp-azs-fe-1.0.1.jar
COPY elastic-apm-agent-1.7.0.jar /root/elastic-apm-agent-1.7.0.jar
COPY azs-fe_start.sh /root
ENV LOGROOT /root/logs
WORKDIR /root
ENTRYPOINT ["sh","azs-fe_start.sh"]

I feel that somehow Tomcat is not getting instrumented with this agent.

These are the file permissions for the above file in my container:

~ # pwd
/root
~ # ls -ltr
total 29656
-rw-r--r--    1 root     root       4857209 Aug  2 16:46 elastic-apm-agent-1.7.0.jar
-rw-r--r--    1 root     root           382 Aug  2 16:46 azs-fe_start.sh
-rw-r--r--    1 root     root      25501343 Aug  2 16:47 amp-azs-fe-1.0.1.jar
drwxr-xr-x    2 root     root          4096 Aug  2 16:47 logs
~ #

I am pretty sure that I might be missing some bridge variables here. Any suggestions would help. Thanks in advance!

Could you upload your debug logs? See also https://www.elastic.co/guide/en/apm/agent/java/master/trouble-shooting.html

Hello Felix, thanks a lot for responding!

It seems the agent has not even been initiated as per the logs. As the logs that I see are just related to my native application.

Anyways, I can see the agent on Kibana APM UI, the problem is just that it is not sending any data [transactions, events, etc]

Let me debug on my end that if it has to do something with the framework version, I am pretty sure that it shouldn't be the case.

Looking forward to your response!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.