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 results in EPIPE errors when forwarding to a socket #675

Closed
2 tasks done
mhassan1 opened this issue Oct 21, 2021 · 1 comment
Closed
2 tasks done

Proxy results in EPIPE errors when forwarding to a socket #675

mhassan1 opened this issue Oct 21, 2021 · 1 comment
Labels

Comments

@mhassan1
Copy link
Contributor

yarn why http-proxy-middleware OR npm ls http-proxy-middleware output (mask private folder names with *****)

project@ /path/to/project
└── http-proxy-middleware@2.0.1

Describe the bug (be clear and concise)

When proxying to a socket, we are seeing EPIPE errors every so often (after a few hundred requests). Here is how we are proxying to a socket:

createProxyMiddleware({
  target: { host: null, port: null, socketPath: 'sock.sock' }
})

This only seems to be an issue in Node.js 16.7.0 and later, on Linux.

I do not think this is a bug in this library, since I can reproduce this even using a simple http proxy without this library. I have opened a ticket with Node.js: nodejs/node#40553. I created this issue here in case others run into this issue.

Step-by-step reproduction instructions

See the full reproduction here: https://github.com/mhassan1/node-16-7-0-proxy-epipe

Expected behavior (be clear and concise)

No EPIPE.

What http-proxy-middleware configuration are you using?

{
  target: { host: null, port: null, socketPath: 'sock.sock' }
}

What OS/version and node/version are you seeing the problem?

Linux, Node.js 16.7.0+

Additional context (optional)

No response

@mhassan1 mhassan1 added the bug label Oct 21, 2021
@mhassan1
Copy link
Contributor Author

This should be resolved by nodejs/node#41116.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant