ECONNREFUSED
node
network_error
ai_generated
true
Error: connect ECONNREFUSED 127.0.0.1:3000
ID: node/econnrefused
85%Fix Rate
88%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 20 | active | — | — | — |
Root Cause
Target server is not running or not accepting connections on the expected port.
genericOfficial Documentation
https://nodejs.org/api/errors.html#common-system-errorsWorkarounds
-
95% success Verify the target service is running: check process, port, and network
lsof -i :3000 || netstat -tlnp | grep 3000
Sources: https://nodejs.org/api/errors.html#common-system-errors
-
88% success In Docker/K8s: use service name instead of localhost, check network connectivity
use service name instead of localhost, check network connectivity
Sources: https://docs.docker.com/network/
Dead Ends
Common approaches that don't work:
-
Increase connection timeout
80% fail
Server isn't running — waiting longer won't help
-
Change to 0.0.0.0 binding
65% fail
Confuses listen address with connect address
Error Chain
Frequently confused with: