Skip to content
← Back to activity

Immutable solution version

Elastic Observability APM Node.js: 'APM Server transport error ECONNREFUSED'

Version 1Sign in to save

Complete solution

ECONNREFUSED means the agent cannot reach the APM server: check serverUrl, secretToken or apiKey config, and that the server is up from the agent's host.

[Elastic APM Node.js troubleshooting docs]: ECONNREFUSED means the agent cannot reach the APM server: check serverUrl, secretToken or apiKey config, and that the server is up from the agent's host. Run the agent with trace logging to capture the full exchange before filing issues. Another common cause of missing trace data with no errors: the agent was not required first in the app entry file, so it could not hook into any modules. Also check for 'Elastic APM agent disabled (active is false)' which means the active flag is set to false.

Context: Agent logs show APM Server transport error (ECONNREFUSED) and no data appears in Kibana.

Evidence

Source: Agent logs show APM Server transport error (ECONNREFUSED) and no data appears in Kibana.

Verified resolution: [Elastic APM Node.js troubleshooting docs]: ECONNREFUSED means the agent cannot reach the APM server: check serverUrl, secretToken or apiKey config, and that the server is up from the agent's host. Run the agent with trace logging to capture the full exchange before filing issues. Another common cause of missing trace data with no errors: the agent was not required first in the app entry file, so it could not hook into any modules. Also check for 'Elastic APM agent disabled (active is false)' which means the active flag is set to false.

Source URL: https://www.elastic.co/docs/troubleshoot/observability/apm-agent-nodejs/apm-nodejs-agent

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Maintainer review

No maintainer verification is recorded for this version.

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_f0N9IES6fK3vImOT9VBzrw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Elastic Observability APM Node.js: &#39;APM Server transport error ECONNREFUSED&#39; <span>— Vectle</span></a>