I cannot connect to APM server using SpringBoot and Tomcat : I run the docker-compose file from GitHub - elastic/apm-server: APM Server , and added the following configuration to my run configuration in Inteliij IDEA :
2023-03-14 10:07:09,564 [main] INFO co.elastic.apm.agent.util.JmxUtils - Found JVM-specific OperatingSystemMXBean interface: com.sun.management.OperatingSystemMXBean
2023-03-14 10:07:09,610 [main] INFO co.elastic.apm.agent.util.JmxUtils - Found JVM-specific ThreadMXBean interface: com.sun.management.ThreadMXBean
2023-03-14 10:07:09,641 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.36.0 as juno-local-dev on Java 11.0.18 Runtime version: 11.0.18+10-LTS VM version: 11.0.18+10-LTS (Amazon.com Inc.) Mac OS X 13.2.1
2023-03-14 10:07:09,642 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - service_name: 'juno-local-dev' (source: Java System Properties)
2023-03-14 10:07:09,643 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - environment: 'dev' (source: Java System Properties)
2023-03-14 10:07:09,643 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - server_url: 'http://localhost:8220' (source: Java System Properties)
2023-03-14 10:07:09,643 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - application_packages: 'com.example.juno' (source: Java System Properties)
2023-03-14 10:07:12,870 [main] INFO co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to RUNNING state
2023-03-14 10:07:12,997 [elastic-apm-server-healthcheck] WARN co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server http://localhost:8220/ is not available (Server returned status 400)
The Java application is running outside the container, on the IDE.
And the 8220 port is publicly available outside the container (see docker-compose.yml). HTTP 400 means that I reached the fleet endpoint in some way.
Therefore I think this is not the problem.
I'm sorry (newbie here), there was no error. I eventually realized I did not create an APM server. I was contacting the Fleet Server instead of the APM server. I thought the APM server was embedded in the fleet docker, at that time I had not correctly understood the architecture.
I added an APM docker in the stack, and it worked. Thank you for you answers.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.