# Kubectl exec exits unexpectedly

**URL:** <https://forums.suse.com/t/kubectl-exec-exits-unexpectedly/12153>\
**Category:** SUSE Rancher Prime\
**Created:** [October 25, 2018, 6:35am UTC](https://forums.suse.com/t/kubectl-exec-exits-unexpectedly/12153 "2018-10-25T06:35:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wingtch](https://avatars.discourse-cdn.com/v4/letter/w/cdc98d/32.png) [@wingtch](https://forums.suse.com/u/wingtch)\
**Post date:** [October 25, 2018, 6:35am UTC](https://forums.suse.com/t/kubectl-exec-exits-unexpectedly/12153/1 "2018-10-25T06:35:20Z")

</div>

Deployment: single instance deploy, version 2.0.8  
kubectl config file is downloaded from rancher ui.  
I exec into the pod using "kubectl exec -it /bin/sh -n ". If commands were typed continually, everything went well. But if I hang for about 10 secs then typed enter, kubectl was shut down.  
If tracing tail of rancher server container log, we found this:  
E1025 05:50:46.299072 7 upgradeaware.go:310] Error proxying data from client to backend: EOF

Looks communication error between rancher server and kubenetes api server. Any suggestion?

thanks.

---

<div class="post-metadata">

**Author:** ![sukrit007](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/sukrit007/32/5284_2.png) [@sukrit007](https://forums.suse.com/u/sukrit007)\
**Post date:** [June 6, 2019, 3:59am UTC](https://forums.suse.com/t/kubectl-exec-exits-unexpectedly/12153/2 "2019-06-06T03:59:21Z")

</div>

Looks like restart of rancher server resolves the issue. But still trying don’t know what is causing it.

---

<div class="post-metadata">

**Author:** ![wingtch](https://avatars.discourse-cdn.com/v4/letter/w/cdc98d/32.png) [@wingtch](https://forums.suse.com/u/wingtch)\
**Post date:** [July 22, 2019, 1:35pm UTC](https://forums.suse.com/t/kubectl-exec-exits-unexpectedly/12153/3 "2019-07-22T13:35:51Z")

</div>

Not working for me. I’m still seeing this in v2.2.3. Try logout and login rancher will resolve this for a short period. But after several minutes it happened again.
