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

Broken pipe on unix socket error handle worker: error send AgentDisconnect frame #7

Open
alechenninger opened this issue Dec 14, 2020 · 4 comments
Assignees

Comments

@alechenninger
Copy link

When listening on a unix socket, I get this error a few seconds after each event is processed:

2020/12/14 18:37:58 error handle worker: error send AgentDisconnect frame: write unix /var/run/gohaproxy/agent.sock->@: write: broken pipe

Example code https://github.com/alechenninger/go-haproxy-agent/blob/cd1d9681bcfe818f134dc1bc2d2ba1ec4e5983f2/main.go#L43

I've tried both listneing on "unix" and "unix packet"

Haproxy configs here https://github.com/alechenninger/go-haproxy-agent/tree/cd1d9681bcfe818f134dc1bc2d2ba1ec4e5983f2/conf

@negasus negasus self-assigned this Dec 14, 2020
@alechenninger
Copy link
Author

alechenninger commented Dec 14, 2020

Some additional context: I'm seeing this on mac while using docker for mac, and a shared unix socket between containers. Docker for Mac doesn't support unix sockets from the mac OS host, but it does in between containers.

I tried switching to https://github.com/criteo/haproxy-spoe-go and am seeing the same results, so wondering if this is a product of my environment.

@alechenninger
Copy link
Author

Did a bit more experimenting. Looks like timeout handling is different with unix sockets vs tcp.

With TCP, server and idle timeouts don't trigger errors.

With unix sockets, server and idle timeouts do trigger errors. This affects both this and the criteo libraries.

It seems benign, and may just warrant higher timeout values to reduce noise.

@negasus
Copy link
Owner

negasus commented Dec 15, 2020

Thank you for such a detailed description. Can I close this issue?

@alechenninger
Copy link
Author

It seems like a bug that one protocol emits error logs when another doesn't. It may be misleading, because AFAICT these aren't really meaningful "errors" in the sense that nothing appears to be actually wrong. Ultimately, whether you leave the issue open is up to you.

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