Failed to submit message: 'Connection to APM Server timed out (url: http://apm-server:8200/intake/v2/events, timeout: 10000.0 seconds)

Kibana version:

Elasticsearch version: elastic-apm==6.13.2

APM Server version:

APM Agent language and version: python

Browser version: safari

Original install method (e.g. download page, yum, deb, from source, etc.) and version:

Fresh install or upgraded from other version?

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):

  1. Set up APM python agent: Monitoring AWS Lambda Python Functions | APM Python Agent Reference [6.x] | Elastic

  2. Set up client instance: API reference | APM Python Agent Reference [master] | Elastic

I used the above guides to set up the apm agent and client instance. But it's unable to produce the test message, instead I keep seeing the errors on my lambda logs, not sure why it's failing to connect.
[ERROR] 2023-01-26T22:08:53.457Z cebca8fc-5197-5996-b5d6-f4b0ada5cdd8 Failed to submit message: 'Connection to APM Server timed out (url: http://apm-server:8200/intake/v2/events, timeout: 10000.0 seconds)'
and
[ERROR] 2023-01-26T22:12:01.294Z da1a686a-16f3-5782-9b34-3426ea2dda72 dropping flushed data due to transport failure back-off

It appears you don't have your APM Server URL properly configured, as it's trying to send to http://apm-server:8200. Assuming you are using the Elastic APM AWS Lambda Extension, you should not be setting the ELASTIC_APM_SERVER_URL -- the default is correct for communicating with the extension.

Instead, you should be setting these environment variables:

ELASTIC_APM_LAMBDA_APM_SERVER = <YOUR-APM-SERVER-URL>     # this is your APM Server URL
ELASTIC_APM_SECRET_TOKEN      = <YOUR-APM-SECRET-TOKEN>   # this is your APM secret token
ELASTIC_APM_SEND_STRATEGY     = background

Hope that helps!

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