vscode-restclient
vscode-restclient copied to clipboard
connection rejected
The connection was rejected. Either the requested service isn’t running on the requested server/port, the proxy settings in vscode are misconfigured, or a firewall is blocking requests. Details: RequestError: connect ECONNREFUSED 127.0.0.1:3000.

@FabrizioB94 could you confirm that your local machine is listening to the port 3000?
I got the same error,but my error port is 443.
Error Message
The connection was rejected. Either the requested service isn’t running on the requested server/port, the proxy settings in vscode are misconfigured, or a firewall is blocking requests. Details: RequestError: connect ECONNREFUSED 127.0.0.1:443.
Version vscode 1.53.0 win10 rest Client 0.24.4
I got the same error,but my error port is 443.
Error Message The connection was rejected. Either the requested service isn’t running on the requested server/port, the proxy settings in vscode are misconfigured, or a firewall is blocking requests. Details: RequestError: connect ECONNREFUSED 127.0.0.1:443.
Version vscode 1.53.0 win10 rest Client 0.24.4
It's worked suddenly !
What did you do? I have the same problem
I have the same problem:
GET http://localhost:3000 HTTP/1.1
will result in:
[Error - 11:28:29 AM] Failed to send request:
RequestError: The connection was rejected. Either the requested service isn’t running on the requested server/port, the proxy settings in vscode are misconfigured, or a firewall is blocking requests. Details: RequestError: connect ECONNREFUSED 127.0.0.1:3000.
The problem is, that the request to
localhostgets changed to127.0.0.1which fails if the server was started withHOST=localhost. There is no problem if the request is done by e.g.curl http://localhost:3000
Quickfix: start the server with HOST=127.0.0.1
@DENGWENPENG can you fix this?
I have the same problem:
GET http://localhost:3000 HTTP/1.1will result in:
[Error - 11:28:29 AM] Failed to send request: RequestError: The connection was rejected. Either the requested service isn’t running on the requested server/port, the proxy settings in vscode are misconfigured, or a firewall is blocking requests. Details: RequestError: connect ECONNREFUSED 127.0.0.1:3000.The problem is, that the request to
localhostgets changed to127.0.0.1which fails if the server was started withHOST=localhost. There is no problem if the request is done by e.g.curl http://localhost:3000Quickfix: start the server with
HOST=127.0.0.1@DENGWENPENG can you fix this?
I install a proxy soft on my computer. when I close it,the restclient works again. So if you also install some proxy soft, i think it is a good idea to close it.
I have the same problem:
GET http://localhost:3000 HTTP/1.1will result in:[Error - 11:28:29 AM] Failed to send request: RequestError: The connection was rejected. Either the requested service isn’t running on the requested server/port, the proxy settings in vscode are misconfigured, or a firewall is blocking requests. Details: RequestError: connect ECONNREFUSED 127.0.0.1:3000.The problem is, that the request to
localhostgets changed to127.0.0.1which fails if the server was started withHOST=localhost. There is no problem if the request is done by e.g.curl http://localhost:3000Quickfix: start the server with
HOST=127.0.0.1@DENGWENPENG can you fix this?I install a proxy soft on my computer. when I close it,the restclient works again. So if you also install some proxy soft, i think it is a good idea to close it.
I have a newly installed MacOS Montery with no proxy installed. The proxy settings in VS Code are empty. How can I help to debug this problem?
Same problem here... Has some update?
same issue here
you must npm run server , good luck
Personally, I came across this during my first training. It turned out that I just forgot to launch the project I was working with via express. The firewall requirement worked, and after getting permission, everything turned on!
you must npm run server , good luck
Thanks! I've been stuck for a while and running 'npm run server' really helped, : )
My Wi-Fi has a firewall which blocks certain websites. Could this be the reason for this error? Since I have started the server. And is there anyway to fix this
you must npm run server , good luck
Thanks! I've been stuck for a while and running 'npm run server' really helped, : )
This solved my issue too just now. Thank you!
you must npm run server , good luck
thanks
it works :P
The same thing happened to me, in case it helps you, remember that in the official documentation they add the hostname as a parameter.This taking into account that I use express, I have seen videos in which it works without it, does anyone know why?
ex.listen(PORT, "localhost", () => {
console.log(`server listening on port http://localhost:${PORT}`)
})