Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxy localhost without internet connection gives "getaddrinfo ENOENT" #835

Open
flyon opened this issue Jun 2, 2015 · 1 comment
Open

Comments

@flyon
Copy link

flyon commented Jun 2, 2015

I've got node running on http://localhost:8001 and have http-proxy configured to proxy https://localhost:8002 back to http://localhost:8001.

This works fine as long as I'm connected to the internet, but when I'm disconnected from the internet http://localhost:8001 still works, but when I access https://localhost:8002 I get this error:

    throw err;
          ^
Error: getaddrinfo ENOENT
    at Object.exports._errnoException (util.js:746:11)
    at errnoException (dns.js:49:15)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:94:26)

Which makes it hard for me to work with this while on the road (I want to be able to work without internet connection)

Is there some setting I should set or should it be fixed?

@peterhodges
Copy link

I ran into this yesterday.

Try using 127.0.0.1 instead of localhost.

See: nodejs/node-v0.x-archive#25338

kodiakhq bot pushed a commit to vercel/next.js that referenced this issue Jul 5, 2023
This helps getting rid of the

```
Error: connect ECONNREFUSED ::1:64696
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
  errno: -61,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '::1',
  port: 64696
}
```

error for me when running the standalone server. cc @ijjk.

I'm not sure if it's related to http-party/node-http-proxy#835.

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants