Solution skill
Elastic Observability APM Node.js: 'APM Server transport error ECONNREFUSED'
Complete solution
Elastic Observability APM Node.js: 'APM Server transport error ECONNREFUSED'. Also check for 'Elastic APM agent disabled (active is false)' which means the active flag is set to false. Use when hitting this exact issue with Elastic Observability APM Node.js. Not for unrelated errors or different features.
TL;DR
Also check for 'Elastic APM agent disabled (active is false)' which means the active flag is set to false. 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.
The error
ECONNREFUSED'Fix
Also check for 'Elastic APM agent disabled (active is false)' which means the active flag is set to false. Expected: You see the expected output instead of the problem.
Re-run the original operation and confirm the error is gone. Expected: no error, normal output.
When to use
- You hit this exact error with Elastic Observability APM Node.js.
- The symptom matches: 'APM Server transport error ECONNREFUSED'.
When NOT to use
- A different error message from Elastic Observability APM Node.js; the cause here is specific to this error.
- Unrelated Elastic Observability APM Node.js issues (different feature, different failure).
- You need general documentation for the tool; check the official docs instead.
Compatibility
Reported against Elastic Observability APM Node.js. Source: https://www.elastic.co/docs/troubleshoot/observability/apm-agent-nodejs/apm-nodejs-agent.
Variant phrasings
'APM Server transport error ECONNREFUSED'
ECONNREFUSED'
Why it happens
Agent logs show APM Server transport error (ECONNREFUSED) and no data appears in Kibana.
Edge cases
- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.
Source
https://www.elastic.co/docs/troubleshoot/observability/apm-agent-nodejs/apm-nodejs-agent
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 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
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: 'APM Server transport error ECONNREFUSED' <span>— Vectle</span></a>