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

Failed to start Localkude - #1220

Closed
pratikpparikh opened this issue Mar 3, 2017 · 9 comments
Closed

Failed to start Localkude - #1220

pratikpparikh opened this issue Mar 3, 2017 · 9 comments
Labels
kind/support Categorizes issue or PR as a support question. os/windows

Comments

@pratikpparikh
Copy link

pratikpparikh commented Mar 3, 2017

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

Minikube version (use minikube version):
minikube version: v0.17.1

docker version
Client:
Version: 17.03.0-ce
API version: 1.26
Go version: go1.7.5
Git commit: 60ccb22
Built: Thu Feb 23 10:40:59 2017
OS/Arch: windows/amd64

Server:
Version: 17.03.0-ce
API version: 1.26 (minimum version 1.12)
Go version: go1.7.5
Git commit: 3a232c8
Built: Tue Feb 28 07:52:04 2017
OS/Arch: linux/amd64
Experimental: true

Environment:

  • OS (e.g. from /etc/os-release): Windows 10 64bit HyperV Enabled
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName):"DriverName": "hyperv"
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): "Boot2DockerURL": "file://C:/Users/prati/.minikube/cache/iso/minikube-v1.0.7.iso"
  • Install tools: Docker For Windows, Docker Tools for Windows, and Virtual Box
  • Others: Eclipse, Idea, Java 9

What happened: When trying to provision a cluster most steps are successful but the LocalKube service never comes up and recommends that systemctl status localkube is utilized to analyze the problem. Using the following command to configure the cluster and provision it.
.\minikube start --kubernetes-version="v1.6.0-alpha.0" --vm-driver=hyperv --hyperv-virtual-switch=DockerNAT --show-libmachine-logs --alsologtostderr

.\minikube status
minikubeVM: Running
localkube: Stopped

Below is debug log:
Waiting for SSH to be available...
Getting to WaitForSSH function...
(minikube) Calling .GetSSHHostname
(minikube) DBG | [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Get-VM minikube ).state
(minikube) DBG | [stdout =====>] : Running
(minikube) DBG |
(minikube) DBG | [stderr =====>] :
(minikube) DBG | [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Get-VM minikube ).networkadapters[0]).ipaddresses[0]
(minikube) DBG | [stdout =====>] : fe80::215:5dff:fe38:143
(minikube) DBG |
(minikube) Calling .GetSSHPort
(minikube) DBG | [stderr =====>] :
(minikube) Calling .GetSSHKeyPath
(minikube) Calling .GetSSHKeyPath
(minikube) Calling .GetSSHUsername
SSH binary not found, using native Go implementation
&{{{ 0 [] [] []} docker [0x1169ea0] []} fe80::215:5dff:fe38:143 22 }
About to run SSH command:
exit 0
Error dialing TCP: dial tcp [fe80::215:5dff:fe38:143]:22: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Error dialing TCP: dial tcp [fe80::215:5dff:fe38:143]:22: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

What you expected to happen:
.\minikube status
minikubeVM: Running
localkube: Running

How to reproduce it (as minimally and precisely as possible):
Create a new docker with hyperv driver.
Create minikube using the above command

Anything else do we need to know:
Using DockerNAT for both cases and it is set to Internal

@aaron-prindle
Copy link
Contributor

aaron-prindle commented Mar 3, 2017

@pratikpparikh Can you try creating another virtual switch in hyperv that is separate from DockerNAT and setting minikube to use that? Minikube w/ hyperv has never worked for me using the DockerNAT virtual switch. Also make sure that the virtual switch has internet access. An example of setting up a new virtual switch can be seen here:
#754 (comment)

@aaron-prindle aaron-prindle added os/windows kind/support Categorizes issue or PR as a support question. labels Mar 3, 2017
@pratikpparikh
Copy link
Author

pratikpparikh commented Mar 3, 2017

@aaron-prindle I made sure to create a new virtual switch with external connect and it connect to outside world. I confirm that when the minikube started the cluster but i see run into a problem where localkube still fails (any pointer will be helpfull). Additionally, I do see on the minikube vm "jounralctl -xe" does have a error that might help but don't know how the internal communication is happen. In any case the error is "localkube.service: Main process exited,code=exited, status=2/INVALIDARGUMENT" further down it says unknown flag: --apiserver-name:

PS C:\opt\development\cloud\kubernetes> .\minikube-windows-amd64.exe start --kubernetes-version="v1.6.0-alpha.0" --vm-dr
iver=hyperv --hyperv-virtual-switch=minikube1 --show-libmachine-logs --alsologtostderr

--show-libmachine-logs is deprecated.
Please use --v=3 to show libmachine logs, and --v=7 for debug level libmachine logs

I0303 14:39:12.885349 6932 notify.go:112] Checking for updates...
Starting local Kubernetes cluster...
Starting VM...
I0303 14:39:13.021769 6932 downloader.go:56] Not caching ISO, using https://storage.googleapis.com/minikube/iso/minik
ube-v1.0.7.iso
SSH-ing files into VM...
Setting up certs...
I0303 14:40:17.701640 6932 cluster.go:241] Setting up certificates for IP: %s 10.0.0.24
Starting cluster components...
I0303 14:40:19.137126 6932 cluster.go:174]
if which systemctl 2>&1 1>/dev/null; then
printf %s "[Unit]
Description=Localkube
Documentation=https://github.com/kubernetes/minikube/tree/master/pkg/localkube

Wants=network-online.target
After=network-online.target

[Service]
Type=notify
Restart=always
RestartSec=3

ExecStart=/usr/local/bin/localkube --generate-certs=false --logtostderr=true --enable-dns=false --node-ip=10.0.0.24 --
apiserver-name=minikubeCA

ExecReload=/bin/kill -s HUP $MAINPID

[Install]
WantedBy=multi-user.target
" | sudo tee /usr/lib/systemd/system/localkube.service
sudo systemctl daemon-reload
sudo systemctl enable localkube.service
sudo systemctl restart localkube.service || true
else
sudo killall localkube || true

Run with nohup so it stays up. Redirect logs to useful places.

sudo sh -c 'PATH=/usr/local/sbin:$PATH nohup /usr/local/bin/localkube --generate-certs=false --logtostderr=true --enab
le-dns=false --node-ip=10.0.0.24 --apiserver-name=minikubeCA > /var/lib/localkube/localkube.out 2> /var/lib/localkube/lo
calkube.err < /dev/null & echo $! > /var/run/localkube.pid &'

fi

I0303 14:40:20.746061 6932 cluster.go:176] [Unit]
Description=Localkube
Documentation=https://github.com/kubernetes/minikube/tree/master/pkg/localkube

Wants=network-online.target
After=network-online.target

[Service]
Type=notify
Restart=always
RestartSec=3

ExecStart=/usr/local/bin/localkube --generate-certs=false --logtostderr=true --enable-dns=false --node-ip=10.0.0.24 --
apiserver-name=minikubeCA

ExecReload=/bin/kill -s HUP

[Install]
WantedBy=multi-user.target
Created symlink /etc/systemd/system/multi-user.target.wants/localkube.service → /lib/systemd/system/localkube.service.
Job for localkube.service failed because the control process exited with error code.
See "systemctl status localkube.service" and "journalctl -xe" for details.

Connecting to cluster...
Setting up kubeconfig...
I0303 14:40:22.000021 6932 config.go:68] Using kubeconfig: C:\Users\prati/.kube/config
Kubectl is now configured to use the cluster.
PS C:\opt\development\cloud\kubernetes> .\minikube-windows-amd64.exe cluster-info
Error: unknown command "cluster-info" for "minikube"
Run 'minikube --help' for usage.
F0303 14:41:33.160088 8144 root.go:115] unknown command "cluster-info" for "minikube"
PS C:\opt\development\cloud\kubernetes> .\kubectl.exe cluster-info
Unable to connect to the server: dial tcp 10.0.0.24:8443: connectex: No connection could be made because the target mach
ine actively refused it.
PS C:\opt\development\cloud\kubernetes> .\minikube-windows-amd64.exe status
minikubeVM: Running
localkube: Stopped

@pratikpparikh
Copy link
Author

manually updated the localkube.service to not pass in the apiserver-name parameter

@r2d4
Copy link
Contributor

r2d4 commented Mar 3, 2017

Reopening as it looks like theres a bug here with the extra newline

ExecStart=/usr/local/bin/localkube --generate-certs=false --logtostderr=true --enable-dns=false --node-ip=10.0.0.24 --
apiserver-name=minikubeCA

@r2d4 r2d4 reopened this Mar 3, 2017
@jdrakes
Copy link

jdrakes commented Mar 7, 2017

I also have an issue with minikube v0.17.X when trying to use versions of Kubernetes v1.5.2 and lower where the logs say unknown flag: --apiserver-name. Is there a way to work around this flag so that I can use whatever Kubernetes version i want?

@aaron-prindle
Copy link
Contributor

This flag was recently added but it breaking old localkube versions which do not take this flag. We can change this so that the flag is only passed in when specified.

@pratikpparikh
Copy link
Author

When can this be changed?

@r2d4
Copy link
Contributor

r2d4 commented Mar 16, 2017

Once this is merged #1245

@fearphage
Copy link

Do you have a schedule for releases? When can we plan to see this hit GA?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. os/windows
Projects
None yet
Development

No branches or pull requests

5 participants