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 error occurs sporadically #2

Open
siddharthoak opened this issue Jun 16, 2016 · 1 comment
Open

Broken pipe error occurs sporadically #2

siddharthoak opened this issue Jun 16, 2016 · 1 comment

Comments

@siddharthoak
Copy link

We have written a proxy for Docker and since it works over unix socket, we have used jnuixsocket.

We are encountering the "Broken pipe" error sporadically. The same code executes correctly on other occasions. Unfortunately I have not figured out the reason behind this behavior.
Can you please suggest any pointers that may help me get over the problem.
The version of the the library we have used is 2.0.4.

Caused by: java.io.IOException: Broken pipe at Socket[addr=null,port=0,localport=0][fd=java.io.FileDescriptor@67575e30; file=/run/docker.sock; connected=true; bound=false]
at org.newsclub.net.unix.AFUNIXSocketImpl$AFUNIXOutputStream.write(AFUNIXSocketImpl.java:256) ~[junixsocket-common-2.0.4.jar:na]

@mbechler
Copy link
Contributor

Broken pipe generally means that the remote endpoint closed it's reading side of the connection you are writing to. Given that this is a system error, I wouldn't suspect the library to do anything wrong at this point.

I don't know anything about the docker API you are using but it looks like that is HTTP, so you might want to check that you properly handle Connection: close if using keep-alive (that is if you send multiple requests over the same connection). Could also be a reaction to a malformed request or a bug in the server implementation. Do you have any idea when this happens, i.e. when starting a new request or in the middle of one? Maybe try to get some debug logging from docker?

If everything else fails and you suspect the library we would need to get further information. straces of both the processes involved would be helpful to see what really is happening there.

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