AKS icon indicating copy to clipboard operation
AKS copied to clipboard

API calls fails with timeout for logs / port-forward and others

Open ekarlso opened this issue 8 years ago • 53 comments

See kubectl debug output here:

I0308 10:32:21.539580   26486 round_trippers.go:417] curl -k -v -XGET  -H "Accept: application/json, */*" -H "User-Agent: kubectl/v1.8.1 (linux/amd64) kubernetes/f38e43b" -H "Authorization: Bearer x" https://x:443/api/v1/namespaces/default/pods/x/log?container=x
I0308 10:34:32.790295   26486 round_trippers.go:436] GET https://X:443/api/v1/namespaces/default/pods/x/log?container=x 500 Internal Server Error in 131250 milliseconds
I0308 10:34:32.790356   26486 round_trippers.go:442] Response Headers:
I0308 10:34:32.790376   26486 round_trippers.go:445]     Content-Type: application/json
I0308 10:34:32.790390   26486 round_trippers.go:445]     Content-Length: 275
I0308 10:34:32.790414   26486 round_trippers.go:445]     Date: Thu, 08 Mar 2018 09:34:32 GMT
I0308 10:34:32.790504   26486 request.go:836] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Get https://aks-nodepool1-53392281-1:10250/containerLogs/default/x: dial tcp 10.240.0.6:10250: getsockopt: connection timed out","code":500}
I0308 10:34:32.790999   26486 helpers.go:207] server response object: [{
  "metadata": {},
  "status": "Failure",
  "message": "Get https://aks-nodepool1-53392281-1:10250/containerLogs/default/x/x: dial tcp 10.240.0.6:10250: getsockopt: connection timed out",
  "code": 500
}]
F0308 10:34:32.791043   26486 helpers.go:120] Error from server: Get https://aks-nodepool1-53392281-1:10250/containerLogs/default/x/x: dial tcp 10.240.0.6:10250: getsockopt: connection timed out

Also in Azure Cloud Shell it times out so it seems to be a internal error in AKS?

ekarlso avatar Mar 08 '18 09:03 ekarlso

I am also facing this issue #224. @slack @sauryadas can you say when it will be fixed? The AKS is in unusable state right now.

mfaizanse avatar Mar 09 '18 11:03 mfaizanse

@ekarlso @mfaizanse So pulling log does not work? Does kubectl get po works?

JunSun17 avatar Mar 10 '18 01:03 JunSun17

@JunSun17 Yes, kubectl get pods works. I deployed the cluster in west europe.

mfaizanse avatar Mar 10 '18 05:03 mfaizanse

correct @jungchenhung

ekarlso avatar Mar 10 '18 22:03 ekarlso

@ekarlso @mfaizanse Yes, this is a known issue and we are root causing it. Will update when we have more data on it. Thanks!

JunSun17 avatar Mar 11 '18 17:03 JunSun17

@JunSun17 I am also facing this issue in Central US cluster as well. Do you have any estimated timeline, when will this issue be resolved?

mfaizanse avatar Mar 15 '18 13:03 mfaizanse

Logs, exec, and attach all require the master <-> node tunnels to be established. Check that the tunnelfront and kube-svc-redirect pods are up and running:

$ kubectl -n kube-system get po -l component=tunnel
NAME                           READY     STATUS    RESTARTS   AGE
tunnelfront-7644cd56b7-l5jmc   1/1       Running   0          2d
$ kubectl -n kube-system get po -l component=kube-svc-redirect
NAME                      READY     STATUS    RESTARTS   AGE
kube-svc-redirect-pq6kf   1/1       Running   0          2d
kube-svc-redirect-x6sq5   1/1       Running   0          2d
kube-svc-redirect-zjl7x   1/1       Running   1          2d

If the pods are running, deleting tunnelfront pod, it will be recreated after a few minutes:

$ kubectl -n kube-system delete po -l component=tunnel
pod "tunnelfront-7644cd56b7-l5jmc" deleted

slack avatar Mar 15 '18 20:03 slack

$ kubectl logs tunnelfront-67c6c6f4bd-4hjjb -n kube-system
Error from server: Get https://aks-agentpool-xxxxxxx-1:10250/containerLogs/kube-system/tunnelfront-67c6c6f4bd-4hjjb/tunnel-front: dial tcp 10.240.0.5:10250: getsockopt: connection timed out
$ kubectl logs kube-svc-redirect-8k8lh -n kube-system
Error from server: Get https://aks-agentpool-xxxxxxx-2:10250/containerLogs/kube-system/kube-svc-redirect-8k8lh/redirector: dial tcp 10.240.0.6:10250: getsockopt: connection timed out

mfaizanse avatar Mar 16 '18 05:03 mfaizanse

Creating the cluster using Azure CLI resolved the issue.

mfaizanse avatar Mar 16 '18 09:03 mfaizanse

@mfaizanse Sorry for the late reply. I have asked another customer facing the same issue for logs to further investigate this. If you still have the problematic cluster, can you provide the log so we can do further checking:

  1. Find out which node have tunnelfront running: kubectl -n kube-system get po -o wide and you should see something like, tunnelfront-687c6c5f68-t6bbl 1/1 Running 0 20m 10.244.5.42 aks-nodepool1-18710123-0

  2. Login to that agent node aks-nodepool1-xxxxx, and use docker to pull the tunnelfront log (docker container logs --details tunnelfront-xxxxx).

and please post the last 100 lines from the log here.

JunSun17 avatar Mar 16 '18 16:03 JunSun17

I am having the same problem - trying to use helm, receive the following error....

Kubernets cluster on Azuer kubectl is working. helm fails to connect verified tiller is running on

$ helm ls Error: forwarding ports: error upgrading connection: error dialing backend: dial tcp 10.240.0.5:10250: getsockopt: connection timed out

pkelleratwork avatar Mar 20 '18 15:03 pkelleratwork

@pkelleratwork do you experience the log issue too? If so, can you kindly provide the logs based on my comments above.

JunSun17 avatar Mar 20 '18 16:03 JunSun17

I'm experiencing this issue as well, my tunnelfront logs are in this gist

Running into the same issue trying to run helm against a 1.9.2 AKS cluster in Azure

helm ls Error: forwarding ports: error upgrading connection: error dialing backend: dial tcp 10.240.0.4:10250: getsockopt: connection timed out

Nirmalyasen avatar Mar 22 '18 23:03 Nirmalyasen

I am having this same issue using helm as well as kubectl logs.
AKS cluster created via cli about a month ago.
kubectl works for other commands
tiller is running
exact same error as above.

jpatters avatar Mar 26 '18 19:03 jpatters

I've upgraded both kubernetes and helm and things are working again. It would be nice to know what the cause of this was though.

jpatters avatar Mar 27 '18 12:03 jpatters

We are also facing this issue. Cluster is created in West-Europe. kubectl proxy, logs, helm are all not working since today. Yesterday after the cluster was set up everything was working fine. I tried deleting tunnelfront, svc-redirect and proxy but I still can´t see an improvement.

How can we fix that?

vogelinho10 avatar Apr 18 '18 06:04 vogelinho10

We are are also seeing this. please fix

lkt82 avatar Apr 19 '18 08:04 lkt82

is there any update on that issue? we redeployed the cluster 2 weeks ago and are now facing the same issue again!

vogelinho10 avatar May 04 '18 13:05 vogelinho10

I abandoned AKS because of this issue.

jpatters avatar May 11 '18 03:05 jpatters