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

kubectl exec -it <pod> bash hangs after you type exit #13395

Closed
ncdc opened this issue Aug 31, 2015 · 5 comments · Fixed by #13322
Closed

kubectl exec -it <pod> bash hangs after you type exit #13395

ncdc opened this issue Aug 31, 2015 · 5 comments · Fixed by #13322
Assignees
Labels
priority/backlog Higher priority than priority/awaiting-more-evidence. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.

Comments

@ncdc
Copy link
Member

ncdc commented Aug 31, 2015

If you run the following

kubectl exec -it <pod> bash
# exit

it will hang instead of returning control to the user in the shell. This is due to various changes to how go-dockerclient handles attach and exec.

I am working on a fix and will have a PR soon.

@lavalamp lavalamp added priority/backlog Higher priority than priority/awaiting-more-evidence. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Sep 1, 2015
@ghost ghost closed this as completed in #13322 Sep 4, 2015
@jiaweizhou
Copy link

It's still can't be use when I run the following

kubelet exec -it  <pod> sh
#exit

It will hang the throw an error

# error: error executing remote command: Error executing command in container: write unix /var/run/docker.sock: broken pipe

@jiaweizhou
Copy link

@ncdc

@ncdc
Copy link
Member Author

ncdc commented Sep 8, 2015

What image is your pod running? Can you provide the output when you run
with DEBUG=1? What Docker version?
On Mon, Sep 7, 2015 at 10:56 PM jiaweizhou notifications@github.com wrote:

@ncdc https://github.com/ncdc


Reply to this email directly or view it on GitHub
#13395 (comment)
.

@jiaweizhou
Copy link

I am sorry ,I forgot to deploy a new k8 cluster of the branch master .I just use the kubectl builded from the master with the old version of k8 cluster .Thanks for your concern.

@Marcofeli
Copy link

Marcofeli commented Jan 15, 2019

Hi @ncdc I'm working with the following and I'm having exactly this and other related issues (#13394 #51835).

kubectl version

Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.3", GitCommit:"a4529464e4629c21224b3d52edfe0ea91b072862", GitTreeState:"clean", BuildDate:"2018-09-09T18:02:47Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.5", GitCommit:"753b2dbc622f5cc417845f0ff8a77f539a4213ea", GitTreeState:"clean", BuildDate:"2018-11-26T14:31:35Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}

kubeadm version

&version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.3", GitCommit:"a4529464e4629c21224b3d52edfe0ea91b072862", GitTreeState:"clean", BuildDate:"2018-09-09T17:59:42Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}

kubelet --version

 Kubernetes v1.11.3

docker --version

Docker version 17.03.2-ce, build f5ec1e2

Before this problem appeared the cluster was working fine, and I didn't change anything when this happened. I just accessed my pod, as usual, and then I tried to exit from it but it just hangs, forcing me to close the terminal. I also tried deleting the pod and creating a new one but the problem persists and the "deleted" pod keeps on "Terminating" status.

By the way, I'm working with two nodes one master and one slave, both with the same versions.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/backlog Higher priority than priority/awaiting-more-evidence. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants