Error: connect ECONNREFUSED 127.0.0.1:443

I got the following error: Error: connect ECONNREFUSED 127.0.0.1:443
I’m using windows 10 with WSL (Ubuntu 20.04)
I’m able to open the site with self signed certificate using any installed browser (Chrome, Firefox even Edge :smile:)
SSL Certificate verification and Proxy are turned off.
Any idea why this may happen?

Hi @hristo.angelov, welcome to the Postman Community :rocket:

Can you explain what you’re attempting to do in some more detail? In which context did you receive that error?

Here’s a nifty little guide on what sort of context will help us help you!

I’m accessing this page fine by any browser installed on my system.


When I try to get this page via postman it is not working

Here is the postman console

I’m using windows 10 with Ubuntu running under WSL2.
The host is described in hosts file pointing to both ipv4 (127.0.0.1) and ipv6 (::1) ip addresses.
Maybe this will help.

Hello,

I have exactly the same problem with:

  • WSL2 running Debian and self-signed certificate
  • Windows 10

That look like a bug of postman :frowning:

Same here with Ubuntu 20.04 running in WSL2

I have the same issue and can easily be duplicated. Setup WSL on Windows 10 with Ubuntu 18.04. Configure apache. Then in Windows add the hosts entries to the hosts file.

127.0.0.1 myname.localhost
::1 myname.localhost

Then try to access https://myname.localhost from Postman. Note: I have SSL setup.

Tell postman not to validate SSL but mine is valid anyhow. And tell postman not to use any proxy. I get the same issue with and without using system proxy.

Postman will give the error Error: connect ECONNREFUSED 127.0.0.1:443.

As a work around if you click on code and output it to curl it works in the command prompt. Note: Windows you need to change the single quote to double quote.

IE: ‘https://…’ to “https://…”

curl --location --request GET “https://myname.localhost

1 Like