I'm trying to follow this simple guide to get APM up and working with docker-compose
I was able to do all the steps. My only issue is that the python app container gives the error:
docker logs es-cluster-webapp-1
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
Failed to submit message: 'Connection to APM Server timed out (url: http://fleet-server:8200/intake/v2/events, timeout: 5 seconds)'
Failed to submit message: 'Connection to APM Server timed out (url: http://fleet-server:8200/intake/v2/events, timeout: 5 seconds)'
Failed to submit message: 'Connection to APM Server timed out (url: http://fleet-server:8200/intake/v2/events, timeout: 5 seconds)'
Failed to submit message: 'Connection to APM Server timed out (url: http://fleet-server:8200/intake/v2/events, timeout: 5 seconds)'
Failed to submit message: 'Connection to APM Server timed out (url: http://fleet-server:8200/intake/v2/events, timeout: 5 seconds)'
Failed to submit message: 'Connection to APM Server timed out (url: http://fleet-server:8200/intake/v2/events, timeout: 5 seconds)'
Everything else about this tutorial works, the agent is submitting mem+cpu information and showing metric, the fleet server says healthy etc... Just my web app container can't connect to the fleet server. I tried restarting the container, I tried restarting the entire docker-compose, but it is still the same result.
Where I can I go to get information on why the webapp container can't connect to APM? Or even better, what did I need to do to make the python app submit data to the APM server?
Just to summarize, these are the steps I followed from the guide
git clone https://github.com/elkninja/elastic-stack-docker-part-two.git
cd elastic-stack-docker-part-two
docker-compose up --build -d
docker cp es-cluster-es01-1:/usr/share/elasticsearch/config/certs/ca/ca.crt /tmp/.
openssl x509 -fingerprint -sha256 -noout -in /tmp/ca.crt | awk -F"=" {' print $2 '} | sed s/://g
cat /tmp/ca.crt
Then I pasted the following information into Kibana's Fleet Server Settings (as instructed by the tutorial)
HOSTS:
https://es01:9200/
FINGERPRINT:
DBF32B7752D6C345BA087FA55A47BF6D35CFEACBFC1577E5D8BDF77C6AF0CA2C
ADVANCE YML
ssl:
certificate_authorities:
- |
-----BEGIN CERTIFICATE-----
MIIDSjCCAjKgAwIBAgIVAP9hxK7zF+B1IgZJoQAPHxAVetP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WMs+dgPS6omYkfMXN3UPSyXBqKKCEv
-----END CERTIFICATE-----
I pressed save and deploy. Then I see metrics and healthy status for the elastic agent. But no APM results appear in my Kibana, and when I do the docker logs es-cluster-webapp-1
, I just see the time out issue.
What did I do wrong? Or how do I get more information on the timeout issue?
Here is a 3 min video of me doing all of these steps:
What did I miss?