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

None driver: [ERROR Port-10250]: Port 10250 is in use #2707

Closed
stephenpope opened this issue Apr 11, 2018 · 27 comments
Closed

None driver: [ERROR Port-10250]: Port 10250 is in use #2707

stephenpope opened this issue Apr 11, 2018 · 27 comments
Labels
cause/vm-networking Startup failures due to VM networking co/none-driver os/linux

Comments

@stephenpope
Copy link

stephenpope commented Apr 11, 2018

Is this a BUG REPORT
Environment: Ubuntu 17.10 x86_64

Minikube version: v0.26.0

  • OS : 17.10 (Artful Aardvark)
  • VM Driver : None
  • ISO version : None
  • Install tools: None
  • Others:

What happened:

Started minikube correctly ..

export MINIKUBE_WANTUPDATENOTIFICATION=false
export MINIKUBE_WANTREPORTERRORPROMPT=false
export MINIKUBE_HOME=$HOME
export CHANGE_MINIKUBE_NONE_USER=true
mkdir $HOME/.kube || true
touch $HOME/.kube/config

export KUBECONFIG=$HOME/.kube/config

sudo -E minikube start --vm-driver=none

Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Downloading kubelet v1.10.0
Downloading kubeadm 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...
Kubectl is now configured to use the cluster.
===================
WARNING: IT IS RECOMMENDED NOT TO RUN THE NONE DRIVER ON PERSONAL WORKSTATIONS
        The 'none' driver will run an insecure kubernetes apiserver as root that may leave the host vulnerable to CSRF attacks

Loading cached images from config file.

minikube: Running
cluster: Running
kubectl: Correctly Configured: pointing to minikube-vm at 172.27.162.20

.. stop minikube ..

sudo minikube stop

.. restart minikube (using same startup script to set env etc) ..

export MINIKUBE_WANTUPDATENOTIFICATION=false
export MINIKUBE_WANTREPORTERRORPROMPT=false
export MINIKUBE_HOME=$HOME
export CHANGE_MINIKUBE_NONE_USER=true
mkdir $HOME/.kube || true
touch $HOME/.kube/config

export KUBECONFIG=$HOME/.kube/config

sudo -E minikube start --vm-driver=none

mkdir: cannot create directory ‘/home/stp/.kube’: File exists
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E0411 09:14:33.070550   37677 start.go:276] 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 --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  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 --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
 output: [init] Using Kubernetes version: v1.10.0
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks.
        [WARNING SystemVerification]: docker version is greater than the most recently validated version. Docker version: 18.03.0-ce. Max validated version: 17.03
        [WARNING Hostname]: hostname "minikube" could not be reached
        [WARNING Hostname]: hostname "minikube" lookup minikube on 127.0.0.53:53: server misbehaving
        [WARNING FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml]: /etc/kubernetes/manifests/kube-apiserver.yaml already exists
        [WARNING FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml]: /etc/kubernetes/manifests/kube-controller-manager.yaml already exists
        [WARNING FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml]: /etc/kubernetes/manifests/kube-scheduler.yaml already exists
        [WARNING FileAvailable--etc-kubernetes-manifests-etcd.yaml]: /etc/kubernetes/manifests/etcd.yaml already exists
        [WARNING Swap]: running with swap on is not supported. Please disable swap
        [WARNING FileExisting-socat]: socat not found in system path
        [WARNING FileExisting-crictl]: crictl not found in system path
Suggestion: go get github.com/kubernetes-incubator/cri-tools/cmd/crictl
Flag --admission-control has been deprecated, Use --enable-admission-plugins or --disable-admission-plugins instead. Will be removed in a future version.
        [WARNING DirAvailable--data]: /data is not empty
[preflight] Some fatal errors occurred:
        [ERROR Port-10250]: Port 10250 is in use
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
: running command: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data --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
.: exit status 2

What you expected to happen: System would start correctly.

Output of minikube logs (if applicable):

Anything else do we need to know:

To fix / workaround : rm -rf .kube / rm -rf /minikube / rm -rf /etc/kubernetes (but that just allows me to start rather than re-start)

@bh4rtp
Copy link

bh4rtp commented Apr 11, 2018

Notice Port 10250 is in use. Maybe minikube did not stop correctly.

@stephenpope
Copy link
Author

Related: #2549 - I thought this would be fixed in this version but it seems not :(

@maciej-plutoflume
Copy link

@stephenpope - Thanks for the workaround! I was also banging my head against "Port 10250 is in use" even though sudo netstat -nlpt|grep :10250 was showing otherwise.

@hh23485
Copy link

hh23485 commented Apr 26, 2018

I met this situation the same, when could it be fixed or are there same solutions now? thanks

@bogdanpetrea
Copy link

bogdanpetrea commented Apr 30, 2018

minikube status always reported running, so I had to delete the cluster in order to get it to work again. I still had to use the workaround commands posted in the issue tho.

@thattolleyguy
Copy link

thattolleyguy commented May 3, 2018

I'm having the same issue but when I first install minikube on 18.04. sudo minikube start --vm-driver=none gives me the following output:

Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E0503 15:24:15.808992   10101 start.go:276] 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 --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 --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 
 output: [init] Using Kubernetes version: v1.10.0
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks.
	[WARNING SystemVerification]: docker version is greater than the most recently validated version. Docker version: 17.12.1-ce. Max validated version: 17.03
	[WARNING Swap]: running with swap on is not supported. Please disable swap
	[WARNING FileExisting-ebtables]: ebtables not found in system path
	[WARNING FileExisting-ethtool]: ethtool not found in system path
	[WARNING FileExisting-socat]: socat not found in system path
	[WARNING FileExisting-crictl]: crictl not found in system path
Suggestion: go get github.com/kubernetes-incubator/cri-tools/cmd/crictl
Flag --admission-control has been deprecated, Use --enable-admission-plugins or --disable-admission-plugins instead. Will be removed in a future version.
[preflight] Some fatal errors occurred:
	[ERROR Port-10250]: Port 10250 is in use
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
: running command: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data --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 
.: exit status 2```
 

@stmpy
Copy link

stmpy commented May 8, 2018

I likewise am having this issue - I plan to visit it a little more, but thought I would post what I do know. The port 10250 is kubelet, which on ubuntu is run from the kubelet.service. When minikube starts up it will activate this service before the kubeadm command is run. I was hoping to work around it by sending --ignore-preflight-errors to kubeadm command via the minikube command, but I haven't figured out how to do that yet.

@anrl
Copy link

anrl commented May 20, 2018

I have the same exact same problem as the original poster. In my case, it is not even running the first time!

@anrl
Copy link

anrl commented May 20, 2018

You can run the following command after crash to proceed.

sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=All

After many steps, it stops with a timeout like below..

[kubeconfig] Using existing up-to-date KubeConfig file: "/etc/kubernetes/controller-manager.conf"
[kubeconfig] Using existing up-to-date KubeConfig file: "/etc/kubernetes/scheduler.conf"
[controlplane] Wrote Static Pod manifest for component kube-apiserver to "/etc/kubernetes/manifests/kube-apiserver.yaml"
[controlplane] Wrote Static Pod manifest for component kube-controller-manager to "/etc/kubernetes/manifests/kube-controller-manager.yaml"
[controlplane] Wrote Static Pod manifest for component kube-scheduler to "/etc/kubernetes/manifests/kube-scheduler.yaml"
[etcd] Wrote Static Pod manifest for a local etcd instance to "/etc/kubernetes/manifests/etcd.yaml"
[init] Waiting for the kubelet to boot up the control plane as Static Pods from directory "/etc/kubernetes/manifests".
[init] This might take a minute or longer if the control plane images have to be pulled.
[apiclient] All control plane components are healthy after 0.009887 seconds
[uploadconfig] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
[markmaster] Will mark node minikube as master by adding a label and a taint
error marking master: timed out waiting for the condition

@anrl
Copy link

anrl commented May 20, 2018

Well.. I think this is the wrong direction.

There should be another solution to the minikube error. Running kubeadm manually is not the way to solve it.

Any ideas?

@Ri0n
Copy link

Ri0n commented Jun 5, 2018

same problem with v0.27.0

@johnhainline
Copy link

Having the same problem with v0.27.0 on Ubuntu 18.04

@narun4sk
Copy link

Same here with the minikube v0.27.0, except that I cannot even start it:

++ sudo -E minikube start --vm-driver=none
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E0610 21:35:26.037846    5076 start.go:276] 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 --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 --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 
 output: [init] Using Kubernetes version: v1.10.0
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks.
	[WARNING SystemVerification]: docker version is greater than the most recently validated version. Docker version: 18.05.0-ce. Max validated version: 17.03
	[WARNING FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml]: /etc/kubernetes/manifests/kube-apiserver.yaml already exists
	[WARNING FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml]: /etc/kubernetes/manifests/kube-controller-manager.yaml already exists
	[WARNING FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml]: /etc/kubernetes/manifests/kube-scheduler.yaml already exists
	[WARNING FileAvailable--etc-kubernetes-manifests-etcd.yaml]: /etc/kubernetes/manifests/etcd.yaml already exists
	[WARNING Swap]: running with swap on is not supported. Please disable swap
	[WARNING FileExisting-ethtool]: ethtool not found in system path
Flag --admission-control has been deprecated, Use --enable-admission-plugins or --disable-admission-plugins instead. Will be removed in a future version.
[preflight] Some fatal errors occurred:
	[ERROR Port-10250]: Port 10250 is in use
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
: running command: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data --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 
.: exit status 2

@anrl
Copy link

anrl commented Jun 10, 2018

Minikube 0.27 is working on Ubuntu 18.04!
I am running it in a VMWare Fusion on MacOS.

The earlier problems I reported were on Ubuntu 17.10.
I believe I installed Virtualbox in the Ubuntu 18.04 hoping to use that with the minikube.
However, I ended up using the --vm-driver=none option.

Also, I installed kubectl

@nanaromance
Copy link

I've a same problem too in AWS environment but it's working on ec2 type "t" and "c" and not working in "m" type another type is not confirm.

@haashah
Copy link

haashah commented Jun 13, 2018

hitting the exact same problem on minkube 0.26 and ubuntu 16.04. Anybody know if this is fixed in 0.27?
removing .kube and /etc/kubernetes directories is the only way to create a new env after deleting an old one for now

@wingman1960
Copy link

wingman1960 commented Jul 3, 2018

Hi guys I found out the k8s dockers containers actually restarted even though it throw error
[ERROR Port-10250]: Port 10250 is in use in my case.
Port 10250 is occupied by kubelet which I think minikube stop doesn't bring it down. In a closer inspection, the error is indeed came from kubeadm init which tried to start kubelet that already started

@tstromberg tstromberg changed the title BUG - Minikube 0.26.0 - Ubuntu 17.10 - Unable to restart without error None driver: [ERROR Port-10250]: Port 10250 is in use Sep 19, 2018
@tstromberg
Copy link
Contributor

If you run into this, find the offending program:

netstat -ltnp | grep -w ":10250"

and kill it.

@calltech
Copy link

Kubelet use 10250 port, run the following command to stop kubelet and it will stop 10250 port from being used.
sudo systemctl stop kubelet

@twodayslate
Copy link

If you are using microk8s you may just need to run

microk8s.stop

@liyedan18
Copy link

I have a same problem of minikube start.
And I solved the problem with the following steps:
1、docker stop $(docker ps -a -q)
2、use --extra-config parameter of minikube start. like: minikube start --kubernetes-version=1.17.2 --vm-driver=none kubelet.ignore-preflight-errors kubeadm.ignore-preflight-errors

@elieser1101
Copy link

Kubelet use 10250 port, run the following command to stop kubelet and it will stop 10250 port from being used.
sudo systemctl stop kubelet

if port is still used then you can check for PID to stop it

sudo netstat -tupln | grep 10250
sudo kill -9 <PID>

@AspirantSean
Copy link

Notice Port 10250 is in use. Maybe minikube did not stop correctly.

execute kubeadm reset will solve this problem

@sankarayinala
Copy link

Notice Port 10250 is in use. Maybe minikube did not stop correctly.

execute kubeadm reset will solve this problem

Thank you, This did help.

@gandhipr
Copy link

For me, join didn't complete and kubelet was running.
sudo systemctl stop kubelet.service will stop kubelet and 10250 port will be free

@cyberbob61
Copy link

sudo systemctl stop kubelet
helped

@Suraez
Copy link

Suraez commented Jun 10, 2024

turns out i was running microk8s instead of minikube, so for me this helped, sudo microk8s stop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cause/vm-networking Startup failures due to VM networking co/none-driver os/linux
Projects
None yet
Development

No branches or pull requests