Hello everyone, i’m submitting this post because im out of options, we are facing this issue constantly and doesn’t seems to have a solution, but if you know the solution please help me out. I noticed some topic similar but without answer. I dont know what is causing this and no idea how to solve this.
Repeated errors in logs :
level=error msg="Handler for GET /containers/container-name/json returned error: write unix /var/run/docker.sock->@: write: broken pipe"
http: superfluous response.WriteHeader call from github.com/docker/docker/api/server/httputils.WriteJSON (httputils_write_json.go:11)
About the environment, this errors are related to some clients of where i work, so far, this environment had this erros :
Docker Engine Version | Containerd Version | OS Version
24.0.2 1.6.21 20.04.6 LTS
20.10.12 1.4.12 18.04.1 LTS
26.0.0 1.6.28 20.04.6 LTS
More details about the architecture, we use haproxy as load balancer/reverse proxy to distribute requests across multiple backends servers, backend server are all containers, including haproxy, we also use docker compose to manage this containers.
If necessary i will upload some logs, anyways, anyone tried upgrading docker version and stopped this errors ?? Is missing something of the dockerd config (/etc/docker/daemon.json) ?
There are multiple repos. Did you follow the official guide from the docker documentation or did you install docker.io instead of docker-ce?
Also when dou you get the error message? Do you just use the docker command or you have an API call from an SDK or you just let Docker run and sometimes you get the error message in the daemon log?
Do you also run Kubernetes and use dockerd as container runtime as in the topic you linked? Or is it just a simple Docker installation and maybe using Docker Compose to start the containers?
Did you notice any problem besides the suspicious log messages?
Sorry, I forgot about that and when I went back to your first post I managed to miss that part.
At least 26.x is not that old, but you can try to upgrade. You probably want to test your projects on another machine using the new Docker version before doing it in production of course.
We use aws, so in the networking side there isn’t anything suspicious, discarting network issues, and nothing suspicious in the logs. The error it’s not very explicit and the documentation does not have anything about this error
It is a general unix domain socket + pipe error, but there are multiple issues reported related to Docker as well. Maybe there is some problem with the available resources on the host like here in the last comment?
Hello, i was looking logs from others hosts, indeed, in hosts with more hardware it doesn’t happen very often, in fact rarely, do you know if this error can lead to haproxy losing the dns containers or some type of container unavailability ?
I don’t know… When there is not enough memory, the operating system can kill processes, or some processes slow down, swap space can be used more, that can affect disk performance, whihc can lead to other problems and so on. Check general system logs for more clues.