You are experiencing the following issue
I am seeing an ECONREFUSED error when:
- Sending a request in Postman
- Sending a request in Newman
- Running requests using the Collection Runner
- Monitoring an API
What to expect
- The ECONREFUSED error means that the request to establish a connection with another service was refused and that something blocks the request. There can be many reasons why your request is blocked. This can be for example a firewall, your Internet Service Provider (ISP), a typo in the URL, or the endpoint might be private. It can also be that the server IP address or the server’s domain the request is trying to reach cannot be found.
- The ECONREFUSED error is often caused by a Virtual Private Network (VPN) that in some cases is required by some API services or, in other cases, prevents you to reach an API service.
Try the troubleshooting steps below depending on your use case:
You experience the error after trying to reach a local service
- Take a look at your running processes on your computer, and make sure that the process for your server is active.
- Open the source code of the server and make sure that the URL and the port match your request configuration inside Postman.
- If you are using the Postman web app, make sure you have installed the Desktop Agent. The Desktop Agent is necessary for Postman to reach the local services running on your computer, as the requests will be routed through your own network.
The endpoint you are trying to reach is public
Switch off your VPN.
- If the ECONREFUSED error is not returned after switching your VPN, it’s likely that either the VPN is blocking the connection or the server is refusing a connection from the VPN’s IP address.
- If the issue persists after switching off your VPN, it’s possible that the request you are sending is invalid. Next, check the configuration of your request.
Check the configuration of your request
Compare the API documentation of the service you’re making a call to and check that your request is configured correctly:
- Check If your request URL doesn’t contain any typo. If the service requires to specify the port, make sure that you have set the correct port in the request URL.
- Check if the API requires you to be behind a VPN. If a VPN is required, make sure that your VPN is turned on.
If the issue persists after following the steps in the Unblock Yourself section, reach out to the service provider of the endpoint you are trying to make a call to.