kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.31k stars 4.88k forks source link

Cisco AnyConnect: A connection attempt failed because the connected party did not properly respond #3388

Closed bretcj7 closed 5 years ago

bretcj7 commented 5 years ago

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

Please provide the following details:

Environment:

Minikube version (use minikube version): v0.30.0

What happened:

What you expected to happen: minikube to start

How to reproduce it (as minimally and precisely as possible): Download minikube for windows and start with minikube start --vm-driver=hyperv --hyperv-virtual-switch=minikube --v=999 --logtostderr after setting up the virtual switch

Output of minikube logs (if applicable): Start Log: `PS C:\windows\system32> minikube start --vm-driver=hyperv --hyperv-virtual-switch=minikube --v=999 --logtostderr W1130 10:29:32.433041 22484 root.go:146] Error reading config file at C:\Users\BJASKELA.minikube\config\config.json: open C:\Users\BJASKELA.minikube\config\config.json: The system cannot find the file specified. I1130 10:29:32.434037 22484 notify.go:121] Checking for updates... I1130 10:29:34.497036 22484 start.go:99] Viper configuration: Aliases: map[string]string{} Override: map[string]interface {}{"v":"999"} PFlags: map[string]viper.FlagValue{"bootstrapper":viper.pflagValue{flag:(pflag.Flag)(0xc042016d20)}, "apiserver-names":viper.pflagValue{flag:(pflag.Flag)(0xc0420221e0)}, "gpu":viper.pflagValue{flag:(pflag.Flag)(0xc042022aa0)}, "uuid":viper.pflagValue{flag:(pflag.Flag)(0xc0420228c0)}, "xhyve-disk-driver":viper.pflagValue{flag:(pflag.Flag)(0xc042017e00)}, "keep-context":viper.pflagValue{flag:(pflag.Flag)(0xc042017680)}, "kvm-network":viper.pflagValue{flag:(pflag.Flag)(0xc042017d60)}, "network-plugin":viper.pflagValue{flag:(pflag.Flag)(0xc042022640)}, "registry-mirror":viper.pflagValue{flag:(pflag.Flag)(0xc042022460)}, "cache-images":viper.pflagValue{flag:(pflag.Flag)(0xc042022780)}, "disk-size":viper.pflagValue{flag:(pflag.Flag)(0xc042017b80)}, "dns-domain":viper.pflagValue{flag:(pflag.Flag)(0xc042022320)}, "docker-opt":viper.pflagValue{flag:(pflag.Flag)(0xc0420220a0)}, "vm-driver":viper.pflagValue{flag:(pflag.Flag)(0xc0420179a0)}, "disable-driver-mounts":viper.pflagValue{flag:(pflag.Flag)(0xc042017860)}, "hyperv-virtual-switch":viper.pflagValue{flag:(pflag.Flag)(0xc042017cc0)}, "mount":viper.pflagValue{flag:(pflag.Flag)(0xc042017720)}, "apiserver-ips":viper.pflagValue{flag:(pflag.Flag)(0xc042022280)}, "extra-config":viper.pflagValue{flag:(pflag.Flag)(0xc042022820)}, "host-only-cidr":viper.pflagValue{flag:(pflag.Flag)(0xc042017c20)}, "kubernetes-version":viper.pflagValue{flag:(pflag.Flag)(0xc0420225a0)}, "nfs-share":viper.pflagValue{flag:(pflag.Flag)(0xc042017ea0)}, "apiserver-name":viper.pflagValue{flag:(pflag.Flag)(0xc042022140)}, "docker-env":viper.pflagValue{flag:(pflag.Flag)(0xc042022000)}, "hyperkit-vpnkit-sock":viper.pflagValue{flag:(pflag.Flag)(0xc042022960)}, "iso-url":viper.pflagValue{flag:(pflag.Flag)(0xc042017900)}, "mount-string":viper.pflagValue{flag:(pflag.Flag)(0xc0420177c0)}, "insecure-registry":viper.pflagValue{flag:(pflag.Flag)(0xc0420223c0)}, "memory":viper.pflagValue{flag:(pflag.Flag)(0xc042017a40)}, "nfs-shares-root":viper.pflagValue{flag:(pflag.Flag)(0xc042017f40)}, "profile":viper.pflagValue{flag:(pflag.Flag)(0xc042016c80)}, "container-runtime":viper.pflagValue{flag:(pflag.Flag)(0xc042022500)}, "cpus":viper.pflagValue{flag:(pflag.Flag)(0xc042017ae0)}, "feature-gates":viper.pflagValue{flag:(pflag.Flag)(0xc0420226e0)}, "hyperkit-vsock-ports":viper.pflagValue{flag:(*pflag.Flag)(0xc042022a00)}} Env: map[string]string{} Key/Value Store: map[string]interface {}{} Config: map[string]interface {}{} Defaults: map[string]interface {}{"v":"0", "alsologtostderr":"false", "wantreporterror":false, "wantreporterrorprompt":true, "wantkubectldownloadmsg":true, "showdriverdeprecationnotification":true, "showbootstrapperdeprecationnotification":true, "log_dir":"", "wantupdatenotification":true, "reminderwaitperiodinhours":24, "wantnonedriverwarning":true} Starting local Kubernetes v1.10.0 cluster... Starting VM... I1130 10:29:34.501030 22484 utils.go:100] retry loop 0 I1130 10:29:34.502029 22484 cluster.go:73] Skipping create...Using existing machine configuration [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state [stdout =====>] : Running

[stderr =====>] : I1130 10:29:37.411031 22484 cluster.go:82] Machine state: Running Waiting for SSH to be available... Getting to WaitForSSH function... [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state [stdout =====>] : Running

[stderr =====>] : [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Hyper-V\Get-VM minikube ).networkadapters[0]).ipaddresses[0] [stdout =====>] : 10.0.0.17

[stderr =====>] : Using SSH client type: native &{{{ 0 [] [] []} docker [0x815090] 0x815060 [] 0s} 10.0.0.17 22 } About to run SSH command: exit 0 Error dialing TCP: dial tcp 10.0.0.17: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 10.0.0.17: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 10.0.0.17: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.`

machines\minikube\config.json { "ConfigVersion": 3, "Driver": { "IPAddress": "", "MachineName": "minikube", "SSHUser": "docker", "SSHPort": 0, "SSHKeyPath": "", "StorePath": "C:\\Users\\ASKELA\\.minikube", "SwarmMaster": false, "SwarmHost": "", "SwarmDiscovery": "", "Boot2DockerURL": "file://C:/Users/ASKELA/.minikube/cache/iso/minikube-v0.30.0.iso", "VSwitch": "minikube", "DiskSize": 20000, "MemSize": 2048, "CPU": 2, "MacAddr": "", "VLanID": 0, "DisableDynamicMemory": false }, "DriverName": "hyperv", "HostOptions": { "Driver": "", "Memory": 0, "Disk": 0, "EngineOptions": { "ArbitraryFlags": null, "Dns": null, "GraphDir": "", "Env": null, "Ipv6": false, "InsecureRegistry": [ "10.96.0.0/12" ], "Labels": null, "LogLevel": "", "StorageDriver": "", "SelinuxEnabled": false, "TlsVerify": false, "RegistryMirror": null, "InstallURL": "" }, "SwarmOptions": { "IsSwarm": false, "Address": "", "Discovery": "", "Agent": false, "Master": false, "Host": "", "Image": "", "Strategy": "", "Heartbeat": 0, "Overcommit": 0, "ArbitraryFlags": null, "ArbitraryJoinFlags": null, "Env": null, "IsExperimental": false }, "AuthOptions": { "CertDir": "C:\\Users\\askela\\.minikube", "CaCertPath": "C:\\Users\\askela\\.minikube\\certs\\ca.pem", "CaPrivateKeyPath": "C:\\Users\\askela\\.minikube\\certs\\ca-key.pem", "CaCertRemotePath": "", "ServerCertPath": "C:\\Users\\askela\\.minikube\\machines\\server.pem", "ServerKeyPath": "C:\\Users\\askela\\.minikube\\machines\\server-key.pem", "ClientKeyPath": "C:\\Users\\askela\\.minikube\\certs\\key.pem", "ServerCertRemotePath": "", "ServerKeyRemotePath": "", "ClientCertPath": "C:\\Users\\askela\\.minikube\\certs\\cert.pem", "ServerCertSANs": null, "StorePath": "C:\\Users\\askela\\.minikube" } }, "Name": "minikube" } Anything else do we need to know: I am connected to a work domain via Cisco AnyConnect VPN.

tstromberg commented 5 years ago

I suspect you will need to either configure the Cisco AnyConnect VPN to allow packets to 10.0.0.* to route to HyperV instead of the VPN, or disable it altogether when you use HyperV.

Alternatively, you may have better luck with Virtualbox, which uses a different IP range.

bretcj7 commented 5 years ago

To try and rule out if it was an issue with AnyConnect i created a new external virtual switch using my local lan adapter when i am at my corporate office on their ad domain so i don't need VPN. When i do the command now it get:

minikube start --vm-driver hyperv --hyperv-virtual-switch "officemini" --v=999 --logtostderr W1205 13:30:09.187039 28296 root.go:146] Error reading config file at C:\Users.minikube\config\config.json: open C:\Users.minikube\config\config.json: The system cannot find the file specified. I1205 13:30:09.188044 28296 notify.go:121] Checking for updates... I1205 13:30:10.607971 28296 start.go:99] Viper configuration:

About to run SSH command: exit 0 Error dialing TCP: dial tcp [fe80::215:5dff:fe00:1411]:22: connectex: A socket operation was attempted to an unreachable network. Error dialing TCP: dial tcp [fe80::215:5dff:fe00:1411]:22: connectex: A socket operation was attempted to an unreachable network.

fejta-bot commented 5 years ago

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

fejta-bot commented 5 years ago

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

tstromberg commented 5 years ago

VPN configs now have documentation: https://minikube.sigs.k8s.io/docs/reference/networking/vpn/