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

Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it. Windows 10 #53881

Closed
Dev1969 opened this issue Oct 13, 2017 · 14 comments
Assignees

Comments

@Dev1969
Copy link

@Dev1969 Dev1969 commented Oct 13, 2017

Hello Experts,

I want to learn Kubernetes and installed it on my laptop that is running Windows 10.

Installed:
minikube using minikube-installer
python-3.6.3
Git-2.14.2.2-64-bit
VirtualBox-5.1.28-117968-Win
kubectl

Install went fine. In the firewall Exception list, I have put minikube and kubectl.

I am getting below error

kubectl version
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.0", GitCommit:"6e937839ac04a38cac63e6a7a306c5d035fe7b0a", GitTreeState:"clean", BuildDate:"2017-09-28T22:57:57Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"windows/amd64"}

Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

What could be possible reason for this error? How to fix it?

Please let me know what all information you need to help me on this. I searched for other similar issues but that did not help much.

Thank you in advance.

Regards,
Dev

@dims
Copy link
Member

@dims dims commented Oct 30, 2017

/sig windows

@ddlaat
Copy link

@ddlaat ddlaat commented Oct 31, 2017

+1

@andyzhangx
Copy link
Member

@andyzhangx andyzhangx commented Nov 2, 2017

AFAIK, k8s could run on windows 2016 server. Could your win10 run docker service successfully? I think you could run "docker run -d microsoft/aspnet", try a windows container first.

@rjmorse
Copy link

@rjmorse rjmorse commented Jan 29, 2018

This doesn't look related to running Kubernetes on Windows, but getting Minikube running inside a VM on Windows. This should probably be closed in favor of creating a new question on Stack Overflow, or finding one that is already answered.

A number of related troubleshooting issues exist: https://stackoverflow.com/search?q=%5Bminikube%5D+windows

@fejta-bot
Copy link

@fejta-bot fejta-bot commented Apr 29, 2018

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

@akochnev
Copy link

@akochnev akochnev commented May 2, 2018

I just ran into this issue with VirtualBox, and without minikube.

/assign @akochnev

@akochnev
Copy link

@akochnev akochnev commented May 8, 2018

I looked a bit further into my issue, and it turned out that I had a different issue of kubectl not being properly configured with a kubeconfig that points to an actually running API server.

@Dev1969 - there could be many issues that could be causing this issue for you, including the api server not running, kubectl on your windows machine not being configured correctly, and that's on top of networking issues in your VirtualBox setup. Without further details (logs , etc) it would not be possible to further diagnose this issue. As previously mentioned, this is unlikely to be windows (or sig-windows) related.

With that, it does seem like this issue should be closed . @michmike - can you please close this issue to reduce clutter ?

@michmike
Copy link
Contributor

@michmike michmike commented May 8, 2018

/close

@msiddharthareddy
Copy link

@msiddharthareddy msiddharthareddy commented Mar 4, 2020

Windows10

Step 1 :
I have installed kubectl in directory
C:\Users\msiddhartha\play\kubernetes\vagrant-provisioning>curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.17.0/bin/windows/amd64/kubectl.exe

Step 2 :
Came back to home directory
C:\Users\msiddhartha>C:\Users\msiddhartha\play\kubernetes\vagrant-provisioning\kubectl
It gives options to run Kubectl

Step 3:
Please copy admin.conf file from master server location(/etc/kubernetes) to C:\Users\msiddhartha.kube

step 4:
rename admin.conf to config in the C:\Users\msiddhartha.kube directory
step5:

C:\Users\msiddhartha>C:\Users\msiddhartha\play\kubernetes\vagrant-provisioning\kubectl cluster-info
Kubernetes master is running at https://192.168.42.100:6443
KubeDNS is running at https://192.168.42.100:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

@hasante
Copy link

@hasante hasante commented Apr 25, 2020

$ kubectl get nodes
Unable to connect to the server: dial tcp IPADDRESS:443: connectex: No connection could be made because the target machine actively refused it.

Even after setting up the KUBECONFIG env variable.

@sarojsingh002
Copy link

@sarojsingh002 sarojsingh002 commented May 8, 2020

How do you set up environment variable for config. Could some one please explain in details. I am using windows home and trying to docker-compose.yml to k8 but when i do kompose up it says:
Error while deploying application: Get http://localhost:8080/api: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

Thanks in advance

@utsavakru
Copy link

@utsavakru utsavakru commented Aug 19, 2020

  1. Issue : Kubectl get nodes
    Unable to connect to the server: dial tcp [::1]:6445: connectex: No connection could be made because the target machine actively refused it.

  2. To fix this issue, Run the command below to tell the kubernetes where to find the configuration file:
    [Environment]::SetEnvironmentVariable("KUBECONFIG", $HOME + ".kube\config", [EnvironmentVariableTarget]::Machine)

  3. Reset Kubernetes cluster settings.

Hope this checking configuration properly method helps...

@vedantdave77
Copy link

@vedantdave77 vedantdave77 commented Oct 30, 2020

Hello, I have windows 10 and I also had the same problem, by resetting the kubernetes cluster, now I solved problem.
I was using the docker- desktop and also have the minikube setup. so first I deleted the minikube from the programs and disable the kubernetes from docker desktop.

Then I restart my computer to make sure that the other files removed properly from the file system as well.

For, new installation I used minikube downloading instructions. (https://minikube.sigs.k8s.io/docs/start/). And go with the procedure. After step no. 2, I faced the problem with setup and diverted to "driver page" where, I use the installation with docker section instructions. And, noew my kubernetes works fine.

Short CLI Commands:

choco install minikube
minikube start
minikube start --driver=docker
minikube config set driver docker

Now, run any kubectl command, if you have the deployment yaml file then,...
kubectl apply -f <file path with name>

Give me feed back. Thank you.

@Hamza-Aziz
Copy link

@Hamza-Aziz Hamza-Aziz commented Feb 13, 2021

you can just run the command minikube start --driver=virtualbox with the driver option if you're working with virtualbox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet