helm: write: broken pipe
Since version 2.8.0, I’m getting the following error while running helm upgrade --install release_name chart:
E0209 11:21:52.322201 93759 portforward.go:303] error copying from remote stream to local connection: readfrom tcp4 127.0.0.1:53674->127.0.0.1:53680: write tcp4 127.0.0.1:53674->127.0.0.1:53680: write: broken pipe
Anyone got a hint, what could be a possible cause for this?
Edit: 2.8.1 does not fix this. I’m on MacOS
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 82
- Comments: 99 (19 by maintainers)
Commits related to this issue
- fix: Update gRPC to get better TLS connection handling To avoid backward compatibility breakers, we have been pinned to a very old version of gRPC. But it appears that there have been some very signi... — committed to technosophos/k8s-helm by technosophos 5 years ago
- fix: Update gRPC to get better TLS connection handling To avoid backward compatibility breakers, we have been pinned to a very old version of gRPC. But it appears that there have been some very signi... — committed to technosophos/k8s-helm by technosophos 5 years ago
- fix: Update gRPC to get better TLS connection handling (v2 minor release) (#5210) * fix: Update gRPC to get better TLS connection handling To avoid backward compatibility breakers, we have been pi... — committed to helm/helm by technosophos 5 years ago
use safari instead of chrome
So you ending maintenance of helm 2 now, where Helm3 is even not yet stable and merging everything will also take time.?
I am afraid that it must be deferred until 2.13 because it required a regeneration of one of the protobuf classes (due to a gRPC internal changes). Consequently, the binary protocol may be incompatible with earlier versions of 2.12. This is actually the reason why we only update gRPC when necessary.
That said, I will see if we can speed up the 2.13 release process at all. If this fixes a major issue, it’s worth getting out the door.
Helm3 is out. Try using that.
Why is the issue closed? As it stands right now it is impossible to use helm with CI / CD with TLS due to this issue. Do we have to wait for Helm 3?
Update: I believe it should be stated on the front page that there is a major issue so that people won’t waste time with helm for the time being?
Update 2, my temporary solution: As a temporary solution in CI / CD script prior to running any Helm install / upgrade commands I disable exit on non 0 code (set +e), run the helm command, re-enable exit on non 0 code (set -e) and use kubectl rollout status to wait for deployment to become available with a timeout set. If timeout is hit, it means something had gone wrong. In my case I only care about deployments becoming available. For example:
set +ehelm upgrade --install prometheus stable/prometheusset -ekubectl rollout status --timeout=30s deployment/prometheus-serverI opened a PR that updates us to a newer version of gRPC, which seems to have about a dozen network and TLS fixes since our last version. I’m hopeful that will fix this issue.
We’re experiencing this on about half our deploys and unfortunately makes the CD system think the deployment failed.
Tested using Helm 2.10, 2.8.2 on both linux and windows. Using TLS and Azure’s Kubernetes 1.11.2
It occurs very regularly and is considerably inconveniencing us.
Just was dealing with similar issue and doing
helm init --upgrade --history-max=0seemed to fix it for me.error:
I was able to track down the cause of this issue to expired Tiller and Helm certificates.
Issue Description
I originally secured my Tiller installation following these instructions https://v2.helm.sh/docs/using_helm/#using-ssl-between-helm-and-tiller. In the tutorial, the duration for the validity of the Helm and Tiller certificates is set to 365 days. I originally generated the certificates with this value, but over 365 days ago.
When running any Helm command (e.g.
helm versionorhelm list), I received an error message similar to this:Issue Resolution
I believe the AKS folks are aware of this bug and have hit it themselves. It appears to be an upstream issue, not necessarily a helm problem. I’ll see if I can ping one of them and see if they can provide any updates on this ticket.
Can confirm that this is still an issue in 2.13
I was just trying out kubedb right now and got this. I see a lot of people saying that removing
--waitsolved the problem for them, but what I think happens is that when you have that flag you are just a lot more likely to have this happen to you, as you will keep the connection up until you’re done. But it does not remove the issue completely.Just making sure it’s included:
Azure AKS running k8 version 1.12.6
Is there anything else we can provide for debugging this?
Upgraded to 2.13.0 and this issue is still happening, @technosophos.
Kubectl v1.13.4 Helm 2.13.0 AKS 1.11.3 Using TLS
Using Azure Devops hosted agents
Client and server version for completeness,
Edit:
Upgraded the cluster to rule out k8s version. Same behavior on AKS 1.12.5
Edit 2:
I just noticed the error message has changed somewhat, from
broken pipe write: broken pipetowsasend: An established connection was aborted by the softwareMaybe it’s different but related?Edit 3:
Tried Linux for good measure, The difference in error message was windows vs linux.
same issue as @Vhab;
using helm/tiller 2.11.0 with TLS and AKS 1.11.2.
helm client is being run via a vsts-agent docker image running in AKS; its part of several azure devops CD pipelines .I’ve also received the error running the helm client locally on Debian stretch.
I’ve only experienced the errors with helm upgrade and/or install commands and typically after the post deploy report
be good if there was a fix so my CD pipeline stops alerting a failure when the actually helm deployment works fine etc 😄
edit: tried @bacongobbler suggestion to manually setup the connection and the following error intermittently occurred using kubectl port-forward for multiple commands. kubectl port-forward for other uses apart from helm works okay on my cluster.
I can confirm
export HELM_TLS_HOSTNAME=<tiller-deployment-name>works sufficiently, I didn’t get the broken pipe error. 😃The current thinking is that this is an upstream bug. So I’m not sure there is much left that we can do. But it definitely won’t impact Helm 3, which no longer uses the port forwarding/tunneling aspect of Kubernetes.
Also, for those of you impacted… are you using TLS? I hadn’t thought about whether the gRPC layer might be having TLS-related troubles.
@marrobi no updates to share at this time, sorry.
Same Issue here, using
helm installEKS Kubernetes version: 1.11.0 Helm Client: 2.12.1 Helm Server: 2.12.0@bacongobbler any update on this? Again Azure DevOps/VSTS hosted agent and AKS. Thanks.
same problem on running job from VSTS, that deploys to AKS on azure:
E1002 11:57:35.278788 207 portforward.go:303] error copying from remote stream to local connection: readfrom tcp4 127.0.0.1:38037->127.0.0.1:40594: write tcp4 127.0.0.1:38037->127.0.0.1:40594: write: broken pipea bit scary that issue is hanging since February…
I’m getting the same issue by using and AKS cluster within Azure.
This issue is in the way kubectl port forwarding is handled and not related to helm itself. There is an issue open on the kubernetes repo about this.
I was facing a similar issue in a different setting where I was uploading files into the pod and the reason I was getting broken pipe turned out to be the memory limits set on the pod. The file I was uploading was larger than the pod memory limits and so I was getting the following error:
portforward.go:400] an error occurred forwarding 5000 -> 5000: error forwarding port 5000 to pod 9d0e07887b021ac9a2144416bc7736ce9b22302da25483ac730c5737e2554d7c, uid : exit status 1: 2019/05/17 03:54:30 socat[13000] E write(5, 0x186ed70, 8192): Broken pipeOn increasing the pod limits I was able to upload the file successfully.Here is the thing, errors in TLS validation close the connection unexpectedly and the kubectl proxy in the background complains about it without helm printing the actual error.
In my case it was as simple as adding “localhost” to the server certificate hosts and
openssl s_client -connectwas key to narrow it down, then translate it to helm flags.This should be definitelly flagged as a bug. The real error is completelly silent even with
--debugThank you, I forgot to re-open this. Yes, right now signs are pointing towards a bug upstream affecting Helm.
On the bright side, this issue should not be a problem for Helm 3 given that we’ve removed tiller and interact directly with the API server. 😃
still seeing this occur in our deployments, and causing some issues with a tool we’re writing for Helm.
Version information if it helps at all:
Our tool output, but this is really just regurgitating information returned to Helm:
Would you mind explaining a bit more in detail? What didn’t work for you and why? Do you have logs? That would be most helpful.
@oivindoh I’m running on k8s in AWS. It used to be ok up until 2.7.2.
I face the same issue. Any suggested workarounds? This is very annoying.