APM Server transport error (ECONNREFUSED)

hello, can you please advise? I have a nodejs app where I need to add an elastic agent. The application is running on a Fargate, What I did is that inside my dockerfile I wrote a script that will install and enroll this agent in this Fargate. I did the same on a POC and was working fine.
From Kibana it says that it's unhealth although its healthy on ELB. From cloudwatch I am getting ""message": "APM Server transport error (ECONNREFUSED): connect ECONNREFUSED" all the needed env variable are added into task definition. On my POC I was having this issue and was able to solve it by installing systemctl in order to restart elastic-agent service. Can you please advise? It is something related to SG?

Hi @jmd1 ,
the error indicates that the apm agent tries to connect to the apm-server on localhost - are they running inside the same docker container?

Genereally when running APM Server inside docker, you need to configure it to listen to all interfaces ( instead of localhost - please verify that this is configured properly, otherwise it won't be reachable.

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