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

kubeadm failed, kubelet:failed pulling images: Client.Timeout exceeded while awaiting headers #2956

Closed
ayeteng opened this issue Jul 3, 2018 · 12 comments
Labels
area/networking networking issues cause/firewall-or-proxy When firewalls or proxies seem to be interfering ev/apiserver-refused failures due to the master on 8443 returning "Connection Refused" ev/hung-start help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@ayeteng
Copy link

ayeteng commented Jul 3, 2018

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

Please provide the following details:

Environment:

Minikube version (use minikube version):

  • OS (e.g. from /etc/os-release): mac OS High Sierra 10.13.5
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): hyperkit
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): minikube-v0.28.0.iso
  • Install tools:
  • Others:
    The above can be generated in one go with the following commands (can be copied and pasted directly into your terminal):
minikube version
echo "";
echo "OS:";
cat /etc/os-release
echo "";
echo "VM driver": 
grep DriverName ~/.minikube/machines/minikube/config.json
echo "";
echo "ISO version";
grep -i ISO ~/.minikube/machines/minikube/config.json

What happened:

minikube start --vm-driver=hyperkit
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Downloading Minikube ISO
153.08 MB / 153.08 MB [============================================] 100.00% 0s
Getting VM IP address...
Moving files into cluster...
Downloading kubeadm v1.10.0
Downloading kubelet v1.10.0
Finished Downloading kubelet v1.10.0
Finished Downloading kubeadm v1.10.0
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E0703 12:53:57.980231 9743 start.go:294] Error starting cluster: kubeadm init error sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data-minikube --ignore-preflight-errors=Port-10250 --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI running command: : running command: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data-minikube --ignore-preflight-errors=Port-10250 --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI
.: Process exited with status 1
================================================================================
An error has occurred. Would you like to opt in to sending anonymized crash
information to minikube to help prevent future errors?
To opt out of these messages, run the command:
minikube config set WantReportErrorPrompt false
================================================================================
Please enter your response [Y/n]:

What you expected to happen:
Expect the cluster up and running.
How to reproduce it (as minimally and precisely as possible):
CMD: minikube start --vm-driver=hyperkit
Output of minikube logs (if applicable):
error.txt

Anything else do we need to know:

@alexfrancavilla
Copy link

My team is having the exact same issue (getsockopt spam in logs). Everyone is running High Sierra, minikube version v0.26.1, hyperkit v0.20171204-60-g0e5b6b. It magically works just on my machine. Feels like a networking issue that the VM can't connect to the internet properly. If anyone got an idea on what do to, I'd be super grateful.

@irfn
Copy link

irfn commented Jul 4, 2018

i faced this as well. The start times out with this error.

E0704 12:24:07.032372   15129 start.go:299] Error restarting cluster:  restarting kube-proxy: waiting for kube-proxy to be up for configmap update: timed out waiting for the condition

On restart (stop,start) i am seeing same error.
i am on High Sierra [10.13.5 (17F77)] Virtualbox 5.2.6

@irfn
Copy link

irfn commented Jul 4, 2018

Deleting the vm and starting over worked.
minikube delete
minikube start
This is possibly some api version compatibility issue

@alexfrancavilla
Copy link

@irfn I believe that your issue is something different. On my team the established workaround is to switch to VirtualBox when hyperkit gets stuck. Every now and then the apiserver then becomes unreachable and pods need to be restarted, never faced these issues with hyperkit though.

@ayeteng
Copy link
Author

ayeteng commented Jul 6, 2018

@irfn The command you pointed out was not resolved the issue.
my minikube works fine with virtualbox if I delete the cluster and start the minikube.
my minikube doesn't work with hyperkit even I delete the cluster and then start it.
It was worded with hyperkit in very first deployment. But somehow my system crashed. I restart the minikube then I cannot get cluster up and runing with hyperkit anymore. Any idea to delete the crashed cluster data? Tried rm -rf ~/.minikube but it doesn't back to normal.

@KateJC
Copy link

KateJC commented Jul 16, 2018

hello , minikube cannot start 。How should I solve it ,please give me help.

in the Centos7
[root@localhost bin]# minikube version
minikube version: v0.28.0
[root@localhost bin]# kubectl version
-bash: /usr/local/bin/kubectl: cannot execute binary file
[root@localhost bin]#

[root@localhost bin]# minikube start
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Downloading Minikube ISO
153.08 MB / 153.08 MB [============================================] 100.00% 0s
Getting VM IP address...
Moving files into cluster...
Downloading kubeadm v1.10.0
Downloading kubelet v1.10.0
E0716 22:17:35.806802 1833 start.go:252] Error updating cluster: downloading binaries: downloading kubeadm: Error downloading kubeadm v1.10.0: failed to download: failed to download to temp file: download failed: 5 error(s) occurred:

@tstromberg tstromberg added kind/bug Categorizes issue or PR as related to a bug. co/hyperkit Hyperkit related issues ev/hung-start labels Sep 19, 2018
@tstromberg tstromberg changed the title minikube cannot start and hang at 'Starting cluster components...' kubeadm: Process exited with status 1: Connection refused talking to k8s master Sep 19, 2018
@tstromberg tstromberg added os/macos co/kubeadm Issues relating to kubeadm ev/apiserver-refused failures due to the master on 8443 returning "Connection Refused" top5 labels Sep 19, 2018
@tstromberg
Copy link
Contributor

The important errors from the log - indicate a crashing apiserver. If someone runs into this again, can they attach the output of minikube ssh "journalctl -xe". Thanks!

@tstromberg
Copy link
Contributor

tstromberg commented Sep 20, 2018

I'm pretty sure this is related in some way to network connectivity issues, but I'm not absolutely certain. If you run into this, please attach the output of:

minikube logs
kubectl get pods --all-namespaces
minikube ssh "journalctl -xe"

Thanks!

@tstromberg tstromberg changed the title kubeadm: Process exited with status 1: Connection refused talking to k8s master kubeadm init: Process exited with status 1: Connection refused talking to k8s master Sep 20, 2018
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 20, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 19, 2019
@tstromberg tstromberg changed the title kubeadm init: Process exited with status 1: Connection refused talking to k8s master kubeadm failed, kubelet:failed pulling images: Client.Timeout exceeded while awaiting headers Jan 24, 2019
@tstromberg
Copy link
Contributor

Keeping open, as this issue is representative of symptoms when the VM can't connect to the internet. Typically because of a firewall being in the way, and occasionally requiring that a proxy be configured within the VM itself.

Some related bugs: #3145 and #3242

@tstromberg tstromberg added cause/firewall-or-proxy When firewalls or proxies seem to be interfering lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. area/networking networking issues priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. os/macos co/hyperkit Hyperkit related issues co/kubeadm Issues relating to kubeadm labels Jan 24, 2019
@tstromberg
Copy link
Contributor

tstromberg commented Mar 8, 2019

Issue is now documented - and appears quite a bit differently in newer releases of minikube:

https://github.com/kubernetes/minikube/blob/master/docs/http_proxy.md#unable-to-pull-imagesclienttimeout-exceeded-while-awaiting-headers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/networking networking issues cause/firewall-or-proxy When firewalls or proxies seem to be interfering ev/apiserver-refused failures due to the master on 8443 returning "Connection Refused" ev/hung-start help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

7 participants