openyurtio / openyurt

OpenYurt - Extending your native Kubernetes to edge(project under CNCF)
https://openyurt.io
Apache License 2.0
1.69k stars 398 forks source link

[BUG] kubectl logs , exec error from server ( service Unavailable) #1957

Closed aravindgpd closed 5 months ago

aravindgpd commented 6 months ago

What happened: currently configured 7 node cluster with 3 controlplane nodes and 4 edgeboxs followed the documentation of openyurt 1.4.0 after the cluster formation and gateway configuration, tried "kubectl logs " expected the pod logs , instead got the below error message.

Error from server ( ServiceUnavailable): the server is currently unable to handle the request ( pods/log yurt-hub-edgebox2)

below is the logs from ravenagent pod running in controlplane node ravenagent.log

All the gateway have activeEndpoints status true for both type ( tunnel,proxy)

please let me know for any additional details.

What you expected to happen: should be able to see the logs of pod running in the edge node.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

others

/kind bug

rambohe-ch commented 6 months ago

@River-sh PTAL

River-sh commented 6 months ago

You can check the ravenagent log of the edge node to see if the backlink has been established

aravindgpd commented 5 months ago

@River-sh Thank you for the suggestion, in cloud gateway public ip was missing for type: proxy , once after modifying the cloud gateway and restarting all the raven agents, i was able to do exec and logs for the application running in edge box

aravindgpd commented 5 months ago

@River-sh , one more issue not related to this topic but need help , services running in the edgebox are getting timed-out , eg: below are the logs from application running in edgebox

time="2024-02-26T04:38:54Z" level=info msg="CSI Driver: driver.longhorn.io version: v1.6.0, manager URL http://longhorn-backend.longhorn-system.svc.cluster.local:9500/v1" func="csi.(*Manager).Run" file="manager.go:23"
time="2024-02-26T04:39:04Z" level=fatal msg="Error starting CSI manager: Failed to initialize Longhorn API client: Get \"http://longhorn-backend.longhorn-system.svc.cluster.local:9500/v1\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)" func=app.CSICommand.func1 file="csi.go:37"

i have annotated the service with "openyurt.io/topologyKeys: openyurt.io/nodepool" and update the yurt-hub-cfg in kube-system namespace

root@va-cloudlyte-03:/home/ubuntu# kubectl get cm -n kube-system yurt-hub-cfg -o yaml
apiVersion: v1
data:
  cache_agents: ""
  discardcloudservice: ""
  masterservice: ""
  servicetopology: worker,edgebox
kind: ConfigMap
metadata:
  annotations:
    meta.helm.sh/release-name: yurt-hub
    meta.helm.sh/release-namespace: kube-system
  creationTimestamp: "2024-02-07T03:50:48Z"
  labels:
    app.kubernetes.io/instance: yurt-hub
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: yurthub
    app.kubernetes.io/version: 1.4.0
    helm.sh/chart: yurthub-1.4.1
  name: yurt-hub-cfg
  namespace: kube-system
  resourceVersion: "38494969"
  selfLink: /api/v1/namespaces/kube-system/configmaps/yurt-hub-cfg
  uid: 10a70d69-629e-4e17-8bde-9b6368c32dd6