Simplified network and services for edge applications

Overview

English | 简体中文

EdgeMesh

CI Go Report Card GitHub license Releases

Introduction

EdgeMesh is a part of KubeEdge, and provides a simple network solution for the inter-communications between services at edge scenarios.

Background

KubeEdge is build based on Kubernetes, extending cloud-native containerized application orchestration capabilities to the edge. However, at the scenario of edge computer, the network topology is more complex. Edge nodes in different areas are offen not interconnected, and the inter-communication of traffic between applications is the primary requirement of the business. For this scenairo, EdgeMesh offers a solution.

Motivation

As the component of data panel on a KubeEdge cluster, EdgeMesh offers sample capacities (e.g, service discovery, traffic proxy, etc.) for applications running on the KubeEdge cluster, thus shielding the complex network topology at the edge scenairo.

Advantage

EdgeMesh satisfies the new requirements in edge scenarios (e.g., limited edge resources, unstable edge cloud network, etc.), that is, high availability, high reliability, and extreme lightweight:

  • High availability
    • Open up the network between edge nodes by using the edge cloud channel in KubeEdge
    • Divide the communication between edge nodes into intra-LAN and cross-LAN
      • Intra-LAN communication: direct access
      • Cross-LAN communication: forwarding through the cloud
  • High reliability (offline scenario)
    • Both control plane and data plane traffic are delivered through the edge cloud channel
    • EdgeMesh internally implements a lightweight DNS server, thus no longer accessing the cloud DNS
  • Extreme lightweight
    • Each node has one and only one EdgeMesh, which saves edge resources
User value
  • For edge devices with limited resources, EdgeMesh provides a lightweight and highly integrated software with service discovery
  • In the scene of Field Edge, compared to the mechanism of coredns + kube-proxy + cni service discovery , users only need to simply deploy an EdgeMesh to finish their goals

Key Features

Feature Sub-Feature Realization Degree
Service Discovery /
Traffic Governance HTTP
TCP
Websocket
HTTPS
Load Balance Random
Round Robin
Session Persistence
External Access /
Multi-NIC Monitoring /
Cross-Subnet Communication Cross-Cloud Communication +
Cross-LAN E2E Communication +
Edge CNI Cross-Subnet Pod Communication +

Noting:

  • Features supported by the EdgeMesh version
  • + Features not available in the EdgeMesh version, but will be supported in subsequent versions
  • - Features not available in the EdgeMesh version, or deprecated features

Future Works

At present, the implementation of EdgeMesh relies on the connectivity of the host network. In the future, EdgeMesh will realize the capabilities of CNI plug-ins, and realize the Pod network connectivity between edge nodes and nodes on the cloud, or edge nodes across LANs in a compatible manner with mainstream CNI plug-ins (e.g., flannel / calico, etc). Finally, EdgeMesh can even replace part of its own components with cloud-native components (e.g., replacing kube-proxy to achieve the capabilities of the Cluster IP, replacing node local dns cache to achieve node-level dns capabilities, and replace envoy to achieve mesh-layer capabilities).

Architecture

To ensure the capability of service discovery in some edge devices with low-version kernels or low-version iptables, EdgeMesh adopts the userspace mode in its implementation of the traffic proxy. In addition, it also comes with a lightweight DNS resolver. As shown in the figure above, the core components of EdgeMesh include:

  • Proxier: Responsible for configuring the kernel's iptables rules, and intercepting requests to the EdgeMesh process
  • DNS: Built-in DNS resolver, which resolves the DNS request in the node into a service cluster IP
  • Traffic: A traffic forwarding module based on the Go-chassis framework, which is responsible for forwarding traffic between applications
  • Controller: Obtains metadata (e.g., Service, Endpoints, Pod, etc.) through the list-watch capability on the edge side of KubeEdge

How It Works

  • Through the capability of list-watch on the edge of KubeEdge, EdgeMesh monitors the addition, deletion and modification of metadata (e.g., Services and Endpoints), and then creates iptables rules based on Services and Endpoints
  • EdgeMesh uses the same ways (e.g., Cluster IP, domain name) as the K8s Service to access services
  • When client's requests accessing a service reach a node with EdgeMesh, it will enter the kernel's iptables at first
  • The iptables rules previously configured by EdgeMesh will redirect requests, and forward them all to the port 40001 which is occupied by the EdgeMesh process (data packets from kernel mode to user mode)
  • After requests enter the EdgeMesh process, the EdgeMesh process completes the selection of backend Pods (load balancing occurs here), and then sends requests to the host where the Pod is located

Getting Started

Prerequisites

Before using EdgeMesh, you need to understand the following prerequisites at first:

  • when using edgemesh's capabilities, the Pod is required a hostPort (as shown in following examples)
  • while using DestinationRule, the name of the DestinationRule must be equal to the name of the corresponding Service. Edgemesh will determine the DestinationRule in the same namespace according to the name of the Service
  • Service ports must be named. The key/value pairs of port name must have the following syntax: name: <protocol>[-<suffix>]

Deployment

At the edge node, close EdgeMesh, open metaserver, and restart edgecore

$ vim /etc/kubeedge/config/edgecore.yaml
modules:
  ..
  edgeMesh:
    enable: false
  metaManager:
    metaServer:
      enable: true
..
$ systemctl restart edgecore

On the cloud, open the dynamic controller module, and restart cloudcore

$ vim /etc/kubeedge/config/cloudcore.yaml
modules:
  ..
  dynamicController:
    enable: true
..

At the edge node, check if list-watch works

$ curl 127.0.0.1:10550/api/v1/services
{"apiVersion":"v1","items":[{"apiVersion":"v1","kind":"Service","metadata":{"creationTimestamp":"2021-04-14T06:30:05Z","labels":{"component":"apiserver","provider":"kubernetes"},"name":"kubernetes","namespace":"default","resourceVersion":"147","selfLink":"default/services/kubernetes","uid":"55eeebea-08cf-4d1a-8b04-e85f8ae112a9"},"spec":{"clusterIP":"10.96.0.1","ports":[{"name":"https","port":443,"protocol":"TCP","targetPort":6443}],"sessionAffinity":"None","type":"ClusterIP"},"status":{"loadBalancer":{}}},{"apiVersion":"v1","kind":"Service","metadata":{"annotations":{"prometheus.io/port":"9153","prometheus.io/scrape":"true"},"creationTimestamp":"2021-04-14T06:30:07Z","labels":{"k8s-app":"kube-dns","kubernetes.io/cluster-service":"true","kubernetes.io/name":"KubeDNS"},"name":"kube-dns","namespace":"kube-system","resourceVersion":"203","selfLink":"kube-system/services/kube-dns","uid":"c221ac20-cbfa-406b-812a-c44b9d82d6dc"},"spec":{"clusterIP":"10.96.0.10","ports":[{"name":"dns","port":53,"protocol":"UDP","targetPort":53},{"name":"dns-tcp","port":53,"protocol":"TCP","targetPort":53},{"name":"metrics","port":9153,"protocol":"TCP","targetPort":9153}],"selector":{"k8s-app":"kube-dns"},"sessionAffinity":"None","type":"ClusterIP"},"status":{"loadBalancer":{}}}],"kind":"ServiceList","metadata":{"resourceVersion":"377360","selfLink":"/api/v1/services"}}

Build EdgeMesh image (not necessary)

$ docker build -t edgemesh:0.1 -f build/Dockerfile .

Deploy EdgeMesh

# Please set the subNet to the value of service-cluster-ip-range of kube-apiserver.
# You can obtain the value from the /etc/kubernetes/manifests/kube-apiserver.yaml file on the master node
$ kubectl apply -f build/kubernetes/edgemesh/03-configmap.yaml
configmap/edgemesh-cfg created
$ kubectl apply -f build/kubernetes/edgemesh/04-daemonset.yaml
daemonset.apps/edgemesh created

Test Case

HTTP

At the edge node, deploy a HTTP container application, and relevant service

$ kubectl apply -f example/hostname.yaml

Go to that edge node, use ‘curl’ to access the service, and print out the hostname of the container

$ curl hostname-lb-svc.edgemesh-test:12345

TCP

At the edge node 1, deploy a TCP container application, and relevant service

$ kubectl apply -f example/tcp-echo-service.yaml

At the edge node 1, use ‘telnet’ to access the service

$ telnet tcp-echo-service.edgemesh-test 2701

Websocket

At the edge node 1, deploy a websocket container application, and relevant service

$ kubectl apply -f example/websocket-pod-svc.yaml

Enter the container, and use ./client to access the service

$ docker exec -it 2a6ae1a490ae bash
$ ./client --addr ws-svc.edgemesh-test:12348

Load Balance

The capability of load balance needs to add the CRD 'DestinationRule'

$ kubectl apply -f build/istio/destinationrule-crd.yaml
customresourcedefinition.apiextensions.k8s.io/destinationrules.networking.istio.io created

Use the 'loadBalancer' in 'DestinationRule' to select LB modes

$ vim example/hostname-lb-random.yaml
spec
..
  trafficPolicy:
    loadBalancer:
      simple: RANDOM
..    

EdgeMesh Ingress Gateway

EdgeMesh ingress gateway provides a ability to access services in external edge nodes.

HTTP Gateway

Create two CRDs: 'Gateway' and 'VirtualService'

$ kubectl apply -f build/istio/gateway-crd.yaml
customresourcedefinition.apiextensions.k8s.io/gateways.networking.istio.io created
$ kubectl apply -f build/istio/virtualservice-crd.yaml
customresourcedefinition.apiextensions.k8s.io/virtualservices.networking.istio.io created

Deploy edgemesh-gateway

$ kubectl apply -f 03-configmap.yaml 
configmap/edgemesh-gateway-cfg created
$ kubectl apply -f 04-deployment.yaml 
deployment.apps/edgemesh-gateway created

Create 'Gateway' and 'VirtualService'

$ kubectl apply -f example/hostname-lb-random-gateway.yaml
pod/hostname-lb-edge2 created
pod/hostname-lb-edge3 created
service/hostname-lb-svc created
gateway.networking.istio.io/edgemesh-gateway configured
destinationrule.networking.istio.io/hostname-lb-edge created
virtualservice.networking.istio.io/edgemesh-gateway-svc created

Check if the edgemesh-gateway is successfully deployed

$ kubectl get gw -n edgemesh-test
NAME               AGE
edgemesh-gateway   3m30s

Finally, use the IP and the port exposed by the VirtualService to access

$ curl 192.168.0.211:12345

HTTPS GateWay

Create a test key file

$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=kubeedge.io"
Generating a RSA private key
............+++++
.......................................................................................+++++
writing new private key to 'tls.key'
-----

Create a 'Secret' according to the key file

$ kubectl create secret tls gw-secret --key tls.key --cert tls.crt -n edgemesh-test
secret/gw-secret created

Create a Secret-bound 'Gateway' and routing rules 'VirtualService'

$ kubectl apply -f example/hostname-lb-random-gateway-tls.yaml
pod/hostname-lb-edge2 created
pod/hostname-lb-edge3 created
service/hostname-lb-svc created
gateway.networking.istio.io/edgemesh-gateway configured
destinationrule.networking.istio.io/hostname-lb-edge created
virtualservice.networking.istio.io/edgemesh-gateway-svc created

Finally, use the certificate for a HTTPS access

$ curl -k --cert ./tls.crt --key ./tls.key https://192.168.0.129:12345

Contact

If you need support, start with the 'Operation Guidance', and then follow the process that we've outlined

If you have any question, please contact us through the recommended information on KubeEdge

Comments
  • edge access edge is normal, but edge and cloud access to each other is abnormal!

    edge access edge is normal, but edge and cloud access to each other is abnormal!

    edge access edge is normal, but edge and cloud access to each other is abnormal!

    EdgeMesh version: release-1.8

    Kubernetes version (use kubectl version): 1.19

    KubeEdge version(e.g. cloudcore --version and edgecore --version): 1.8

    1. cloud node

    [[email protected] ~]#  kubectl get pod -o wide -A
    NAMESPACE     NAME                                      READY   STATUS       RESTARTS   AGE     IP              NODE           NOMINATED NODE   READINESS GATES
    default       busybox-sleep-cloud                       1/1     Running      0          129m    10.1.235.198    k8s-master     <none>           <none>
    default       busybox-sleep-edge                        1/1     Running      0          129m    172.17.0.6      kubeedge-129   <none>           <none>
    default       nginx1-b97c459f7-s6t7w                    1/1     Running      0          3h48m   172.17.0.3      kubeedge-129   <none>           <none>
    default       nginx2-5fc4444698-4rgtj                   1/1     Running      0          3h48m   172.17.0.4      kubeedge-129   <none>           <none>
    default       tcp-echo-7f6868b7cd-5jxlz                 1/1     Running      0          114m    172.17.0.2      kubeedge-129   <none>           <none>
    default       tcp-echo-cloud                            1/1     Running      0          129m    10.1.235.197    k8s-master     <none>           <none>
    default       tcp-echo-edge                             1/1     Running      0          131m    172.17.0.5      kubeedge-129   <none>           <none>
    kube-system   calico-kube-controllers-bcc6f659f-l8mt7   1/1     Running      0          30h     10.1.235.195    k8s-master     <none>           <none>
    kube-system   calico-node-g77nv                         1/1     Running      0          30h     192.168.1.228   k8s-master     <none>           <none>
    kube-system   calico-node-r4vvl                         0/1     Init:Error   8          21h     192.168.1.81    kubeedge-129   <none>           <none>
    kube-system   coredns-6c76c8bb89-8j8hd                  1/1     Running      0          30h     10.1.235.193    k8s-master     <none>           <none>
    kube-system   coredns-6c76c8bb89-ksfv6                  1/1     Running      0          30h     10.1.235.194    k8s-master     <none>           <none>
    kube-system   etcd-k8s-master                           1/1     Running      0          30h     192.168.1.228   k8s-master     <none>           <none>
    kube-system   kube-apiserver-k8s-master                 1/1     Running      0          30h     192.168.1.228   k8s-master     <none>           <none>
    kube-system   kube-controller-manager-k8s-master        1/1     Running      0          30h     192.168.1.228   k8s-master     <none>           <none>
    kube-system   kube-proxy-74jbw                          1/1     Running      0          30h     192.168.1.228   k8s-master     <none>           <none>
    kube-system   kube-proxy-g7l4t                          1/1     Running      0          21h     192.168.1.81    kubeedge-129   <none>           <none>
    kube-system   kube-scheduler-k8s-master                 1/1     Running      0          30h     192.168.1.228   k8s-master     <none>           <none>
    kubeedge      edgemesh-agent-edge-98c4s                 1/1     Running      0          3h13m   192.168.1.81    kubeedge-129   <none>           <none>
    kubeedge      edgemesh-server-5f4d8b8b5b-jt9qm          1/1     Running      0          7h24m   192.168.1.228   k8s-master     <none>           <none>
    
    [[email protected] ~]#   kubectl get svc
    NAME                 TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)    AGE
    kubernetes           ClusterIP   10.1.0.1       <none>        443/TCP    30h
    nginx1               ClusterIP   10.1.232.131   <none>        8001/TCP   3h51m
    nginx2               ClusterIP   10.1.166.230   <none>        8002/TCP   3h51m
    tcp-echo-cloud-svc   ClusterIP   10.1.133.252   <none>        2701/TCP   132m
    tcp-echo-edge-svc    ClusterIP   10.1.221.4     <none>        2701/TCP   134m
    tcp-echo-service     ClusterIP   10.1.34.169    <none>        2701/TCP   117m
    

    2. edge access edge success

    [[email protected] ~]#  kubectl exec -it nginx2-5fc4444698-4rgtj bash
    telnet tcp-echo-service.default.svc.cluster.local 2701
    Welcome, you are connected to node kubeedge-129.
    In namespace default.
    With IP address 172.17.0.2.
    Service default.
    

    3. edge access cloud fail

    [[email protected] ~]#  kubectl exec -it tcp-echo-edge sh
    telnet tcp-echo-cloud-svc.default.svc.cluster.local 2701
    blocking no response ......
    
    [[email protected] ~]#  kubectl logs -f -n kubeedge edgemesh-agent-edge-98c4s
    I1008 10:56:54.582465       1 dns.go:73] dns server parse tcp-echo-cloud-svc.default.svc.cluster.local. ip 10.1.133.252
    

    4. cloud access edge success

    [[email protected] edgemesh-1.8.0]# telnet tcp-echo-edge-svc.default.svc.cluster.local 2701
    Trying 10.1.182.158...
    Connected to tcp-echo-edge-svc.default.svc.cluster.local.
    Escape character is '^]'.
    Welcome, you are connected to node kubeedge-129.
    Running on Pod tcp-echo-edge.
    In namespace default.
    With IP address 172.17.0.2.
    Service default.
    

    5. cloud access cloud success

     [[email protected] ~]# kubectl exec -it busybox-sleep-cloud bash
        / # telnet tcp-echo-cloud-svc.default.svc.cluster.local 2701
        Welcome, you are connected to node k8s-master.
        Running on Pod tcp-echo-cloud.
        In namespace default.
        With IP address 10.1.235.197.
        Service default.
    

    6. edge and cloud access to each other is abnormal ?

    edge access edge is normal, but edge access cloud is abnormal, cloudaccess edge is abnormal .
    please help me.
    
    kind/bug 
    opened by 844700118 39
  • can not  generate the iptables rules

    can not generate the iptables rules

    I deploy edmesh-agent-edge on my edge server,and the log is like the image below,but there are no iptables rules generate about the edgemesh . the port 53 is not listening . Uploading 123.jpg…

    kind/bug 
    opened by pengbinbin1 33
  • coredns readiness probe failed after installing edgemesh

    coredns readiness probe failed after installing edgemesh

    HI, Below is the describe for the coredns pod. I have used kubeedge.

    Type Reason Age From Message


    Normal Created 28m kubelet Created container coredns Warning Unhealthy 28m kubelet Readiness probe failed: Get "http://10.40.69.200:8181/ready": read tcp 192.168.15.136:34086->10.40.69.200:8181: read: connection reset by peer Warning Unhealthy 27m kubelet Readiness probe failed: Get "http://10.40.69.200:8181/ready": read tcp 192.168.15.136:34154->10.40.69.200:8181: read: connection reset by peer Warning Unhealthy 27m kubelet Readiness probe failed: Get "http://10.40.69.200:8181/ready": read tcp 192.168.15.136:34208->10.40.69.200:8181: read: connection reset by peer Warning Unhealthy 27m kubelet Readiness probe failed: Get "http://10.40.69.200:8181/ready": read tcp 192.168.15.136:34374->10.40.69.200:8181: read: connection reset by peer Warning Unhealthy 27m kubelet Readiness probe failed: Get "http://10.40.69.200:8181/ready": read tcp 192.168.15.136:34428->10.40.69.200:8181: read: connection reset by peer Warning Unhealthy 26m kubelet Readiness probe failed: Get "http://10.40.69.200:8181/ready": read tcp 192.168.15.136:34536->10.40.69.200:8181: read: connection reset by peer Warning Unhealthy 26m kubelet Readiness probe failed: Get "http://10.40.69.200:8181/ready": read tcp 192.168.15.136:34592->10.40.69.200:8181: read: connection reset by peer Warning Unhealthy 26m kubelet Readiness probe failed: Get "http://10.40.69.200:8181/ready": read tcp 192.168.15.136:34646->10.40.69.200:8181: read: connection reset by peer Normal Killing 25m kubelet Container coredns failed liveness probe, will be restarted Normal Pulled 25m (x2 over 28m) kubelet Container image "k8s.gcr.io/coredns:1.7.0" already present on machine Normal Started 18m (x5 over 28m) kubelet Started container coredns Warning Unhealthy 13m (x71 over 26m) kubelet (combined from similar events): Readiness probe failed: Get "http://10.40.69.200:8181/ready": read tcp 192.168.15.136:39182->10.40.69.200:8181: read: connection reset by peer Warning BackOff 8m5s (x14 over 10m) kubelet Back-off restarting failed container

    [email protected]:~/edgemesh# kubectl get nodes NAME STATUS ROLES AGE VERSION kmaster1 Ready control-plane,master 120m v1.20.15 kworker1 Ready agent,edge 97m v1.19.3-kubeedge-v1.9.1

    [email protected]:~/edgemesh# kubectl get pods -A NAMESPACE NAME READY STATUS RESTARTS AGE default alpine-test 1/1 Running 0 78m default hostname-edge-84cb45ccf4-2n2pl 1/1 Running 0 50m default websocket-test 1/1 Running 0 78m kube-system calico-kube-controllers-9f9fc867d-csj9x 1/1 Running 0 112m kube-system calico-node-7kk9j 1/1 Running 0 72m kube-system coredns-c85546cff-jlkmx 0/1 CrashLoopBackOff 8 30m kube-system etcd-kmaster1 1/1 Running 0 120m kube-system kube-apiserver-kmaster1 1/1 Running 0 120m kube-system kube-controller-manager-kmaster1 1/1 Running 0 120m kube-system kube-proxy-jjz5k 1/1 Running 0 110m kube-system kube-scheduler-kmaster1 1/1 Running 0 120m kubeedge edgemesh-agent-87jl7 1/1 Running 0 56m kubeedge edgemesh-server-5469fbc686-lf4nq 1/1 Running 0 63m

    opened by vikarna 31
  • The edgemesh-agent of the edge node reports an error

    The edgemesh-agent of the edge node reports an error

    When I deployed the agent, the agent of the edge node reported an error as follows. What is the reason?

    I1221 03:39:10.863914       1 nocamanager.go:44] Private key exist, skip generate
    I1221 03:39:10.866516       1 module.go:34] Module tunnelagent registered successfully
    I1221 03:39:10.866537       1 server.go:119] [4] Install go-chassis plugins
    I1221 03:39:10.866781       1 log.go:184] DEBUG: Installed strategy plugin: [RoundRobin].
    I1221 03:39:10.866802       1 log.go:184] DEBUG: Installed strategy plugin: [Random].
    I1221 03:39:10.866806       1 log.go:184] DEBUG: Installed strategy plugin: [ConsistentHash].
    I1221 03:39:10.866865       1 log.go:184] DEBUG: ConfigurationFactory Initiated
    I1221 03:39:10.866873       1 log.go:184] INFO: Configuration files: []
    I1221 03:39:10.867410       1 log.go:184] WARN: empty configurtion from [FileSource]
    I1221 03:39:10.867430       1 log.go:184] INFO: invoke dynamic handler:FileSource
    I1221 03:39:10.867482       1 log.go:184] INFO: archaius init success
    I1221 03:39:10.867488       1 server.go:124] [5] Start informers manager
    I1221 03:39:10.867667       1 log.go:184] INFO: create new watcher
    W1221 03:39:10.869020       1 shared_informer.go:372] The sharedIndexInformer has started, run more than once is not allowed
    W1221 03:39:10.869039       1 shared_informer.go:372] The sharedIndexInformer has started, run more than once is not allowed
    W1221 03:39:10.869164       1 shared_informer.go:372] The sharedIndexInformer has started, run more than once is not allowed
    W1221 03:39:10.869183       1 shared_informer.go:372] The sharedIndexInformer has started, run more than once is not allowed
    I1221 03:39:11.068423       1 server.go:128] [6] Start all modules
    I1221 03:39:11.068490       1 core.go:24] Starting module edgedns
    I1221 03:39:11.068667       1 core.go:24] Starting module edgeproxy
    I1221 03:39:11.069096       1 core.go:24] Starting module tunnelagent
    I1221 03:39:11.069150       1 module.go:55] Runs CoreDNS v1.8.7 as a node-level dns
    W1221 03:39:11.069374       1 tunnel.go:28] Connection between agent and server [/ip4/192.168.194.129/tcp/20004 /ip4/127.0.0.1/tcp/20004 /ip4/210.45.123.248/tcp/20004] is not established, try connect
    I1221 03:39:11.069413       1 tunnel.go:31] Tunnel agent connecting to tunnel server
    I1221 03:39:11.075171       1 tunnel.go:50] agent success connected to server [/ip4/192.168.194.129/tcp/20004 /ip4/127.0.0.1/tcp/20004 /ip4/210.45.123.248/tcp/20004]
    W1221 03:39:11.083984       1 reflector.go:324] github.com/coredns/coredns/plugin/kubernetes/controller.go:408: failed to list *v1.Namespace: no kind "NamespacList" is registered for version "v1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:74"
    E1221 03:39:11.084084       1 reflector.go:138] github.com/coredns/coredns/plugin/kubernetes/controller.go:408: Failed to watch *v1.Namespace: failed to list *v1.Namespace: no kind "NamespacList" is registered for version "v1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:74"
    W1221 03:39:12.280063       1 reflector.go:324] github.com/coredns/coredns/plugin/kubernetes/controller.go:408: failed to list *v1.Namespace: no kind "NamespacList" is registered for version "v1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:74"
    E1221 03:39:12.280105       1 reflector.go:138] github.com/coredns/coredns/plugin/kubernetes/controller.go:408: Failed to watch *v1.Namespace: failed to list *v1.Namespace: no kind "NamespacList" is registered for version "v1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:74"
    W1221 03:39:14.487879       1 reflector.go:324] github.com/coredns/coredns/plugin/kubernetes/controller.go:408: failed to list *v1.Namespace: no kind "NamespacList" is registered for version "v1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:74"
    E1221 03:39:14.487927       1 reflector.go:138] github.com/coredns/coredns/plugin/kubernetes/controller.go:408: Failed to watch *v1.Namespace: failed to list *v1.Namespace: no kind "NamespacList" is registered for version "v1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:74"
    [WARNING] plugin/kubernetes: starting server with unsynced Kubernetes API
    .:53 on 169.254.96.16
    [INFO] plugin/reload: Running configuration MD5 = 870d75cba1333871a6b2a32d5bbf8835
    CoreDNS-1.8.7
    linux/amd64, go1.17.5, 
    [INFO] 169.254.96.16:58311 - 65041 "HINFO IN 6440406321659534307.5681697611251028163. udp 57 false 512" NXDOMAIN qr,rd,ra 132 0.003606863s
    W1221 03:39:20.138248       1 reflector.go:324] github.com/coredns/coredns/plugin/kubernetes/controller.go:408: failed to list *v1.Namespace: no kind "NamespacList" is registered for version "v1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:74"
    E1221 03:39:20.138302       1 reflector.go:138] github.com/coredns/coredns/plugin/kubernetes/controller.go:408: Failed to watch *v1.Namespace: failed to list *v1.Namespace: no kind "NamespacList" is registered for version "v1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:74"
    W1221 03:39:30.684671       1 reflector.go:324] github.com/coredns/coredns/plugin/kubernetes/controller.go:408: failed to list *v1.Namespace: no kind "NamespacList" is registered for version "v1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:74"
    E1221 03:39:30.684703       1 reflector.go:138] github.com/coredns/coredns/plugin/kubernetes/controller.go:408: Failed to watch *v1.Namespace: failed to list *v1.Namespace: no kind "NamespacList" is registered for version "v1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:74"
    
    kind/failing-test 
    opened by lgy1027 25
  • EdgeMesh-agent deployment failure on Raspberry Pi 4 (ARM based CPU)

    EdgeMesh-agent deployment failure on Raspberry Pi 4 (ARM based CPU)

    What happened:

    edgemesh-agent cannot be deployed on Raspberry Pi 4.

    [email protected]:~ $ docker ps -a
    
    CONTAINER ID   IMAGE                     COMMAND            CREATED         STATUS                     PORTS     NAMES
    
    abbba6511322   kubeedge/edgemesh-agent   "edgemesh-agent"   2 minutes ago   Exited (1) 2 minutes ago             k8s_edgemesh-agent_edgemesh-agent-edge-7bbsm_kubeedge_1dce335a-e6a7-4b91-b2b3-e11d97c395b8_92
    
    a78a927b7ec2   kubeedge/pause-arm:3.1    "/pause"           8 hours ago     Up 8 hours                           k8s_POD_edgemesh-agent-edge-7bbsm_kubeedge_1dce335a-e6a7-4b91-b2b3-e11d97c395b8_0
    

    Check docker container through docker logs

    [email protected]:~ $ docker logs abbba6511322
    
    standard_init_linux.go:228: exec user process caused: exec format error
    

    What you expected to happen:

    EdgeMesh deployment complete without any error

    [email protected]:/home/charlie-cloud# kubectl get all -n kubeedge -o wide
    
    NAME                                   READY   STATUS    RESTARTS   AGE     IP              NODE                NOMINATED NODE   READINESS GATES
    pod/edgemesh-agent-edge-7bbsm          1/1     Running     57         5h10m   192.168.0.86    raspberrypi         <none>           <none>
    pod/edgemesh-agent-edge-rbcrv          1/1     Running   0          6h6m    192.168.0.206   default-edge-node   <none>           <none>
    pod/edgemesh-server-7bdbcfc7b5-hf4ds   1/1     Running   0          36s     <none>          cloud-node          <none>           <none>
    
    NAME                                  DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE    CONTAINERS       IMAGES                           SELECTOR
    daemonset.apps/edgemesh-agent-cloud   0         0         0       0            0           <none>          6h7m   edgemesh-agent   kubeedge/edgemesh-agent:latest   k8s-app=kubeedge,kubeedge=edgemesh-agent
    daemonset.apps/edgemesh-agent-edge    2         2         2       2            2           <none>          6h6m   edgemesh-agent   kubeedge/edgemesh-agent:latest   k8s-app=kubeedge,kubeedge=edgemesh-agent
    
    NAME                              READY   UP-TO-DATE   AVAILABLE   AGE     CONTAINERS        IMAGES                            SELECTOR
    deployment.apps/edgemesh-server   1/1     1            1           6h44m   edgemesh-server   kubeedge/edgemesh-server:latest   k8s-app=kubeedge,kubeedge=edgemesh-server
    
    NAME                                         DESIRED   CURRENT   READY   AGE     CONTAINERS        IMAGES                            SELECTOR
    replicaset.apps/edgemesh-server-7bdbcfc7b5   1         1         1       6h44m   edgemesh-server   kubeedge/edgemesh-server:latest   k8s-app=kubeedge,kubeedge=edgemesh-server,pod-template-hash=7bdbcfc7b5
    

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

    1. Deploy a k8s cluster through kubeadm

    2. Deploy a KubeEdge cluster (Binary Method)

      • master node: k8s master + KubeEdge cloud
      • edge node 1: KubeEdge edge node (intel CPU PC)
      • edge node 2: KubeEdge edge node (arm CPU Raspberry Pi 4)
    3. Deploy EdgeMesh through kubectl apply -f by the Official Document

    Anything else we need to know?:

    command:

    kubectl get all -n kubeedge -o wide
    
    [email protected]:/home/charlie-cloud# kubectl get all -n kubeedge -o wide
    NAME                                   READY   STATUS    RESTARTS   AGE     IP              NODE                NOMINATED NODE   READINESS GATES
    pod/edgemesh-agent-edge-7bbsm          0/1     Error     57         5h10m   192.168.0.86    raspberrypi         <none>           <none>
    pod/edgemesh-agent-edge-rbcrv          1/1     Running   0          6h6m    192.168.0.206   default-edge-node   <none>           <none>
    pod/edgemesh-server-7bdbcfc7b5-hf4ds   0/1     Pending   0          36s     <none>          cloud-node          <none>           <none>
    
    NAME                                  DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE    CONTAINERS       IMAGES                           SELECTOR
    daemonset.apps/edgemesh-agent-cloud   0         0         0       0            0           <none>          6h7m   edgemesh-agent   kubeedge/edgemesh-agent:latest   k8s-app=kubeedge,kubeedge=edgemesh-agent
    daemonset.apps/edgemesh-agent-edge    2         2         1       2            1           <none>          6h6m   edgemesh-agent   kubeedge/edgemesh-agent:latest   k8s-app=kubeedge,kubeedge=edgemesh-agent
    
    NAME                              READY   UP-TO-DATE   AVAILABLE   AGE     CONTAINERS        IMAGES                            SELECTOR
    deployment.apps/edgemesh-server   0/1     1            0           6h44m   edgemesh-server   kubeedge/edgemesh-server:latest   k8s-app=kubeedge,kubeedge=edgemesh-server
    
    NAME                                         DESIRED   CURRENT   READY   AGE     CONTAINERS        IMAGES                            SELECTOR
    replicaset.apps/edgemesh-server-7bdbcfc7b5   1         1         0       6h44m   edgemesh-server   kubeedge/edgemesh-server:latest   k8s-app=kubeedge,kubeedge=edgemesh-server,pod-template-hash=7bdbcfc7b5
    

    Environment:

    • EdgeMesh version: main branch

      [email protected]:/home/charlie-cloud/Downloads/edgemesh# git checkout
      
      M	build/server/edgemesh/05-configmap.yaml
      Your branch is up to date with 'origin/main'.
      

      (2021/09/17 18:46)

    • Kubernetes version (use kubectl version):

      [email protected]:/home/charlie-cloud/Downloads/edgemesh# kubectl version
      
      Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.14", GitCommit:"0fd2b5afdfe3134d6e1531365fdb37dd11f54d1c", GitTreeState:"clean", BuildDate:"2021-08-11T18:07:41Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}
      
      Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.14", GitCommit:"0fd2b5afdfe3134d6e1531365fdb37dd11f54d1c", GitTreeState:"clean", BuildDate:"2021-08-11T18:02:17Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}
      
    • KubeEdge version(e.g. cloudcore --version and edgecore --version):

      cloudcore on k8s master node

      [email protected]:/home/charlie-cloud/Downloads/edgemesh# cloudcore --version
      
      KubeEdge v1.8.0-beta.0.81+149aa721b82ae9
      

      The intel CPU based PC

      [email protected]:~$ edgecore --version
      
      KubeEdge v1.8.0-beta.0.81+149aa721b82ae9
      

      The ARM CPU based Raspberry Pi 4

      [email protected]:~ $ edgecore --version
      
      KubeEdge v1.8.0-beta.0.91+29905c6704b6e9
      
    • Cloud nodes Environment:
      • Hardware configuration (e.g. lscpu):
        [email protected]:/home/charlie-cloud/Downloads/edgemesh# lscpu
        
          Architecture:                    x86_64
          CPU op-mode(s):                  32-bit, 64-bit
          Byte Order:                      Little Endian
          Address sizes:                   39 bits physical, 48 bits virtual
          CPU(s):                          6
          On-line CPU(s) list:             0-5
          Thread(s) per core:              1
          Core(s) per socket:              6
          Socket(s):                       1
          NUMA node(s):                    1
          Vendor ID:                       GenuineIntel
          CPU family:                      6
          Model:                           158
          Model name:                      Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
          Stepping:                        10
          CPU MHz:                         887.468
          CPU max MHz:                     4100.0000
          CPU min MHz:                     800.0000
          BogoMIPS:                        6000.00
          Virtualization:                  VT-x
          L1d cache:                       192 KiB
          L1i cache:                       192 KiB
          L2 cache:                        1.5 MiB
          L3 cache:                        9 MiB
          NUMA node0 CPU(s):               0-5
          Vulnerability Itlb multihit:     KVM: Mitigation: VMX disabled
          Vulnerability L1tf:              Mitigation; PTE Inversion; VMX conditional cache flushes, SMT disabled
          Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT disabled
          Vulnerability Meltdown:          Mitigation; PTI
          Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
          Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
          Vulnerability Spectre v2:        Mitigation; Full generic retpoline, IBPB conditional, IBRS_FW, STIBP disabled, RSB filling
          Vulnerability Srbds:             Mitigation; Microcode
          Vulnerability Tsx async abort:   Mitigation; Clear CPU buffers; SMT disabled
          Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constan
                                          t_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16
                                          xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd
                                          ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt in
                                          tel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
        
      • OS (e.g. cat /etc/os-release):
        [email protected]:/home/charlie-cloud/Downloads/edgemesh# cat /etc/os-release
        
          NAME="Ubuntu"
          VERSION="20.04.3 LTS (Focal Fossa)"
          ID=ubuntu
          ID_LIKE=debian
          PRETTY_NAME="Ubuntu 20.04.3 LTS"
          VERSION_ID="20.04"
          HOME_URL="https://www.ubuntu.com/"
          SUPPORT_URL="https://help.ubuntu.com/"
          BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
          PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
          VERSION_CODENAME=focal
          UBUNTU_CODENAME=focal
        
      • Kernel (e.g. uname -a):
        [email protected]:/home/charlie-cloud/Downloads/edgemesh# uname -a
        
        Linux charliecloud-ASUSPRO-D340MC-C-S340MC 5.11.0-34-generic #36~20.04.1-Ubuntu SMP Fri Aug 27 08:06:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
        
      • Go version (e.g. go version):
        [email protected]:/home/charlie-cloud/Downloads/edgemesh# go version
        
        go version go1.17 linux/amd64
        
      • Others:
    • Edge nodes Environment:
      1. PC (intel CPU)
      • edgecore version (e.g. edgecore --version):
        [email protected]:~$ edgecore --version
        
        KubeEdge v1.8.0-beta.0.81+149aa721b82ae9
        
      • Hardware configuration (e.g. lscpu):
        [email protected]:~$ lscpu
        
        Architecture:                    x86_64
        CPU op-mode(s):                  32-bit, 64-bit
        Byte Order:                      Little Endian
        Address sizes:                   48 bits physical, 48 bits virtual
        CPU(s):                          4
        On-line CPU(s) list:             0-3
        Thread(s) per core:              2
        Core(s) per socket:              2
        Socket(s):                       1
        NUMA node(s):                    1
        Vendor ID:                       AuthenticAMD
        CPU family:                      21
        Model:                           16
        Model name:                      AMD A8-5500 APU with Radeon(tm) HD Graphics
        Stepping:                        1
        Frequency boost:                 enabled
        CPU MHz:                         1400.000
        CPU max MHz:                     3200.0000
        CPU min MHz:                     1400.0000
        BogoMIPS:                        6400.57
        Virtualization:                  AMD-V
        L1d cache:                       32 KiB
        L1i cache:                       128 KiB
        L2 cache:                        4 MiB
        NUMA node0 CPU(s):               0-3
        Vulnerability Itlb multihit:     Not affected
        Vulnerability L1tf:              Not affected
        Vulnerability Mds:               Not affected
        Vulnerability Meltdown:          Not affected
        Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled v
                                        ia prctl and seccomp
        Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user
                                        pointer sanitization
        Vulnerability Spectre v2:        Mitigation; Full AMD retpoline, STIBP disabled,
                                        RSB filling
        Vulnerability Srbds:             Not affected
        Vulnerability Tsx async abort:   Not affected
        Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtr
                                        r pge mca cmov pat pse36 clflush mmx fxsr sse s
                                        se2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtsc
                                        p lm constant_tsc rep_good nopl nonstop_tsc cpu
                                        id extd_apicid aperfmperf pni pclmulqdq monitor
                                        ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave 
                                        avx f16c lahf_lm cmp_legacy svm extapic cr8_leg
                                        acy abm sse4a misalignsse 3dnowprefetch osvw ib
                                        s xop skinit wdt lwp fma4 tce nodeid_msr tbm to
                                        poext perfctr_core perfctr_nb cpb hw_pstate ssb
                                        d vmmcall bmi1 arat npt lbrv svm_lock nrip_save
                                        tsc_scale vmcb_clean flushbyasid decodeassists
                                        pausefilter pfthreshold
        
      • OS (e.g. cat /etc/os-release):
        [email protected]:~$ cat /etc/os-release
        
        NAME="Ubuntu"
        VERSION="20.04.2 LTS (Focal Fossa)"
        ID=ubuntu
        ID_LIKE=debian
        PRETTY_NAME="Ubuntu 20.04.2 LTS"
        VERSION_ID="20.04"
        HOME_URL="https://www.ubuntu.com/"
        SUPPORT_URL="https://help.ubuntu.com/"
        BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
        PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
        VERSION_CODENAME=focal
        UBUNTU_CODENAME=focal
        
      • Kernel (e.g. uname -a):
        [email protected]:~$ uname -a
        
        Linux charlieedge-CM1745 5.11.0-34-generic #36~20.04.1-Ubuntu SMP Fri Aug 27 08:06:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
        
      • Go version (e.g. go version):
        [email protected]:~$ go version
        
        go version go1.17 linux/amd64
        
      • Others:
      1. Raspberry Pi (arm CPU)
      • edgecore version (e.g. edgecore --version):
        [email protected]:~ $ edgecore --version
        
        KubeEdge v1.8.0-beta.0.91+29905c6704b6e9
        
      • Hardware configuration (e.g. lscpu):
        [email protected]:~ $ lscpu
        
        Architecture:        armv7l
        Byte Order:          Little Endian
        CPU(s):              4
        On-line CPU(s) list: 0-3
        Thread(s) per core:  1
        Core(s) per socket:  4
        Socket(s):           1
        Vendor ID:           ARM
        Model:               3
        Model name:          Cortex-A72
        Stepping:            r0p3
        CPU max MHz:         1500.0000
        CPU min MHz:         600.0000
        BogoMIPS:            108.00
        Flags:               half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
        
      • OS (e.g. cat /etc/os-release):
        [email protected]:~ $ cat /etc/os-release
        
        PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
        NAME="Raspbian GNU/Linux"
        VERSION_ID="10"
        VERSION="10 (buster)"
        VERSION_CODENAME=buster
        ID=raspbian
        ID_LIKE=debian
        HOME_URL="http://www.raspbian.org/"
        SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
        BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
        
      • Kernel (e.g. uname -a):
        [email protected]:~ $ uname -a
        
        Linux raspberrypi 5.10.60-v7l+ #1449 SMP Wed Aug 25 15:00:44 BST 2021 armv7l GNU/Linux
        
      • Go version (e.g. go version):
        [email protected]:~ $ go version
        
        go version go1.17 linux/arm
        
      • Others:
    kind/bug good first issue help wanted 
    opened by s099064146 21
  • When refreshing iptables, solve the interruption risk of communication services

    When refreshing iptables, solve the interruption risk of communication services

    What type of PR is this? /kind bug

    What this PR does / why we need it: Problems with accessing external services through edgemesh at the edge Which issue(s) this PR fixes:

    Fixes #71

    Special notes for your reviewer:

    1. When getting edgemesh ignores routing rules and proxy rules, it also gets the routing rules that have been previously invalidated. These invalid routes need to be cleared first when refreshing the routing settings. Re-Ensure routing requires insert mode: `utiliptables.Prepend`
    2. add go-funk library
    3. add go-funk LICENSE
    4. upgrade the go-funk to v0.9.1
    5. modify proxyby!=edgemesh to noproxy=edgemesh
    

    Signed-off-by: 胡正阳 [email protected]

    kind/bug lgtm approved size/XXL 
    opened by yz271544 19
  • 1.7.1 metaServer doesn't work well

    1.7.1 metaServer doesn't work well

    What happened:

    What you expected to happen:

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

    Anything else we need to know?:

    Environment:

    • EdgeMesh version: release-1.7

    • Kubernetes version (use kubectl version): 1.18.20

    • KubeEdge version(e.g. cloudcore --version and edgecore --version): 1.7.1

    • Cloud nodes Environment:
      • Hardware configuration (e.g. lscpu): 4
      • OS (e.g. cat /etc/os-release): centos 7.6
      • Kernel (e.g. uname -a): 5.13
      • Go version (e.g. go version):
      • Others:
    • Edge nodes Environment:
      • edgecore version (e.g. edgecore --version): 1.7.1
      • Hardware configuration (e.g. lscpu): 4
      • OS (e.g. cat /etc/os-release): centos7.6
      • Kernel (e.g. uname -a): 5.13
      • Go version (e.g. go version):
      • Others:

    ####config

      edgeMesh:
        enable: false
     metaManager:
        contextSendGroup: hub
        contextSendModule: websocket
        enable: true
        metaServer:
          debug: true
          enable: true
        podStatusSyncInterval: 60
        remoteQueryTimeout: 60
    

    api service success

    exec  in edgecore node --    icurl 127.0.0.1:10550/api/v1/services --->   response success
    

    curl service failed

    [[email protected] ~]# curl hostname-svc46.edgemesh-test:12345
    curl: (6) Could not resolve host: hostname-svc46.edgemesh-test; Unknown error
    

    kubectl check

    [[email protected] ~]# kubectl -n edgemesh-test get ep -owide
    NAME             ENDPOINTS         AGE
    hostname-svc     172.17.0.2:9376   24h
    hostname-svc46   172.17.0.2:9376   34h
    You have new mail in /var/spool/mail/root
    [[email protected] ~]# kubectl -n edgemesh-test get pod -owide
    NAME              READY   STATUS    RESTARTS   AGE   IP           NODE     NOMINATED NODE   READINESS GATES
    hostname-edge     1/1     Running   0          25h   172.17.0.2   edge47   <none>           <none>
    hostname-edge46   1/1     Running   0          25h   172.17.0.2   edge46   <none>           <none>
    [[email protected] ~]# kubectl -n edgemesh-test get svc -owide
    NAME             TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)     AGE   SELECTOR
    hostname-svc     ClusterIP   None         <none>        12345/TCP   24h   app=hostname-edge
    hostname-svc46   ClusterIP   None         <none>        12345/TCP   34h   app=hostname-edge46
    
    kind/bug 
    opened by RobinsChens 19
  • add a socks5 proxy

    add a socks5 proxy

    Add a socks5 proxy to support cloud SSH login to the edge.

    Documentation: doc

    Usage:

       ssh -o "ProxyCommand nc --proxy-type socks5 --proxy {$edgemesh-ip}:10800 {$nodeName} {$port}" [email protected]
    
    

    edgemesh IP defaults to 169.254.96.16

    lgtm approved size/L 
    opened by lynxcat 18
  • edgemesh causes service connect failed

    edgemesh causes service connect failed

    What happened: deploy edgemesh, the edge svc connect successed.

    $ kubectl get svc
    NAME           TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)   AGE
    hostname-svc   ClusterIP   10.100.26.38   <none>        80/TCP    9m11s
    kubernetes     ClusterIP   10.96.0.1      <none>        443/TCP   12d
    $ kubectl get endpoints
    NAME           ENDPOINTS        AGE
    hostname-svc   172.17.0.3:80    9m18s
    kubernetes     10.12.3.7:6443   12d
    $ curl 10.100.26.38
    <!DOCTYPE html>...
    $ kubectl get cm edgemesh-agent-cfg -nkubeedge -oyaml
        modules:
          edgeProxy:
            enable: true
            listenPort: 40001
            subNet: 10.96.0.0/12
    

    but, other svc connect failed

    $ kubectl get svc -nkubesphere-system
    NAME                    TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
    ks-apiserver            ClusterIP   10.100.185.141   <none>        80/TCP         12d
    ks-console              NodePort    10.98.93.250     <none>        80:30009/TCP   12d
    ks-controller-manager   ClusterIP   10.100.234.102   <none>        443/TCP        12d
    $ curl 10.98.93.250
    curl: (56) Recv failure: Connection reset by peer
    $ kubectl get endpoints -nkubesphere-system -owide
    NAME                    ENDPOINTS            AGE
    ks-apiserver            10.244.124.31:9090   12d
    ks-console              10.244.124.3:8000    12d
    ks-controller-manager   10.244.124.32:8443   12d
    $ curl 10.244.124.3:8000
    Redirecting to <a href="/login">/login</a>.
    

    uninstall edgemesh, other svc connect successed

    $ curl 10.98.93.250
    Redirecting to <a href="/login">/login</a>.
    

    What you expected to happen:

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

    Anything else we need to know?:

    Environment:

    • EdgeMesh version:
    KubeEdge v0.0.0-master+$Format:%h$
    
    • Kubernetes version (use kubectl version):
    Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.4", GitCommit:"3cce4a82b44f032d0cd1a1790e6d2f5a55d20aae", GitTreeState:"clean", BuildDate:"2021-08-11T18:16:05Z", GoVersion:"go1.16.7", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.4", GitCommit:"3cce4a82b44f032d0cd1a1790e6d2f5a55d20aae", GitTreeState:"clean", BuildDate:"2021-08-11T18:10:22Z", GoVersion:"go1.16.7", Compiler:"gc", Platform:"linux/amd64"}
    
    • KubeEdge version(e.g. cloudcore --version and edgecore --version):
    KubeEdge v1.8.2
    
    • Cloud nodes Environment:
      • Hardware configuration (e.g. lscpu):
      • OS (e.g. cat /etc/os-release):
      • Kernel (e.g. uname -a):
      • Go version (e.g. go version):
      • Others:
    • Edge nodes Environment:
      • edgecore version (e.g. edgecore --version):
      • Hardware configuration (e.g. lscpu):
      • OS (e.g. cat /etc/os-release):
      • Kernel (e.g. uname -a):
      • Go version (e.g. go version):
      • Others:
    kind/bug 
    opened by king-jingxiang 18
  • Could not resolve host: hostname-svc.default (Failed to watch *v1alpha3.DestinationRule:)

    Could not resolve host: hostname-svc.default (Failed to watch *v1alpha3.DestinationRule:)

    OS: ubuntu 18.04.4 LTS KubeEdge version: v1.7.1 EdgeMesh version: v1.7.0 K8S version:1.9.0

    Problem:

    [email protected]:~# curl hostname-svc.default:12345 -v
    * Rebuilt URL to: hostname-svc.default:12345/
    * Could not resolve host: hostname-svc.default
    * Closing connection 0
    curl: (6) Could not resolve host: hostname-svc.default
    

    When I do this: docker logs -f "edgemesh agent container id" It returns an error "Failed to watch *v1alpha3.DestinationRule" like follows:

    [email protected]:~# docker logs -f 2b35df37d825
    2021/08/13 02:07:31 INFO: Install client plugin, protocol: rest
    2021/08/13 02:07:31 INFO: Installed service discovery plugin: edge
    I0813 02:07:31.181969       1 server.go:54] Version: v1.7.1-9+2b655fcbc51f38
    I0813 02:07:31.181988       1 server.go:88] [1] New informers manager
    I0813 02:07:31.182448       1 server.go:95] [2] Register beehive modules
    I0813 02:07:31.182722       1 module.go:34] Module edgedns registered successfully
    I0813 02:07:31.190298       1 module.go:34] Module edgeproxy registered successfully
    W0813 02:07:31.190381       1 module.go:37] Module edgegateway is disabled, do not register
    I0813 02:07:31.190438       1 privkey.go:34] Private key does not exist, generate a new one
    I0813 02:07:31.266883       1 module.go:34] Module tunnelagent registered successfully
    I0813 02:07:31.267035       1 server.go:104] [3] Install go-chassis plugins
    I0813 02:07:31.267146       1 log.go:181] DEBUG: Installed strategy plugin: [RoundRobin].
    I0813 02:07:31.267195       1 log.go:181] DEBUG: Installed strategy plugin: [Random].
    I0813 02:07:31.267222       1 log.go:181] DEBUG: Installed strategy plugin: [ConsistentHash].
    I0813 02:07:31.267263       1 log.go:181] DEBUG: ConfigurationFactory Initiated
    I0813 02:07:31.267291       1 log.go:181] INFO: Configuration files: []
    I0813 02:07:31.267334       1 log.go:181] WARN: empty configurtion from [FileSource]
    I0813 02:07:31.267371       1 log.go:181] INFO: invoke dynamic handler:FileSource
    I0813 02:07:31.267410       1 log.go:181] INFO: archaius init success
    I0813 02:07:31.267444       1 server.go:109] [4] Start informers manager
    I0813 02:07:31.268402       1 log.go:181] INFO: create new watcher
    E0813 02:07:31.294654       1 reflector.go:127] /code/common/informers/informers.go:87: Failed to watch *v1alpha3.DestinationRule: failed to list *v1alpha3.DestinationRule: no kind "DestinationrulList" is registered for version "networking.istio.io/v1alpha3" in scheme "istio.io/client-go/pkg/clientset/versioned/scheme/register.gen.go:30"
    E0813 02:07:31.294784       1 reflector.go:127] istio.io/client-go/pkg/informers/externalversions/factory.gen.go:116: Failed to watch *v1alpha3.DestinationRule: failed to list *v1alpha3.DestinationRule: no kind "DestinationrulList" is registered for version "networking.istio.io/v1alpha3" in scheme "istio.io/client-go/pkg/clientset/versioned/scheme/register.gen.go:30"
    E0813 02:07:32.327858       1 reflector.go:127] istio.io/client-go/pkg/informers/externalversions/factory.gen.go:116: Failed to watch *v1alpha3.DestinationRule: failed to list *v1alpha3.DestinationRule: no kind "DestinationrulList" is registered for version "networking.istio.io/v1alpha3" in scheme "istio.io/client-go/pkg/clientset/versioned/scheme/register.gen.go:30"
    

    My yaml : kubectl apply -f examples/hostname.yaml

    apiVersion: v1
    kind: Pod
    metadata:
      name: hostname-edge
      namespace: default
      labels:
        app: hostname-edge
    spec:
      nodeName: edgenode
      containers:
        - name: hostname
          image: k8s.gcr.io/serve_hostname:latest
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 9376
              hostPort: 9376
    ---
    apiVersion: v1
    kind: Service
    metadata:
      name: hostname-svc
      namespace: default
    spec:
      selector:
        app: hostname-edge
      ports:
        - name: http-0
          port: 12345
          protocol: TCP
          targetPort: 9376
    

    curl 127.0.0.1:10550/api/v1/services on edgenode

    [email protected]:~# curl 127.0.0.1:10550/api/v1/services
    {"apiVersion":"v1","items":[{"apiVersion":"v1","kind":"Service","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"annotations\":{},\"name\":\"argo-server\",\"namespace\":\"argo\"},\"spec\":{\"ports\":[{\"name\":\"web\",\"port\":2746,\"targetPort\":2746}],\"selector\":{\"app\":\"argo-server\"}}}\n"},"creationTimestamp":"2021-07-30T06:47:54Z","managedFields":[{"apiVersion":"v1","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:kubectl.kubernetes.io/last-applied-configuration":{}}},"f:spec":{"f:ports":{".":{},"k:{\"port\":2746,\"protocol\":\"TCP\"}":{".":{},"f:name":{},"f:port":{},"f:protocol":{},"f:targetPort":{}}},"f:selector":{".":{},"f:app":{}},"f:sessionAffinity":{},"f:type":{}}},"manager":"kubectl-client-side-apply","operation":"Update","time":"2021-07-30T06:47:54Z"}],"name":"argo-server","namespace":"argo","resourceVersion":"41590887","selfLink":"argo/services/argo-server","uid":"85953948-4514-4973-a614-c035133472ce"},"spec":{"clusterIP":"10.102.174.236",
    ......
    
    opened by EnfangCui 18
  • "Failed to ensure portal" running kind cluster

    What happened: I'm trying to run edgemesh on a kind cluster. I have one control-plane node and two workers. I want default-worker to act as a relay server.

    $ kubectl get nodes -o wide        
    NAME                    STATUS   ROLES                  AGE    VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE       KERNEL-VERSION    CONTAINER-RUNTIME
    default-control-plane   Ready    control-plane,master   3d9h   v1.22.9   10.5.0.2      <none>        Ubuntu 21.10   5.17.0-1016-oem   containerd://1.6.4
    default-worker          Ready    <none>                 3d9h   v1.22.9   10.5.0.4      <none>        Ubuntu 21.10   5.17.0-1016-oem   containerd://1.6.4
    default-worker2         Ready    <none>                 3d9h   v1.22.9   10.5.0.3      <none>        Ubuntu 21.10   5.17.0-1016-oem   containerd://1.6.4
    

    This is my values.yaml

    agent:
      image: kubeedge/edgemesh-agent:latest
      affinity: {}
      nodeSelector: {}
      tolerations: {}
      resources:
        limits:
          cpu: 1
          memory: 256Mi
        requests:
          cpu: 0.5
          memory: 128Mi
      psk: dAc+kaXv1dLeDNB4JR79LwBQCwvBx6k6t5UtinL6OiU=
      relayNodes:
        - nodeName: default-worker
          advertiseAddress:
            - 10.5.0.4
      modules:
        edgeProxy:
          enable: true
        edgeTunnel:
          enable: true
    

    When i deploy the helm chart using my values.yaml i get two pods on my worker nodes

    $ kubectl get pods -o wide
    NAME                                READY   STATUS    RESTARTS      AGE     IP            NODE                    NOMINATED NODE   READINESS GATES
    cloudcore-55f44b557f-zsf9f          2/2     Running   2 (14m ago)   3d9h    10.5.0.4      default-worker          <none>           <none>
    edgemesh-agent-2fsjb                1/1     Running   0             6s      10.5.0.3      default-worker2         <none>           <none>
    edgemesh-agent-jgwk9                1/1     Running   0             6s      10.5.0.4      default-worker          <none>           <none>
    iptables-manager-fwbvb              1/1     Running   0             3d9h    10.5.0.2      default-control-plane   <none>           <none>
    

    However the logs show, that there is some errors

    $ kubectl logs edgemesh-agent-2fsjb    
    I1010 06:38:34.199247       1 server.go:55] Version: v1.12.0-dirty
    I1010 06:38:34.199286       1 server.go:89] [1] Prepare agent to run
    I1010 06:38:34.199419       1 netif.go:96] bridge device edgemesh0 already exists
    I1010 06:38:34.199473       1 server.go:93] edgemesh-agent running on CloudMode
    I1010 06:38:34.199481       1 server.go:96] [2] New clients
    W1010 06:38:34.199492       1 client_config.go:617] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
    I1010 06:38:34.199903       1 server.go:103] [3] Register beehive modules
    W1010 06:38:34.199915       1 module.go:37] Module EdgeDNS is disabled, do not register
    I1010 06:38:34.200252       1 server.go:66] Using userspace Proxier.
    I1010 06:38:34.292646       1 module.go:34] Module EdgeProxy registered successfully
    I1010 06:38:34.362580       1 module.go:159] I'm {12D3KooWNLAPNyViyXgHyAoTtvPc9D8fW3R5RJCAF8iiwpALCUQY: [/ip4/10.5.0.3/tcp/20006 /ip4/127.0.0.1/tcp/20006]}
    I1010 06:38:34.362659       1 module.go:181] Bootstrapping the DHT
    I1010 06:38:34.362689       1 tunnel.go:387] [Bootstrap] bootstrapping to 12D3KooWP6xc3WDcvWNT51M7vMQKvi4wtspKzMT2tEhgpmi7XjSw
    E1010 06:38:34.363161       1 tunnel.go:391] [Bootstrap] failed to bootstrap with {12D3KooWP6xc3WDcvWNT51M7vMQKvi4wtspKzMT2tEhgpmi7XjSw: [/ip4/10.5.0.4/tcp/20006]}: failed to dial 12D3KooWP6xc3WDcvWNT51M7vMQKvi4wtspKzMT2tEhgpmi7XjSw:
      * [/ip4/10.5.0.4/tcp/20006] dial tcp4 10.5.0.4:20006: connect: connection refused
    E1010 06:38:34.363282       1 tunnel.go:402] [Bootstrap] Not all bootstrapDail connected, continue bootstrapDail...
    I1010 06:38:44.364467       1 tunnel.go:387] [Bootstrap] bootstrapping to 12D3KooWP6xc3WDcvWNT51M7vMQKvi4wtspKzMT2tEhgpmi7XjSw
    I1010 06:38:44.372216       1 tunnel.go:397] [Bootstrap] success bootstrapped with {12D3KooWP6xc3WDcvWNT51M7vMQKvi4wtspKzMT2tEhgpmi7XjSw: [/ip4/10.5.0.4/tcp/20006]}
    I1010 06:38:44.373418       1 tunnel.go:63] Starting MDNS discovery service
    I1010 06:38:44.373442       1 tunnel.go:76] Starting DHT discovery service
    I1010 06:38:44.373510       1 module.go:34] Module EdgeTunnel registered successfully
    I1010 06:38:44.373524       1 server.go:109] [4] Start all modules
    I1010 06:38:44.373601       1 tunnel.go:447] Starting relay finder
    I1010 06:38:44.373624       1 core.go:24] Starting module EdgeProxy
    I1010 06:38:44.373692       1 core.go:24] Starting module EdgeTunnel
    I1010 06:38:44.373950       1 config.go:317] "Starting service config controller"
    I1010 06:38:44.374019       1 shared_informer.go:240] Waiting for caches to sync for service config
    I1010 06:38:44.373959       1 config.go:135] "Starting endpoints config controller"
    I1010 06:38:44.375185       1 shared_informer.go:240] Waiting for caches to sync for endpoints config
    I1010 06:38:44.375746       1 loadbalancer.go:239] "Starting loadBalancer destinationRule controller"
    I1010 06:38:44.376100       1 shared_informer.go:240] Waiting for caches to sync for loadBalancer destinationRule
    I1010 06:38:44.382517       1 tunnel.go:175] Discovery service got a new stream from {12D3KooWP6xc3WDcvWNT51M7vMQKvi4wtspKzMT2tEhgpmi7XjSw: [/ip4/10.5.0.4/tcp/20006]}
    I1010 06:38:44.382894       1 tunnel.go:204] [MDNS] Discovery from default-worker : {12D3KooWP6xc3WDcvWNT51M7vMQKvi4wtspKzMT2tEhgpmi7XjSw: [/ip4/10.5.0.4/tcp/20006]}
    I1010 06:38:44.383297       1 tunnel.go:118] [MDNS] Discovery found peer: {12D3KooWP6xc3WDcvWNT51M7vMQKvi4wtspKzMT2tEhgpmi7XjSw: [/ip4/10.5.0.4/tcp/20006 /ip4/127.0.0.1/tcp/20006]}
    I1010 06:38:44.383478       1 tunnel.go:130] [MDNS] New stream between peer {12D3KooWP6xc3WDcvWNT51M7vMQKvi4wtspKzMT2tEhgpmi7XjSw: [/ip4/127.0.0.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/169.254.96.16/tcp/20006 /ip4/10.5.0.4/tcp/20006]} success
    I1010 06:38:44.455824       1 tunnel.go:166] [MDNS] Discovery to default-worker : {12D3KooWP6xc3WDcvWNT51M7vMQKvi4wtspKzMT2tEhgpmi7XjSw: [/ip4/127.0.0.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/10.244.1.1/tcp/20006 /ip4/169.254.96.16/tcp/20006 /ip4/10.5.0.4/tcp/20006]}
    I1010 06:38:44.475928       1 shared_informer.go:247] Caches are synced for endpoints config 
    I1010 06:38:44.475991       1 shared_informer.go:247] Caches are synced for service config 
    I1010 06:38:44.476404       1 shared_informer.go:247] Caches are synced for loadBalancer destinationRule 
    E1010 06:38:44.668305       1 proxier.go:552] "Failed to open portal" err="can't open node port for <nil>:30972/TCP: listen tcp :30972: bind: address already in use" serviceName="ingress-nginx/nginx-ingress-nginx-ingress:http"
    E1010 06:38:44.688464       1 proxier.go:552] "Failed to open portal" err="can't open node port for <nil>:31163/TCP: listen tcp :31163: bind: address already in use" serviceName="ingress-nginx/nginx-ingress-nginx-ingress:https"
    E1010 06:38:44.786637       1 proxier.go:552] "Failed to open portal" err="can't open node port for <nil>:30615/TCP: listen tcp :30615: bind: address already in use" serviceName="metallb-system/nginx"
    E1010 06:38:44.824920       1 proxier.go:552] "Failed to open portal" err="can't open node port for <nil>:30550/TCP: listen tcp :30550: bind: address already in use" serviceName="vault/vault:vault"
    E1010 06:38:44.845249       1 proxier.go:552] "Failed to open portal" err="can't open node port for <nil>:30738/TCP: listen tcp :30738: bind: address already in use" serviceName="vault/vault:vault-cluster"
    E1010 06:38:44.889235       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30550/TCP: listen tcp :30550: bind: address already in use" servicePortName="vault/vault:vault"
    E1010 06:38:44.964074       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30738/TCP: listen tcp :30738: bind: address already in use" servicePortName="vault/vault:vault-cluster"
    E1010 06:38:45.029171       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30972/TCP: listen tcp :30972: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:http"
    E1010 06:38:45.044993       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:31163/TCP: listen tcp :31163: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:https"
    E1010 06:38:45.077913       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30615/TCP: listen tcp :30615: bind: address already in use" servicePortName="metallb-system/nginx"
    E1010 06:39:14.443733       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30738/TCP: listen tcp :30738: bind: address already in use" servicePortName="vault/vault:vault-cluster"
    E1010 06:39:14.476872       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30972/TCP: listen tcp :30972: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:http"
    E1010 06:39:14.490054       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:31163/TCP: listen tcp :31163: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:https"
    E1010 06:39:14.504344       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30615/TCP: listen tcp :30615: bind: address already in use" servicePortName="metallb-system/nginx"
    E1010 06:39:14.537277       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30550/TCP: listen tcp :30550: bind: address already in use" servicePortName="vault/vault:vault
    ...
    

    and the other pod

    $ kubectl  logs edgemesh-agent-jgwk9 
    I1010 06:38:34.175432       1 server.go:55] Version: v1.12.0-dirty
    I1010 06:38:34.175470       1 server.go:89] [1] Prepare agent to run
    I1010 06:38:34.175594       1 netif.go:96] bridge device edgemesh0 already exists
    I1010 06:38:34.175632       1 server.go:93] edgemesh-agent running on CloudMode
    I1010 06:38:34.175645       1 server.go:96] [2] New clients
    W1010 06:38:34.175656       1 client_config.go:617] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
    I1010 06:38:34.176073       1 server.go:103] [3] Register beehive modules
    W1010 06:38:34.176085       1 module.go:37] Module EdgeDNS is disabled, do not register
    I1010 06:38:34.176347       1 server.go:66] Using userspace Proxier.
    I1010 06:38:34.360353       1 module.go:34] Module EdgeProxy registered successfully
    I1010 06:38:34.364760       1 module.go:159] I'm {12D3KooWP6xc3WDcvWNT51M7vMQKvi4wtspKzMT2tEhgpmi7XjSw: [/ip4/10.5.0.4/tcp/20006 /ip4/127.0.0.1/tcp/20006 /ip4/10.5.0.4/tcp/20006]}
    I1010 06:38:34.364852       1 module.go:168] Run as a relay node
    I1010 06:38:34.364937       1 module.go:181] Bootstrapping the DHT
    I1010 06:38:34.366393       1 tunnel.go:63] Starting MDNS discovery service
    I1010 06:38:34.366424       1 tunnel.go:76] Starting DHT discovery service
    I1010 06:38:34.366470       1 module.go:34] Module EdgeTunnel registered successfully
    I1010 06:38:34.366488       1 server.go:109] [4] Start all modules
    I1010 06:38:34.366559       1 tunnel.go:447] Starting relay finder
    I1010 06:38:34.366582       1 core.go:24] Starting module EdgeProxy
    I1010 06:38:34.366621       1 core.go:24] Starting module EdgeTunnel
    I1010 06:38:34.366980       1 config.go:135] "Starting endpoints config controller"
    I1010 06:38:34.367093       1 shared_informer.go:240] Waiting for caches to sync for endpoints config
    I1010 06:38:34.366984       1 config.go:317] "Starting service config controller"
    I1010 06:38:34.367164       1 shared_informer.go:240] Waiting for caches to sync for service config
    I1010 06:38:34.367200       1 loadbalancer.go:239] "Starting loadBalancer destinationRule controller"
    I1010 06:38:34.367225       1 shared_informer.go:240] Waiting for caches to sync for loadBalancer destinationRule
    I1010 06:38:34.468202       1 shared_informer.go:247] Caches are synced for loadBalancer destinationRule 
    I1010 06:38:34.468234       1 shared_informer.go:247] Caches are synced for service config 
    I1010 06:38:34.468246       1 shared_informer.go:247] Caches are synced for endpoints config 
    E1010 06:38:34.599795       1 proxier.go:552] "Failed to open portal" err="can't open node port for <nil>:30972/TCP: listen tcp :30972: bind: address already in use" serviceName="ingress-nginx/nginx-ingress-nginx-ingress:http"
    E1010 06:38:34.678098       1 proxier.go:552] "Failed to open portal" err="can't open node port for <nil>:31163/TCP: listen tcp :31163: bind: address already in use" serviceName="ingress-nginx/nginx-ingress-nginx-ingress:https"
    E1010 06:38:34.885149       1 proxier.go:552] "Failed to open portal" err="can't open node port for <nil>:30615/TCP: listen tcp :30615: bind: address already in use" serviceName="metallb-system/nginx"
    E1010 06:38:35.004706       1 proxier.go:552] "Failed to open portal" err="can't open node port for <nil>:30550/TCP: listen tcp :30550: bind: address already in use" serviceName="vault/vault:vault"
    E1010 06:38:35.027619       1 proxier.go:552] "Failed to open portal" err="can't open node port for <nil>:30738/TCP: listen tcp :30738: bind: address already in use" serviceName="vault/vault:vault-cluster"
    E1010 06:38:35.062077       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30738/TCP: listen tcp :30738: bind: address already in use" servicePortName="vault/vault:vault-cluster"
    E1010 06:38:35.074164       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:31163/TCP: listen tcp :31163: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:https"
    E1010 06:38:35.090126       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30615/TCP: listen tcp :30615: bind: address already in use" servicePortName="metallb-system/nginx"
    E1010 06:38:35.113323       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30972/TCP: listen tcp :30972: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:http"
    E1010 06:38:35.141939       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30550/TCP: listen tcp :30550: bind: address already in use" servicePortName="vault/vault:vault"
    E1010 06:38:35.214655       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30738/TCP: listen tcp :30738: bind: address already in use" servicePortName="vault/vault:vault-cluster"
    E1010 06:38:35.227935       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:31163/TCP: listen tcp :31163: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:https"
    E1010 06:38:35.245275       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30615/TCP: listen tcp :30615: bind: address already in use" servicePortName="metallb-system/nginx"
    E1010 06:38:35.272512       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30972/TCP: listen tcp :30972: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:http"
    E1010 06:38:35.297487       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30550/TCP: listen tcp :30550: bind: address already in use" servicePortName="vault/vault:vault"
    I1010 06:38:44.381790       1 tunnel.go:118] [MDNS] Discovery found peer: {12D3KooWNLAPNyViyXgHyAoTtvPc9D8fW3R5RJCAF8iiwpALCUQY: [/ip4/127.0.0.1/tcp/20006 /ip4/10.5.0.3/tcp/20006]}
    I1010 06:38:44.381987       1 tunnel.go:130] [MDNS] New stream between peer {12D3KooWNLAPNyViyXgHyAoTtvPc9D8fW3R5RJCAF8iiwpALCUQY: [/ip4/127.0.0.1/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/169.254.96.16/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/10.5.0.3/tcp/20006]} success
    I1010 06:38:44.383678       1 tunnel.go:166] [MDNS] Discovery to default-worker2 : {12D3KooWNLAPNyViyXgHyAoTtvPc9D8fW3R5RJCAF8iiwpALCUQY: [/ip4/127.0.0.1/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/169.254.96.16/tcp/20006 /ip4/10.244.2.1/tcp/20006 /ip4/10.5.0.3/tcp/20006]}
    I1010 06:38:44.384062       1 tunnel.go:175] Discovery service got a new stream from {12D3KooWNLAPNyViyXgHyAoTtvPc9D8fW3R5RJCAF8iiwpALCUQY: [/ip4/10.5.0.3/tcp/20006]}
    I1010 06:38:44.384175       1 tunnel.go:204] [MDNS] Discovery from default-worker2 : {12D3KooWNLAPNyViyXgHyAoTtvPc9D8fW3R5RJCAF8iiwpALCUQY: [/ip4/10.5.0.3/tcp/20006]}
    E1010 06:39:04.470536       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:31163/TCP: listen tcp :31163: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:https"
    E1010 06:39:04.509817       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30615/TCP: listen tcp :30615: bind: address already in use" servicePortName="metallb-system/nginx"
    E1010 06:39:04.578256       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30738/TCP: listen tcp :30738: bind: address already in use" servicePortName="vault/vault:vault-cluster"
    E1010 06:39:04.604133       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30972/TCP: listen tcp :30972: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:http"
    E1010 06:39:04.730338       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30550/TCP: listen tcp :30550: bind: address already in use" servicePortName="vault/vault:vault"
    E1010 06:39:34.835684       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30550/TCP: listen tcp :30550: bind: address already in use" servicePortName="vault/vault:vault"
    E1010 06:39:34.924507       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30738/TCP: listen tcp :30738: bind: address already in use" servicePortName="vault/vault:vault-cluster"
    E1010 06:39:34.944426       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:31163/TCP: listen tcp :31163: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:https"
    E1010 06:39:34.979393       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30615/TCP: listen tcp :30615: bind: address already in use" servicePortName="metallb-system/nginx"
    E1010 06:39:35.024317       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30972/TCP: listen tcp :30972: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:http"
    E1010 06:40:05.104791       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30738/TCP: listen tcp :30738: bind: address already in use" servicePortName="vault/vault:vault-cluster"
    E1010 06:40:05.116168       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:31163/TCP: listen tcp :31163: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:https"
    E1010 06:40:05.134939       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30615/TCP: listen tcp :30615: bind: address already in use" servicePortName="metallb-system/nginx"
    E1010 06:40:05.156607       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30972/TCP: listen tcp :30972: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:http"
    E1010 06:40:05.193246       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30550/TCP: listen tcp :30550: bind: address already in use" servicePortName="vault/vault:vault"
    E1010 06:40:35.300506       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30738/TCP: listen tcp :30738: bind: address already in use" servicePortName="vault/vault:vault-cluster"
    E1010 06:40:35.323012       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:31163/TCP: listen tcp :31163: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:https"
    E1010 06:40:35.364481       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30615/TCP: listen tcp :30615: bind: address already in use" servicePortName="metallb-system/nginx"
    E1010 06:40:35.415594       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30972/TCP: listen tcp :30972: bind: address already in use" servicePortName="ingress-nginx/nginx-ingress-nginx-ingress:http"
    E1010 06:40:35.434967       1 proxier.go:422] "Failed to ensure portal" err="can't open node port for <nil>:30550/TCP: listen tcp :30550: bind: address already in use" servicePortName="vault/vault:vault"
    

    Moreover: When i deploy a pod and try to resolve to any hostname, both external and cluster local service resolution is broken, when edgemesh is rolled out.

    This is a try before rolling out edgemesh

    $ kubectl run alpine --rm -ti --image=alpine -- /bin/sh
    Found existing alias for "kubectl". You should use: "k"
    If you don't see a command prompt, try pressing enter.
    / # nslookup www.google.com
    Server:         10.96.0.10
    Address:        10.96.0.10:53
    
    Non-authoritative answer:
    Name:   www.google.com
    Address: 142.250.186.36
    
    Non-authoritative answer:
    Name:   www.google.com
    Address: 2a00:1450:4001:827::2004
    
    / # nslookup cloudcore.kubeedge.svc.cluster.local
    Server:         10.96.0.10
    Address:        10.96.0.10:53
    
    
    Name:   cloudcore.kubeedge.svc.cluster.local
    Address: 10.96.163.34
    

    This is the same try, when edgemesh is rolled out and gives the errors above:

    $ kubectl run alpine --rm -ti --image=alpine -- /bin/sh
    Found existing alias for "kubectl". You should use: "k"
    If you don't see a command prompt, try pressing enter.
    / # nslookup www.google.com
    ;; connection timed out; no servers could be reached
    
    / # nslookup cloudcore.kubeedge.svc.cluster.local
    ;; connection timed out; no servers could be reached
    
    

    What you expected to happen:

    I'd expect that edgemesh does not show such errors. I'd expect that DNS resolution still works, even if edgemesh has some errors. This totaly breaks the clusterwide DNS resolution!

    How to reproduce it (as minimally and precisely as possible): I guess, just run a kind cluster and deploy the helm chart(?)

    Anything else we need to know?:

    Environment:

    • EdgeMesh version: v1.12.0
    • Kubernetes version (use kubectl version):
    Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.2", GitCommit:"8b5a19147530eaac9476b0ab82980b4088bbc1b2", GitTreeState:"clean", BuildDate:"2021-09-15T21:38:50Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.9", GitCommit:"6df4433e288edc9c40c2e344eb336f63fad45cd2", GitTreeState:"clean", BuildDate:"2022-05-19T19:53:08Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}
    
    • KubeEdge version(e.g. cloudcore --version and edgecore --version): 1.11.0
    kind/bug 
    opened by siredmar 17
  • error opening relay circuit: NO_RESERVATION

    error opening relay circuit: NO_RESERVATION

    What happened: edge侧和cloud侧的通道无法建立

    How to reproduce it (as minimally and precisely as possible): 04-configmap.yaml

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: edgemesh-agent-cfg
      namespace: kubeedge
      labels:
        k8s-app: kubeedge
        kubeedge: edgemesh-agent
    data:
      edgemesh-agent.yaml: |
        # For more detailed configuration, please refer to: https://edgemesh.netlify.app/reference/config-items.html#edgemesh-agent-cfg
        modules:
          edgeProxy:
            enable: true
          edgeTunnel:
            enable: true
            relayNodes:
            - nodeName: cn-west-1-a-ed1-master01
              advertiseAddress:
              - <公网ip>
            #- nodeName: cloud-node01
            #  advertiseAddress:
            #  - 10.128.2.221
            #  - 3.3.3.3
    
    

    公网ip:20006端口映射到cn-west-1-a-ed1-master01 20006端口 同时cn-west-1-a-ed1-master01也是部署cloud core节点

    Anything else we need to know?: master上的edgemesh-agent日志:

    I1221 18:07:11.818744       1 server.go:55] Version: v1.12.0-dirty
    I1221 18:07:11.818834       1 server.go:89] [1] Prepare agent to run
    I1221 18:07:11.819139       1 netif.go:96] bridge device edgemesh0 already exists
    I1221 18:07:11.819250       1 server.go:93] edgemesh-agent running on CloudMode
    I1221 18:07:11.819260       1 server.go:96] [2] New clients
    W1221 18:07:11.819282       1 client_config.go:617] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
    I1221 18:07:11.820161       1 server.go:103] [3] Register beehive modules
    W1221 18:07:11.820196       1 module.go:37] Module EdgeDNS is disabled, do not register
    I1221 18:07:11.913786       1 server.go:66] Using userspace Proxier.
    I1221 18:07:13.219336       1 module.go:34] Module EdgeProxy registered successfully
    I1221 18:07:13.513875       1 module.go:159] I'm {12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW: [/ip4/10.50.166.41/tcp/20006 /ip4/127.0.0.1/tcp/20006 /ip4/47.101.49.231/tcp/20006]}
    I1221 18:07:13.514188       1 module.go:168] Run as a relay node
    I1221 18:07:13.514497       1 module.go:181] Bootstrapping the DHT
    I1221 18:07:13.913577       1 tunnel.go:63] Starting MDNS discovery service
    I1221 18:07:13.913661       1 tunnel.go:76] Starting DHT discovery service
    I1221 18:07:13.913827       1 module.go:34] Module EdgeTunnel registered successfully
    I1221 18:07:13.913853       1 server.go:109] [4] Start all modules
    I1221 18:07:13.913964       1 core.go:24] Starting module EdgeProxy
    I1221 18:07:13.914009       1 core.go:24] Starting module EdgeTunnel
    I1221 18:07:13.914303       1 tunnel.go:447] Starting relay finder
    I1221 18:07:13.914891       1 config.go:135] "Starting endpoints config controller"
    I1221 18:07:13.914968       1 shared_informer.go:240] Waiting for caches to sync for endpoints config
    I1221 18:07:13.915017       1 config.go:317] "Starting service config controller"
    I1221 18:07:13.915028       1 shared_informer.go:240] Waiting for caches to sync for service config
    I1221 18:07:13.916090       1 loadbalancer.go:239] "Starting loadBalancer destinationRule controller"
    I1221 18:07:13.916165       1 shared_informer.go:240] Waiting for caches to sync for loadBalancer destinationRule
    I1221 18:07:14.216882       1 shared_informer.go:247] Caches are synced for loadBalancer destinationRule 
    I1221 18:07:14.514761       1 shared_informer.go:247] Caches are synced for service config 
    I1221 18:07:14.617696       1 shared_informer.go:247] Caches are synced for endpoints config 
    I1221 18:07:14.612961       1 tunnel.go:118] [MDNS] Discovery found peer: {12D3KooWEME3ybEgNcj7LZhPYAv6sV3Uu99UHM6r5Q63ThRWpBzC: [/ip4/10.50.166.42/tcp/20006 /ip4/127.0.0.1/tcp/20006]}
    I1221 18:07:14.622361       1 tunnel.go:130] [MDNS] New stream between peer {12D3KooWEME3ybEgNcj7LZhPYAv6sV3Uu99UHM6r5Q63ThRWpBzC: [/ip4/127.0.0.1/tcp/20006 /ip4/10.50.166.42/tcp/20006 /ip4/172.17.0.1/tcp/20006 /ip4/172.31.219.180/tcp/20006 /ip4/172.31.225.165/tcp/20006 /ip4/10.50.166.182/tcp/20006 /ip4/172.31.250.124/tcp/20006 /ip4/172.31.52.197/tcp/20006 /ip4/172.31.137.160/tcp/20006 /ip4/172.31.67.67/tcp/20006 /ip4/10.50.166.183/tcp/20006 /ip4/172.31.39.75/tcp/20006 /ip4/172.31.0.10/tcp/20006 /ip4/172.31.34.128/tcp/20006 /ip4/172.31.76.232/tcp/20006 /ip4/172.31.240.234/tcp/20006 /ip4/172.31.12.17/tcp/20006 /ip4/172.31.55.228/tcp/20006 /ip4/172.31.207.176/tcp/20006 /ip4/172.31.128.38/tcp/20006 /ip4/172.31.200.42/tcp/20006 /ip4/172.31.117.16/tcp/20006 /ip4/172.31.152.23/tcp/20006 /ip4/172.31.249.123/tcp/20006 /ip4/172.31.88.57/tcp/20006 /ip4/172.31.10.228/tcp/20006 /ip4/172.31.153.142/tcp/20006 /ip4/172.31.0.1/tcp/20006 /ip4/172.31.140.138/tcp/20006 /ip4/172.31.218.243/tcp/20006 /ip4/172.31.137.56/tcp/20006 /ip4/172.31.145.155/tcp/20006 /ip4/172.31.85.17/tcp/20006 /ip4/172.31.242.218/tcp/20006 /ip4/172.31.31.226/tcp/20006 /ip4/172.31.40.241/tcp/20006 /ip4/172.31.231.78/tcp/20006 /ip4/172.31.106.0/tcp/20006 /ip4/169.254.96.16/tcp/20006 /ip4/172.29.192.192/tcp/20006]} success
    I1221 18:07:14.712683       1 tunnel.go:166] [MDNS] Discovery to cn-west-1-a-ed1-worker01 : {12D3KooWEME3ybEgNcj7LZhPYAv6sV3Uu99UHM6r5Q63ThRWpBzC: [/ip4/127.0.0.1/tcp/20006 /ip4/10.50.166.42/tcp/20006 /ip4/172.17.0.1/tcp/20006 /ip4/172.31.219.180/tcp/20006 /ip4/172.31.225.165/tcp/20006 /ip4/10.50.166.182/tcp/20006 /ip4/172.31.250.124/tcp/20006 /ip4/172.31.52.197/tcp/20006 /ip4/172.31.137.160/tcp/20006 /ip4/172.31.67.67/tcp/20006 /ip4/10.50.166.183/tcp/20006 /ip4/172.31.39.75/tcp/20006 /ip4/172.31.0.10/tcp/20006 /ip4/172.31.34.128/tcp/20006 /ip4/172.31.76.232/tcp/20006 /ip4/172.31.240.234/tcp/20006 /ip4/172.31.12.17/tcp/20006 /ip4/172.31.55.228/tcp/20006 /ip4/172.31.207.176/tcp/20006 /ip4/172.31.128.38/tcp/20006 /ip4/172.31.200.42/tcp/20006 /ip4/172.31.117.16/tcp/20006 /ip4/172.31.152.23/tcp/20006 /ip4/172.31.249.123/tcp/20006 /ip4/172.31.88.57/tcp/20006 /ip4/172.31.10.228/tcp/20006 /ip4/172.31.153.142/tcp/20006 /ip4/172.31.0.1/tcp/20006 /ip4/172.31.140.138/tcp/20006 /ip4/172.31.218.243/tcp/20006 /ip4/172.31.137.56/tcp/20006 /ip4/172.31.145.155/tcp/20006 /ip4/172.31.85.17/tcp/20006 /ip4/172.31.242.218/tcp/20006 /ip4/172.31.31.226/tcp/20006 /ip4/172.31.40.241/tcp/20006 /ip4/172.31.231.78/tcp/20006 /ip4/172.31.106.0/tcp/20006 /ip4/169.254.96.16/tcp/20006 /ip4/172.29.192.192/tcp/20006]}
    I1221 18:07:14.713008       1 tunnel.go:118] [MDNS] Discovery found peer: {12D3KooWRhrUY71vdSzeVhWFGPv246MQ27J1XpmwxQXtKhqyoG1D: [/ip4/10.50.166.43/tcp/20006]}
    I1221 18:07:14.713663       1 tunnel.go:130] [MDNS] New stream between peer {12D3KooWRhrUY71vdSzeVhWFGPv246MQ27J1XpmwxQXtKhqyoG1D: [/ip4/127.0.0.1/tcp/20006 /ip4/10.50.166.43/tcp/20006 /ip4/172.17.0.1/tcp/20006 /ip4/172.31.88.57/tcp/20006 /ip4/172.31.67.67/tcp/20006 /ip4/10.50.166.183/tcp/20006 /ip4/172.31.152.23/tcp/20006 /ip4/172.31.128.38/tcp/20006 /ip4/172.31.250.124/tcp/20006 /ip4/172.31.0.1/tcp/20006 /ip4/172.31.34.128/tcp/20006 /ip4/172.31.207.176/tcp/20006 /ip4/172.31.249.123/tcp/20006 /ip4/172.31.52.197/tcp/20006 /ip4/172.31.200.42/tcp/20006 /ip4/172.31.10.228/tcp/20006 /ip4/172.31.240.234/tcp/20006 /ip4/172.31.225.165/tcp/20006 /ip4/10.50.166.182/tcp/20006 /ip4/172.31.117.16/tcp/20006 /ip4/172.31.12.17/tcp/20006 /ip4/172.31.76.232/tcp/20006 /ip4/172.31.137.160/tcp/20006 /ip4/172.31.153.142/tcp/20006 /ip4/172.31.39.75/tcp/20006 /ip4/172.31.140.138/tcp/20006 /ip4/172.31.219.180/tcp/20006 /ip4/172.31.0.10/tcp/20006 /ip4/172.31.55.228/tcp/20006 /ip4/172.31.218.243/tcp/20006 /ip4/172.31.137.56/tcp/20006 /ip4/172.31.145.155/tcp/20006 /ip4/172.31.85.17/tcp/20006 /ip4/172.31.242.218/tcp/20006 /ip4/172.31.31.226/tcp/20006 /ip4/172.31.40.241/tcp/20006 /ip4/172.31.231.78/tcp/20006 /ip4/172.31.106.0/tcp/20006 /ip4/169.254.96.16/tcp/20006 /ip4/172.29.135.0/tcp/20006]} success
    I1221 18:07:14.847561       1 tunnel.go:166] [MDNS] Discovery to cn-west-1-a-ed1-worker02 : {12D3KooWRhrUY71vdSzeVhWFGPv246MQ27J1XpmwxQXtKhqyoG1D: [/ip4/127.0.0.1/tcp/20006 /ip4/10.50.166.43/tcp/20006 /ip4/172.17.0.1/tcp/20006 /ip4/172.31.88.57/tcp/20006 /ip4/172.31.67.67/tcp/20006 /ip4/10.50.166.183/tcp/20006 /ip4/172.31.152.23/tcp/20006 /ip4/172.31.128.38/tcp/20006 /ip4/172.31.250.124/tcp/20006 /ip4/172.31.0.1/tcp/20006 /ip4/172.31.34.128/tcp/20006 /ip4/172.31.207.176/tcp/20006 /ip4/172.31.249.123/tcp/20006 /ip4/172.31.52.197/tcp/20006 /ip4/172.31.200.42/tcp/20006 /ip4/172.31.10.228/tcp/20006 /ip4/172.31.240.234/tcp/20006 /ip4/172.31.225.165/tcp/20006 /ip4/10.50.166.182/tcp/20006 /ip4/172.31.117.16/tcp/20006 /ip4/172.31.12.17/tcp/20006 /ip4/172.31.76.232/tcp/20006 /ip4/172.31.137.160/tcp/20006 /ip4/172.31.153.142/tcp/20006 /ip4/172.31.39.75/tcp/20006 /ip4/172.31.140.138/tcp/20006 /ip4/172.31.219.180/tcp/20006 /ip4/172.31.0.10/tcp/20006 /ip4/172.31.55.228/tcp/20006 /ip4/172.31.218.243/tcp/20006 /ip4/172.31.137.56/tcp/20006 /ip4/172.31.145.155/tcp/20006 /ip4/172.31.85.17/tcp/20006 /ip4/172.31.242.218/tcp/20006 /ip4/172.31.31.226/tcp/20006 /ip4/172.31.40.241/tcp/20006 /ip4/172.31.231.78/tcp/20006 /ip4/172.31.106.0/tcp/20006 /ip4/169.254.96.16/tcp/20006 /ip4/172.29.135.0/tcp/20006]}
    I1221 18:07:15.112519       1 tunnel.go:175] Discovery service got a new stream from {12D3KooWRhrUY71vdSzeVhWFGPv246MQ27J1XpmwxQXtKhqyoG1D: [/ip4/10.50.166.41/tcp/41482]}
    I1221 18:07:15.112644       1 tunnel.go:204] [MDNS] Discovery from cn-west-1-a-ed1-worker02 : {12D3KooWRhrUY71vdSzeVhWFGPv246MQ27J1XpmwxQXtKhqyoG1D: [/ip4/10.50.166.41/tcp/41482]}
    

    在cloud侧的work节点上edgemesh-agent日志:

    I1221 18:07:11.082813       1 server.go:55] Version: v1.12.0-dirty
    I1221 18:07:11.082890       1 server.go:89] [1] Prepare agent to run
    I1221 18:07:11.083138       1 netif.go:96] bridge device edgemesh0 already exists
    I1221 18:07:11.083280       1 server.go:93] edgemesh-agent running on CloudMode
    I1221 18:07:11.083304       1 server.go:96] [2] New clients
    W1221 18:07:11.083324       1 client_config.go:617] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
    I1221 18:07:11.178863       1 server.go:103] [3] Register beehive modules
    W1221 18:07:11.178912       1 module.go:37] Module EdgeDNS is disabled, do not register
    I1221 18:07:11.181652       1 server.go:66] Using userspace Proxier.
    I1221 18:07:12.181417       1 module.go:34] Module EdgeProxy registered successfully
    I1221 18:07:13.180717       1 module.go:159] I'm {12D3KooWEME3ybEgNcj7LZhPYAv6sV3Uu99UHM6r5Q63ThRWpBzC: [/ip4/10.50.166.42/tcp/20006 /ip4/127.0.0.1/tcp/20006]}
    I1221 18:07:13.180847       1 module.go:181] Bootstrapping the DHT
    I1221 18:07:13.277358       1 tunnel.go:387] [Bootstrap] bootstrapping to 12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW
    I1221 18:07:13.578548       1 tunnel.go:397] [Bootstrap] success bootstrapped with {12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW: [/ip4/47.101.49.231/tcp/20006]}
    I1221 18:07:13.680250       1 tunnel.go:63] Starting MDNS discovery service
    I1221 18:07:13.680291       1 tunnel.go:76] Starting DHT discovery service
    I1221 18:07:13.680378       1 module.go:34] Module EdgeTunnel registered successfully
    I1221 18:07:13.680391       1 server.go:109] [4] Start all modules
    I1221 18:07:13.680535       1 tunnel.go:447] Starting relay finder
    I1221 18:07:13.680541       1 core.go:24] Starting module EdgeProxy
    I1221 18:07:13.680617       1 core.go:24] Starting module EdgeTunnel
    I1221 18:07:13.681127       1 loadbalancer.go:239] "Starting loadBalancer destinationRule controller"
    I1221 18:07:13.681166       1 shared_informer.go:240] Waiting for caches to sync for loadBalancer destinationRule
    I1221 18:07:13.681167       1 config.go:317] "Starting service config controller"
    I1221 18:07:13.681195       1 shared_informer.go:240] Waiting for caches to sync for service config
    I1221 18:07:13.681134       1 config.go:135] "Starting endpoints config controller"
    I1221 18:07:13.681284       1 shared_informer.go:240] Waiting for caches to sync for endpoints config
    I1221 18:07:13.978507       1 tunnel.go:118] [MDNS] Discovery found peer: {12D3KooWRhrUY71vdSzeVhWFGPv246MQ27J1XpmwxQXtKhqyoG1D: []}
    I1221 18:07:13.977124       1 tunnel.go:175] Discovery service got a new stream from {12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW: [/ip4/47.101.49.231/tcp/20006]}
    I1221 18:07:13.979633       1 tunnel.go:204] [MDNS] Discovery from cn-west-1-a-ed1-master01 : {12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW: [/ip4/47.101.49.231/tcp/20006]}
    I1221 18:07:14.181566       1 shared_informer.go:247] Caches are synced for loadBalancer destinationRule 
    I1221 18:07:14.477170       1 shared_informer.go:247] Caches are synced for endpoints config 
    I1221 18:07:14.581479       1 shared_informer.go:247] Caches are synced for service config 
    I1221 18:07:14.977479       1 tunnel.go:175] Discovery service got a new stream from {12D3KooWRhrUY71vdSzeVhWFGPv246MQ27J1XpmwxQXtKhqyoG1D: [/ip4/10.50.166.43/tcp/20006]}
    I1221 18:07:14.977732       1 tunnel.go:204] [MDNS] Discovery from cn-west-1-a-ed1-worker02 : {12D3KooWRhrUY71vdSzeVhWFGPv246MQ27J1XpmwxQXtKhqyoG1D: [/ip4/10.50.166.43/tcp/20006]}
    I1221 18:07:14.977740       1 tunnel.go:130] [MDNS] New stream between peer {12D3KooWRhrUY71vdSzeVhWFGPv246MQ27J1XpmwxQXtKhqyoG1D: [/ip4/127.0.0.1/tcp/20006 /ip4/10.50.166.43/tcp/20006 /ip4/172.17.0.1/tcp/20006 /ip4/172.31.88.57/tcp/20006 /ip4/172.31.67.67/tcp/20006 /ip4/10.50.166.183/tcp/20006 /ip4/172.31.152.23/tcp/20006 /ip4/172.31.128.38/tcp/20006 /ip4/172.31.250.124/tcp/20006 /ip4/172.31.0.1/tcp/20006 /ip4/172.31.34.128/tcp/20006 /ip4/172.31.207.176/tcp/20006 /ip4/172.31.249.123/tcp/20006 /ip4/172.31.52.197/tcp/20006 /ip4/172.31.200.42/tcp/20006 /ip4/172.31.10.228/tcp/20006 /ip4/172.31.240.234/tcp/20006 /ip4/172.31.225.165/tcp/20006 /ip4/10.50.166.182/tcp/20006 /ip4/172.31.117.16/tcp/20006 /ip4/172.31.12.17/tcp/20006 /ip4/172.31.76.232/tcp/20006 /ip4/172.31.137.160/tcp/20006 /ip4/172.31.153.142/tcp/20006 /ip4/172.31.39.75/tcp/20006 /ip4/172.31.140.138/tcp/20006 /ip4/172.31.219.180/tcp/20006 /ip4/172.31.0.10/tcp/20006 /ip4/172.31.55.228/tcp/20006 /ip4/172.31.218.243/tcp/20006 /ip4/172.31.137.56/tcp/20006 /ip4/172.31.145.155/tcp/20006 /ip4/172.31.85.17/tcp/20006 /ip4/172.31.242.218/tcp/20006 /ip4/172.31.31.226/tcp/20006 /ip4/172.31.40.241/tcp/20006 /ip4/172.31.231.78/tcp/20006 /ip4/172.31.106.0/tcp/20006 /ip4/169.254.96.16/tcp/20006 /ip4/172.29.135.0/tcp/20006]} success
    I1221 18:07:15.130510       1 tunnel.go:166] [MDNS] Discovery to cn-west-1-a-ed1-worker02 : {12D3KooWRhrUY71vdSzeVhWFGPv246MQ27J1XpmwxQXtKhqyoG1D: [/ip4/127.0.0.1/tcp/20006 /ip4/10.50.166.43/tcp/20006 /ip4/172.17.0.1/tcp/20006 /ip4/172.31.88.57/tcp/20006 /ip4/172.31.67.67/tcp/20006 /ip4/10.50.166.183/tcp/20006 /ip4/172.31.152.23/tcp/20006 /ip4/172.31.128.38/tcp/20006 /ip4/172.31.250.124/tcp/20006 /ip4/172.31.0.1/tcp/20006 /ip4/172.31.34.128/tcp/20006 /ip4/172.31.207.176/tcp/20006 /ip4/172.31.249.123/tcp/20006 /ip4/172.31.52.197/tcp/20006 /ip4/172.31.200.42/tcp/20006 /ip4/172.31.10.228/tcp/20006 /ip4/172.31.240.234/tcp/20006 /ip4/172.31.225.165/tcp/20006 /ip4/10.50.166.182/tcp/20006 /ip4/172.31.117.16/tcp/20006 /ip4/172.31.12.17/tcp/20006 /ip4/172.31.76.232/tcp/20006 /ip4/172.31.137.160/tcp/20006 /ip4/172.31.153.142/tcp/20006 /ip4/172.31.39.75/tcp/20006 /ip4/172.31.140.138/tcp/20006 /ip4/172.31.219.180/tcp/20006 /ip4/172.31.0.10/tcp/20006 /ip4/172.31.55.228/tcp/20006 /ip4/172.31.218.243/tcp/20006 /ip4/172.31.137.56/tcp/20006 /ip4/172.31.145.155/tcp/20006 /ip4/172.31.85.17/tcp/20006 /ip4/172.31.242.218/tcp/20006 /ip4/172.31.31.226/tcp/20006 /ip4/172.31.40.241/tcp/20006 /ip4/172.31.231.78/tcp/20006 /ip4/172.31.106.0/tcp/20006 /ip4/169.254.96.16/tcp/20006 /ip4/172.29.135.0/tcp/20006]}
    I1221 18:07:15.130732       1 tunnel.go:118] [MDNS] Discovery found peer: {12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW: [/ip4/47.101.49.231/tcp/20006 /ip4/10.50.166.41/tcp/20006 /ip4/127.0.0.1/tcp/20006]}
    I1221 18:07:15.177370       1 tunnel.go:130] [MDNS] New stream between peer {12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW: [/ip4/127.0.0.1/tcp/20006 /ip4/10.50.166.41/tcp/20006 /ip4/172.17.0.1/tcp/20006 /ip4/172.31.10.228/tcp/20006 /ip4/172.31.88.57/tcp/20006 /ip4/172.31.39.75/tcp/20006 /ip4/172.31.12.17/tcp/20006 /ip4/172.31.0.1/tcp/20006 /ip4/172.31.200.42/tcp/20006 /ip4/172.31.250.124/tcp/20006 /ip4/172.31.117.16/tcp/20006 /ip4/172.31.225.165/tcp/20006 /ip4/10.50.166.182/tcp/20006 /ip4/172.31.52.197/tcp/20006 /ip4/172.31.0.10/tcp/20006 /ip4/172.31.67.67/tcp/20006 /ip4/10.50.166.183/tcp/20006 /ip4/172.31.34.128/tcp/20006 /ip4/172.31.137.160/tcp/20006 /ip4/172.31.153.142/tcp/20006 /ip4/172.31.55.228/tcp/20006 /ip4/172.31.76.232/tcp/20006 /ip4/172.31.152.23/tcp/20006 /ip4/172.31.240.234/tcp/20006 /ip4/172.31.128.38/tcp/20006 /ip4/172.31.207.176/tcp/20006 /ip4/172.31.140.138/tcp/20006 /ip4/172.31.219.180/tcp/20006 /ip4/172.31.249.123/tcp/20006 /ip4/172.31.218.243/tcp/20006 /ip4/172.31.137.56/tcp/20006 /ip4/172.31.145.155/tcp/20006 /ip4/172.31.85.17/tcp/20006 /ip4/172.31.242.218/tcp/20006 /ip4/172.31.31.226/tcp/20006 /ip4/172.31.40.241/tcp/20006 /ip4/172.31.231.78/tcp/20006 /ip4/172.31.106.0/tcp/20006 /ip4/169.254.96.16/tcp/20006 /ip4/172.29.214.128/tcp/20006]} success
    I1221 18:07:15.190364       1 tunnel.go:166] [MDNS] Discovery to cn-west-1-a-ed1-master01 : {12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW: [/ip4/127.0.0.1/tcp/20006 /ip4/10.50.166.41/tcp/20006 /ip4/172.17.0.1/tcp/20006 /ip4/172.31.10.228/tcp/20006 /ip4/172.31.88.57/tcp/20006 /ip4/172.31.39.75/tcp/20006 /ip4/172.31.12.17/tcp/20006 /ip4/172.31.0.1/tcp/20006 /ip4/172.31.200.42/tcp/20006 /ip4/172.31.250.124/tcp/20006 /ip4/172.31.117.16/tcp/20006 /ip4/172.31.225.165/tcp/20006 /ip4/10.50.166.182/tcp/20006 /ip4/172.31.52.197/tcp/20006 /ip4/172.31.0.10/tcp/20006 /ip4/172.31.67.67/tcp/20006 /ip4/10.50.166.183/tcp/20006 /ip4/172.31.34.128/tcp/20006 /ip4/172.31.137.160/tcp/20006 /ip4/172.31.153.142/tcp/20006 /ip4/172.31.55.228/tcp/20006 /ip4/172.31.76.232/tcp/20006 /ip4/172.31.152.23/tcp/20006 /ip4/172.31.240.234/tcp/20006 /ip4/172.31.128.38/tcp/20006 /ip4/172.31.207.176/tcp/20006 /ip4/172.31.140.138/tcp/20006 /ip4/172.31.219.180/tcp/20006 /ip4/172.31.249.123/tcp/20006 /ip4/172.31.218.243/tcp/20006 /ip4/172.31.137.56/tcp/20006 /ip4/172.31.145.155/tcp/20006 /ip4/172.31.85.17/tcp/20006 /ip4/172.31.242.218/tcp/20006 /ip4/172.31.31.226/tcp/20006 /ip4/172.31.40.241/tcp/20006 /ip4/172.31.231.78/tcp/20006 /ip4/172.31.106.0/tcp/20006 /ip4/169.254.96.16/tcp/20006 /ip4/172.29.214.128/tcp/20006]}
    

    在edge node上的edgemesh-agent日志:

    I1221 18:25:38.546320       1 server.go:55] Version: v1.12.0-dirty
    I1221 18:25:38.546469       1 server.go:89] [1] Prepare agent to run
    I1221 18:25:38.641896       1 netif.go:96] bridge device edgemesh0 already exists
    I1221 18:25:38.642216       1 server.go:93] edgemesh-agent running on EdgeMode
    I1221 18:25:38.642314       1 server.go:96] [2] New clients
    I1221 18:25:38.645576       1 server.go:103] [3] Register beehive modules
    I1221 18:25:38.647241       1 module.go:34] Module EdgeDNS registered successfully
    I1221 18:25:38.648123       1 server.go:66] Using userspace Proxier.
    I1221 18:25:39.544579       1 module.go:34] Module EdgeProxy registered successfully
    I1221 18:25:39.944778       1 module.go:159] I'm {12D3KooWLSDF9t796mnj5ziZxryrEGt7DDuqDx6pQHf541hKpt8M: [/ip4/10.52.166.44/tcp/20006 /ip4/127.0.0.1/tcp/20006]}
    I1221 18:25:39.944979       1 module.go:181] Bootstrapping the DHT
    I1221 18:25:39.945064       1 tunnel.go:387] [Bootstrap] bootstrapping to 12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW
    I1221 18:25:40.361073       1 tunnel.go:397] [Bootstrap] success bootstrapped with {12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW: [/ip4/47.101.49.231/tcp/20006]}
    I1221 18:25:40.443652       1 tunnel.go:63] Starting MDNS discovery service
    I1221 18:25:40.443692       1 tunnel.go:76] Starting DHT discovery service
    I1221 18:25:40.443761       1 module.go:34] Module EdgeTunnel registered successfully
    I1221 18:25:40.443776       1 server.go:109] [4] Start all modules
    I1221 18:25:40.443835       1 core.go:24] Starting module EdgeDNS
    I1221 18:25:40.443989       1 core.go:24] Starting module EdgeProxy
    I1221 18:25:40.444304       1 core.go:24] Starting module EdgeTunnel
    I1221 18:25:40.446827       1 tunnel.go:447] Starting relay finder
    I1221 18:25:40.447551       1 dns.go:34] Runs CoreDNS v1.8.0 as a local dns
    I1221 18:25:40.448751       1 config.go:317] "Starting service config controller"
    I1221 18:25:40.448800       1 shared_informer.go:240] Waiting for caches to sync for service config
    I1221 18:25:40.541404       1 loadbalancer.go:239] "Starting loadBalancer destinationRule controller"
    I1221 18:25:40.541447       1 shared_informer.go:240] Waiting for caches to sync for loadBalancer destinationRule
    I1221 18:25:40.541557       1 config.go:135] "Starting endpoints config controller"
    I1221 18:25:40.541590       1 shared_informer.go:240] Waiting for caches to sync for endpoints config
    I1221 18:25:40.749691       1 shared_informer.go:247] Caches are synced for service config 
    I1221 18:25:40.842356       1 tunnel.go:118] [DHT] Discovery found peer: {12D3KooWRhrUY71vdSzeVhWFGPv246MQ27J1XpmwxQXtKhqyoG1D: [/ip4/10.50.166.43/tcp/20006 /ip4/127.0.0.1/tcp/20006 /ip4/47.101.49.231/tcp/20006/p2p/12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW/p2p-circuit]}
    I1221 18:25:40.843935       1 shared_informer.go:247] Caches are synced for loadBalancer destinationRule 
    I1221 18:25:41.142316       1 shared_informer.go:247] Caches are synced for endpoints config 
    .:53 on 169.254.96.16
    I1221 18:25:41.243474       1 log.go:184] [INFO] plugin/reload: Running configuration MD5 = ab8e188d63b1d1a5168d68e78fe4128d
    I1221 18:25:41.541656       1 log.go:184] [INFO] 169.254.96.16:34390 - 45572 "HINFO IN 1615312138878258316.8711688076870925944. udp 57 false 512" NXDOMAIN qr,rd,ra 132 0.297784761s
    I1221 18:25:42.945534       1 proxier.go:895] "Opened iptables from-containers public port for service" servicePortName="prometheus/prometheus-operated-nodeport:web" protocol=TCP nodePort=31640
    
    E1221 18:25:45.843453       1 tunnel.go:121] [DHT] New stream between peer {12D3KooWRhrUY71vdSzeVhWFGPv246MQ27J1XpmwxQXtKhqyoG1D: [/ip4/10.50.166.43/tcp/20006 /ip4/127.0.0.1/tcp/20006]} err: failed to dial 12D3KooWRhrUY71vdSzeVhWFGPv246MQ27J1XpmwxQXtKhqyoG1D:
      * [/ip4/47.101.49.231/tcp/20006/p2p/12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW/p2p-circuit] error opening relay circuit: NO_RESERVATION (204)
      * [/ip4/10.50.166.43/tcp/20006] dial tcp4 0.0.0.0:20006->10.50.166.43:20006: i/o timeout
    I1221 18:25:45.843673       1 tunnel.go:118] [DHT] Discovery found peer: {12D3KooWEME3ybEgNcj7LZhPYAv6sV3Uu99UHM6r5Q63ThRWpBzC: [/ip4/127.0.0.1/tcp/20006 /ip4/47.101.49.231/tcp/20006/p2p/12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW/p2p-circuit /ip4/10.50.166.42/tcp/20006]}
    I1221 18:25:45.847683       1 proxier.go:916] "Opened iptables from-non-local public port for service" servicePortName="default/d-2048-3-dao-2048" protocol=TCP nodePort=31193
    
    E1221 18:25:50.844276       1 tunnel.go:121] [DHT] New stream between peer {12D3KooWEME3ybEgNcj7LZhPYAv6sV3Uu99UHM6r5Q63ThRWpBzC: [/ip4/10.50.166.42/tcp/20006 /ip4/127.0.0.1/tcp/20006]} err: failed to dial 12D3KooWEME3ybEgNcj7LZhPYAv6sV3Uu99UHM6r5Q63ThRWpBzC:
      * [/ip4/47.101.49.231/tcp/20006/p2p/12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW/p2p-circuit] error opening relay circuit: NO_RESERVATION (204)
      * [/ip4/10.50.166.42/tcp/20006] dial tcp4 0.0.0.0:20006->10.50.166.42:20006: i/o timeout
    I1221 18:25:50.844398       1 tunnel.go:118] [DHT] Discovery found peer: {12D3KooWBqeyjCMAKbJViTh1tEoyPxj7XWD8SeuoJZ1zCZgXq954: [/ip4/192.168.100.132/tcp/20006 /ip4/127.0.0.1/tcp/20006 /ip4/192.168.100.13/tcp/54476 /ip4/47.101.49.231/tcp/20006/p2p/12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW/p2p-circuit]}
    E1221 18:25:55.845680       1 tunnel.go:121] [DHT] New stream between peer {12D3KooWBqeyjCMAKbJViTh1tEoyPxj7XWD8SeuoJZ1zCZgXq954: [/ip4/192.168.100.132/tcp/20006 /ip4/127.0.0.1/tcp/20006 /ip4/192.168.100.13/tcp/54476]} err: failed to dial 12D3KooWBqeyjCMAKbJViTh1tEoyPxj7XWD8SeuoJZ1zCZgXq954:
      * [/ip4/47.101.49.231/tcp/20006/p2p/12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW/p2p-circuit] error opening relay circuit: NO_RESERVATION (204)
      * [/ip4/192.168.100.132/tcp/20006] dial tcp4 0.0.0.0:20006->192.168.100.132:20006: i/o timeout
      * [/ip4/192.168.100.13/tcp/54476] dial tcp4 0.0.0.0:20006->192.168.100.13:54476: i/o timeout
    I1221 18:25:55.845936       1 tunnel.go:118] [DHT] Discovery found peer: {12D3KooWEg5jkGp1aN49CiiX8SQeahsWCCsjPNr2WzRPeYecd9a4: [/ip4/192.168.1.101/tcp/20006 /ip4/127.0.0.1/tcp/20006 /ip4/192.168.100.12/tcp/24008 /ip4/47.101.49.231/tcp/20006/p2p/12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW/p2p-circuit]}
    E1221 18:26:00.846577       1 tunnel.go:121] [DHT] New stream between peer {12D3KooWEg5jkGp1aN49CiiX8SQeahsWCCsjPNr2WzRPeYecd9a4: [/ip4/192.168.1.101/tcp/20006 /ip4/127.0.0.1/tcp/20006 /ip4/192.168.100.12/tcp/24008]} err: failed to dial 12D3KooWEg5jkGp1aN49CiiX8SQeahsWCCsjPNr2WzRPeYecd9a4:
      * [/ip4/47.101.49.231/tcp/20006/p2p/12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW/p2p-circuit] error opening relay circuit: NO_RESERVATION (204)
      * [/ip4/192.168.1.101/tcp/20006] dial tcp4 0.0.0.0:20006->192.168.1.101:20006: i/o timeout
      * [/ip4/192.168.100.12/tcp/24008] dial tcp4 0.0.0.0:20006->192.168.100.12:24008: i/o timeout
    I1221 18:26:40.460462       1 tunnel.go:462] [Finder] find a relay: {12D3KooWL5cwYP6rRt2vccqk3VUFo2kzkvYfMzrNCDknkN8J8jxW: [/ip4/47.101.49.231/tcp/20006 /ip4/10.50.166.41/tcp/20006 /ip4/127.0.0.1/tcp/20006]}
    

    在edge node上也telnet测试了公网ip 20006端口可以访问

    Environment:

    • EdgeMesh version: v1.12.0
    • Kubernetes version (use kubectl version): v1.21.14
    • KubeEdge version(e.g. cloudcore --version and edgecore --version): 1.10.3
    kind/bug 
    opened by renhuaihuai 4
  • DNS requests from Edge won't resolve

    DNS requests from Edge won't resolve

    What happened: Deployed KubeEdge 1.12.1 and edgemesh 1.12.0 charts deployed a pod in edge node, trying to connect consul service in a different non-edge node fails:

    nslookup consul-server.default.svc.cluster.local
    ;; connection timed out; no servers could be reached
    

    What you expected to happen: pods on edge nodes should resolve FQDNs of services in the cloud side.

    How to reproduce it (as minimally and precisely as possible): Deployed KubeEdge 1.12.1 and edgemesh 1.12.0 charts Deployed nginx pod on edge Try nslookup from nginx pod to service in the cloud

    Environment:

    • EdgeMesh version: 1.12.0
    • Kubernetes version (use kubectl version):
    Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.6+k3s1", GitCommit:"3228d9cb9a4727d48f60de4f1ab472f7c50df904", GitTreeState:"clean", BuildDate:"2022-01-25T01:27:44Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.6+k3s1", GitCommit:"3228d9cb9a4727d48f60de4f1ab472f7c50df904", GitTreeState:"clean", BuildDate:"2022-01-25T01:27:44Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"linux/amd64"}
    
    • KubeEdge version(e.g. cloudcore --version and edgecore --version): 1.12.1

    • Cloud nodes Environment:
      • Hardware configuration (e.g. lscpu):
      • OS (e.g. cat /etc/os-release):
      • Kernel (e.g. uname -a):
      • Go version (e.g. go version):
      • Others:
    • Edge nodes Environment:
      • edgecore version (e.g. edgecore --version):
      • Hardware configuration (e.g. lscpu):
      • OS (e.g. cat /etc/os-release):
      • Kernel (e.g. uname -a):
      • Go version (e.g. go version):
      • Others:
    kind/bug 
    opened by stavbernazanv 1
  • failed to find any peer in table

    failed to find any peer in table

    [问题] E1130 21:47:49.155119 1 tunnel.go:121] [MDNS] New stream between peer {12D3KooWC4bVkoxYENbud7iSBy8NTpYuhbaWVmR9pqBUQtQqu8km: [/ip4/127.0.0.1/tcp/20006 /ip4/10.9.65.97/tcp/20006 /ip4/172.17.0.1/tcp/20006 /ip4/169.254.96.16/tcp/20006]} err: failed to find any peer in table

    [版本] v1.12.1 [其他] 防火墙已关闭, 机器之间的udp协议是正常的; 中继节点是必须的吗? 我目前没有添加中继节点,只有2个节点

    opened by wuming333666 3
  • HTTP test case [mDNS] ERROR

    HTTP test case [mDNS] ERROR

    What happened: `kubectl exec -it alpine-test -- sh / # curl hostname-svc:12345

    curl: (56) Recv failure: Connection reset by peer`

    Different elements of the system: kubectl get all -owide

    NAME                                                 READY   STATUS    RESTARTS   AGE     IP           NODE         NOMINATED NODE   READINESS GATES
    pod/alpine-test                                      1/1     Running   0          21m     10.24.0.17   kube-cloud   <none>           <none>
    pod/helmet-detection-inference-example-cloud-ttcqw   1/1     Running   0          4d23h   10.24.0.9    kube-cloud   <none>           <none>
    pod/helmet-detection-inference-example-cloud-xjps6   1/1     Running   0          5d1h    10.24.0.8    kube-cloud   <none>           <none>
    pod/hostname-edge-84cb45ccf4-n9vxw                   1/1     Running   0          162m    172.17.0.2   kube-test    <none>           <none>
    pod/websocket-test                                   1/1     Running   0          21m     10.24.0.16   kube-cloud   <none>           <none>
    
    NAME                                               TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)     AGE    SELECTOR
    service/helmet-detection-inference-example-cloud   ClusterIP   10.111.55.184   <none>        5000/TCP    5d1h   jointinference.sedna.io/name=helmet-detection-inference-example,jointinference.sedna.io/uid=3e19e5eb-6d27-46ea-bc5e-e4ccfc938e54,jointinference.sedna.io/worker-type=cloud
    service/hostname-svc                               ClusterIP   10.97.7.65      <none>        12345/TCP   162m   app=hostname-edge
    service/kubernetes                                 ClusterIP   10.96.0.1       <none>        443/TCP     156d   <none>
    
    NAME                            READY   UP-TO-DATE   AVAILABLE   AGE    CONTAINERS   IMAGES                           SELECTOR
    deployment.apps/hostname-edge   1/1     1            1           162m   hostname     poorunga/serve_hostname:latest   app=hostname-edge
    
    NAME                                       DESIRED   CURRENT   READY   AGE    CONTAINERS   IMAGES                           SELECTOR
    replicaset.apps/hostname-edge-84cb45ccf4   1         1         1       162m   hostname     poorunga/serve_hostname:latest   app=hostname-edge,pod-template-hash=84cb45ccf4 
    

    kubectl get all -nkubeedge -owide

    NAME                       READY   STATUS    RESTARTS   AGE    IP             NODE         NOMINATED NODE   READINESS GATES
    pod/edgemesh-agent-df9wz   1/1     Running   0          161m   192.168.8.89   kube-cloud   <none>           <none>
    pod/edgemesh-agent-mkzx8   1/1     Running   0          161m   192.168.8.12   kube-test    <none>           <none>
    
    NAME                            DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE    CONTAINERS       IMAGES                           SELECTOR
    daemonset.apps/edgemesh-agent   2         2         2       2            2           <none>          161m   edgemesh-agent   kubeedge/edgemesh-agent:latest   k8s-app=kubeedge,kubeedge=edgemesh-agent
    

    Anything else we need to know?: I proceed to show the different logs generated:

    edgemesh-agent cloud:

    I1130 10:47:05.754096       1 server.go:55] Version: v1.12.0-28+0ced354dab726c-dirty
    I1130 10:47:05.754252       1 server.go:89] [1] Prepare agent to run
    I1130 10:47:05.851241       1 server.go:93] edgemesh-agent running on CloudMode
    I1130 10:47:05.851408       1 server.go:96] [2] New clients
    W1130 10:47:05.887346       1 client_config.go:617] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
    I1130 10:47:06.455445       1 server.go:103] [3] Register beehive modules
    W1130 10:47:06.550119       1 module.go:37] Module EdgeDNS is disabled, do not register
    I1130 10:47:06.685611       1 server.go:68] Using userspace Proxier.
    I1130 10:47:13.065715       1 module.go:34] Module EdgeProxy registered successfully
    I1130 10:47:13.320753       1 module.go:162] I'm {12D3KooWEiBaSsewnacfvAc5nJWbdSwLu9qXsLEmhSLevpEtxX1t: [/ip4/192.168.8.89/tcp/20006 /ip4/127.0.0.1/tcp/20006]}
    I1130 10:47:13.320954       1 module.go:184] Bootstrapping the DHT
    I1130 10:47:13.329083       1 tunnel.go:63] Starting MDNS discovery service
    I1130 10:47:13.329115       1 tunnel.go:76] Starting DHT discovery service
    I1130 10:47:13.329170       1 module.go:34] Module EdgeTunnel registered successfully
    I1130 10:47:13.329189       1 server.go:109] [4] Start all modules
    I1130 10:47:13.329223       1 core.go:24] Starting module EdgeProxy
    I1130 10:47:13.329255       1 core.go:24] Starting module EdgeTunnel
    I1130 10:47:13.330707       1 tunnel.go:447] Starting relay finder
    I1130 10:47:13.349615       1 config.go:317] "Starting service config controller"
    I1130 10:47:13.349645       1 shared_informer.go:240] Waiting for caches to sync for service config
    I1130 10:47:13.349687       1 config.go:135] "Starting endpoints config controller"
    I1130 10:47:13.349693       1 shared_informer.go:240] Waiting for caches to sync for endpoints config
    I1130 10:47:13.350526       1 loadbalancer.go:239] "Starting loadBalancer destinationRule controller"
    I1130 10:47:13.350541       1 shared_informer.go:240] Waiting for caches to sync for loadBalancer destinationRule
    I1130 10:47:13.447087       1 tunnel.go:118] [MDNS] Discovery found peer: {12D3KooWAcTQPbHsSSjDJcM2QnLdB9Bc1THDvRALLKUQqQZLV4WU: []}
    E1130 10:47:13.447191       1 tunnel.go:121] [MDNS] New stream between peer {12D3KooWAcTQPbHsSSjDJcM2QnLdB9Bc1THDvRALLKUQqQZLV4WU: [/ip4/127.0.0.1/tcp/20006 /ip4/192.168.8.12/tcp/20006 /ip4/172.17.0.1/tcp/20006 /ip4/169.254.96.16/tcp/20006]} err: failed to find any peer in table
    I1130 10:47:13.550511       1 shared_informer.go:247] Caches are synced for endpoints config
    I1130 10:47:13.550638       1 shared_informer.go:247] Caches are synced for service config
    I1130 10:47:13.551170       1 shared_informer.go:247] Caches are synced for loadBalancer destinationRule
    E1130 10:47:15.744582       1 loadbalancer.go:673] "Couldn't find an endpoint for service" err="missing endpoints" service="kube-system/kube-dns:dns"
    E1130 10:47:15.744729       1 loadbalancer.go:673] "Couldn't find an endpoint for service" err="missing endpoints" service="kube-system/kube-dns:dns"
    E1130 10:47:20.745169       1 loadbalancer.go:673] "Couldn't find an endpoint for service" err="missing endpoints" service="kube-system/kube-dns:dns"
    E1130 10:47:20.745291       1 loadbalancer.go:673] "Couldn't find an endpoint for service" err="missing endpoints" service="kube-system/kube-dns:dns"
    E1130 10:47:25.746529       1 loadbalancer.go:673] "Couldn't find an endpoint for service" err="missing endpoints" service="kube-system/kube-dns:dns"
    E1130 10:47:25.746624       1 loadbalancer.go:673] "Couldn't find an endpoint for service" err="missing endpoints" service="kube-system/kube-dns:dns"
    E1130 10:47:30.747194       1 loadbalancer.go:673] "Couldn't find an endpoint for service" err="missing endpoints" service="kube-system/kube-dns:dns"
    E1130 10:47:30.747279       1 loadbalancer.go:673] "Couldn't find an endpoint for service" err="missing endpoints" service="kube-system/kube-dns:dns"
    E1130 10:47:35.747597       1 loadbalancer.go:673] "Couldn't find an endpoint for service" err="missing endpoints" service="kube-system/kube-dns:dns"
    E1130 10:47:35.747679       1 loadbalancer.go:673] "Couldn't find an endpoint for service" err="missing endpoints" service="kube-system/kube-dns:dns"
    I1130 10:47:40.748360       1 loadbalancer.go:717] Dial legacy network between coredns-7f89b7bc75-kdtwn - {udp kube-cloud 10.24.0.25:53}
    I1130 10:47:40.748726       1 loadbalancer.go:717] Dial legacy network between coredns-7f89b7bc75-hsldz - {udp kube-cloud 10.24.0.18:53}
    I1130 10:47:45.797369       1 loadbalancer.go:717] Dial legacy network between coredns-7f89b7bc75-kdtwn - {udp kube-cloud 10.24.0.25:53}
    I1130 10:47:45.797657       1 loadbalancer.go:717] Dial legacy network between coredns-7f89b7bc75-hsldz - {udp kube-cloud 10.24.0.18:53}
    I1130 10:47:45.801483       1 loadbalancer.go:717] Dial legacy network between coredns-7f89b7bc75-kdtwn - {udp kube-cloud 10.24.0.25:53}
    I1130 10:47:45.801913       1 loadbalancer.go:717] Dial legacy network between coredns-7f89b7bc75-hsldz - {udp kube-cloud 10.24.0.18:53}
    I1130 10:47:45.803756       1 loadbalancer.go:717] Dial legacy network between gm-75759f96fc-xkwrc - {tcp kube-cloud 10.24.0.19:9000}
    I1130 10:54:34.708485       1 loadbalancer.go:717] Dial legacy network between coredns-7f89b7bc75-kdtwn - {udp kube-cloud 10.24.0.25:53}
    I1130 10:54:34.710860       1 tunnel.go:231] Could not find peer kube-test in cache, auto generate peer info: {12D3KooWAcTQPbHsSSjDJcM2QnLdB9Bc1THDvRALLKUQqQZLV4WU: []}
    E1130 10:54:34.962165       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-test error: new stream between kube-test err: failed to find any peer in table"
    E1130 10:54:35.463722       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-test error: new stream between kube-test err: failed to find any peer in table"
    E1130 10:54:36.464225       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-test error: new stream between kube-test err: failed to find any peer in table"
    E1130 10:54:38.465847       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-test error: new stream between kube-test err: failed to find any peer in table"
    E1130 10:54:38.465927       1 proxysocket.go:98] "Failed to connect to balancer" err="failed to connect to an endpoint"
    I1130 10:56:54.493271       1 tunnel.go:118] [MDNS] Discovery found peer: {12D3KooWAcTQPbHsSSjDJcM2QnLdB9Bc1THDvRALLKUQqQZLV4WU: []}
    E1130 10:56:54.493492       1 tunnel.go:121] [MDNS] New stream between peer {12D3KooWAcTQPbHsSSjDJcM2QnLdB9Bc1THDvRALLKUQqQZLV4WU: [/ip4/127.0.0.1/tcp/20006 /ip4/192.168.8.12/tcp/20006 /ip4/172.17.0.1/tcp/20006 /ip4/169.254.96.16/tcp/20006]} err: failed to find any peer in table
    

    edgemesh-agent edge:

    I1130 18:56:50.476690       1 server.go:55] Version: v1.12.0-28+0ced354dab726c-dirty
    I1130 18:56:50.476861       1 server.go:89] [1] Prepare agent to run
    I1130 18:56:50.673450       1 server.go:93] edgemesh-agent running on EdgeMode
    I1130 18:56:50.673550       1 server.go:96] [2] New clients
    I1130 18:56:50.774778       1 server.go:103] [3] Register beehive modules
    I1130 18:56:50.776975       1 module.go:34] Module EdgeDNS registered successfully
    I1130 18:56:51.472208       1 server.go:68] Using userspace Proxier.
    I1130 18:56:53.874685       1 module.go:34] Module EdgeProxy registered successfully
    I1130 18:56:54.277495       1 module.go:162] I'm {12D3KooWAcTQPbHsSSjDJcM2QnLdB9Bc1THDvRALLKUQqQZLV4WU: [/ip4/192.168.8.12/tcp/20006 /ip4/127.0.0.1/tcp/20006]}
    I1130 18:56:54.277739       1 module.go:184] Bootstrapping the DHT
    I1130 18:56:54.372906       1 tunnel.go:63] Starting MDNS discovery service
    I1130 18:56:54.372970       1 tunnel.go:76] Starting DHT discovery service
    I1130 18:56:54.373142       1 module.go:34] Module EdgeTunnel registered successfully
    I1130 18:56:54.373174       1 server.go:109] [4] Start all modules
    I1130 18:56:54.373387       1 core.go:24] Starting module EdgeDNS
    I1130 18:56:54.373613       1 core.go:24] Starting module EdgeProxy
    I1130 18:56:54.373732       1 core.go:24] Starting module EdgeTunnel
    I1130 18:56:54.470155       1 tunnel.go:447] Starting relay finder
    I1130 18:56:54.571036       1 dns.go:34] Runs CoreDNS v1.8.0 as a local dns
    I1130 18:56:54.571143       1 tunnel.go:118] [MDNS] Discovery found peer: {12D3KooWEiBaSsewnacfvAc5nJWbdSwLu9qXsLEmhSLevpEtxX1t: []}
    I1130 18:56:54.571464       1 config.go:317] "Starting service config controller"
    I1130 18:56:54.571517       1 shared_informer.go:240] Waiting for caches to sync for service config
    I1130 18:56:54.571554       1 loadbalancer.go:239] "Starting loadBalancer destinationRule controller"
    I1130 18:56:54.571615       1 shared_informer.go:240] Waiting for caches to sync for loadBalancer destinationRule
    I1130 18:56:54.571710       1 config.go:135] "Starting endpoints config controller"
    I1130 18:56:54.571728       1 shared_informer.go:240] Waiting for caches to sync for endpoints config
    E1130 18:56:54.587026       1 tunnel.go:121] [MDNS] New stream between peer {12D3KooWEiBaSsewnacfvAc5nJWbdSwLu9qXsLEmhSLevpEtxX1t: [/ip4/127.0.0.1/tcp/20006 /ip4/192.168.8.89/tcp/20006 /ip4/172.17.0.1/tcp/20006 /ip4/172.21.0.1/tcp/20006 /ip4/172.20.0.1/tcp/20006 /ip4/172.18.0.1/tcp/20006 /ip4/172.19.0.1/tcp/20006 /ip4/169.254.96.16/tcp/20006 /ip4/10.24.0.0/tcp/20006]} err: failed to find any peer in table
    I1130 18:56:54.674039       1 shared_informer.go:247] Caches are synced for loadBalancer destinationRule
    I1130 18:56:54.674467       1 shared_informer.go:247] Caches are synced for service config
    I1130 18:56:54.774722       1 shared_informer.go:247] Caches are synced for endpoints config
    I1130 18:56:55.073247       1 log.go:184] [INFO] plugin/reload: Running configuration MD5 = ab8e188d63b1d1a5168d68e78fe4128d
    .:53 on 169.254.96.16
    I1130 18:56:55.270557       1 log.go:184] [INFO] 169.254.96.16:50857 - 50494 "HINFO IN 3754463732643363070.5054080465385541096. udp 57 false 512" NXDOMAIN qr,rd,ra 57 0.098940793s
    I1130 18:56:59.404198       1 log.go:184] [INFO] 169.254.96.16:53802 - 16007 "A IN gm.sedna.sedna.svc.cluster.local. udp 50 false 512" NXDOMAIN qr,aa,rd 143 0.000372351s
    I1130 18:56:59.404974       1 log.go:184] [INFO] 169.254.96.16:55446 - 460 "AAAA IN gm.sedna.sedna.svc.cluster.local. udp 50 false 512" NXDOMAIN qr,aa,rd 143 0.001150063s
    I1130 18:56:59.405600       1 log.go:184] [INFO] 169.254.96.16:54343 - 18383 "A IN gm.sedna.svc.cluster.local. udp 44 false 512" NOERROR qr,aa,rd 86 0.000447074s
    I1130 18:56:59.405667       1 log.go:184] [INFO] 169.254.96.16:34765 - 34867 "AAAA IN gm.sedna.svc.cluster.local. udp 44 false 512" NOERROR qr,aa,rd 137 0.000596674s
    I1130 18:56:59.407123       1 tunnel.go:231] Could not find peer kube-cloud in cache, auto generate peer info: {12D3KooWEiBaSsewnacfvAc5nJWbdSwLu9qXsLEmhSLevpEtxX1t: []}
    E1130 18:56:59.658415       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-cloud error: new stream between kube-cloud err: failed to find any peer in table"
    E1130 18:57:00.159092       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-cloud error: new stream between kube-cloud err: failed to find any peer in table"
    E1130 18:57:01.159690       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-cloud error: new stream between kube-cloud err: failed to find any peer in table"
    E1130 18:57:03.160408       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-cloud error: new stream between kube-cloud err: failed to find any peer in table"
    E1130 18:57:03.160467       1 proxysocket.go:98] "Failed to connect to balancer" err="failed to connect to an endpoint"
    I1130 18:57:08.165719       1 log.go:184] [INFO] 169.254.96.16:56465 - 20645 "AAAA IN gm.sedna.sedna.svc.cluster.local. udp 50 false 512" NXDOMAIN qr,aa,rd 143 0.000476015s
    I1130 18:57:08.166787       1 log.go:184] [INFO] 169.254.96.16:55107 - 12401 "A IN gm.sedna.sedna.svc.cluster.local. udp 50 false 512" NXDOMAIN qr,aa,rd 143 0.001245945s
    I1130 18:57:08.167631       1 log.go:184] [INFO] 169.254.96.16:59369 - 60154 "AAAA IN gm.sedna.svc.cluster.local. udp 44 false 512" NOERROR qr,aa,rd 137 0.000205226s
    I1130 18:57:08.167688       1 log.go:184] [INFO] 169.254.96.16:46179 - 32242 "A IN gm.sedna.svc.cluster.local. udp 44 false 512" NOERROR qr,aa,rd 86 0.000377959s
    E1130 18:57:08.417967       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-cloud error: new stream between kube-cloud err: failed to find any peer in table"
    E1130 18:57:08.919017       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-cloud error: new stream between kube-cloud err: failed to find any peer in table"
    E1130 18:57:09.919613       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-cloud error: new stream between kube-cloud err: failed to find any peer in table"
    E1130 18:57:11.920734       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-cloud error: new stream between kube-cloud err: failed to find any peer in table"
    E1130 18:57:11.920811       1 proxysocket.go:98] "Failed to connect to balancer" err="failed to connect to an endpoint"
    I1130 18:57:16.923429       1 log.go:184] [INFO] 169.254.96.16:54399 - 26908 "AAAA IN gm.sedna.sedna.svc.cluster.local. udp 50 false 512" NXDOMAIN qr,aa,rd 143 0.000283812s
    I1130 18:57:16.923557       1 log.go:184] [INFO] 169.254.96.16:43224 - 8489 "A IN gm.sedna.sedna.svc.cluster.local. udp 50 false 512" NXDOMAIN qr,aa,rd 143 0.000426424s
    I1130 18:57:16.924238       1 log.go:184] [INFO] 169.254.96.16:33302 - 61346 "AAAA IN gm.sedna.svc.cluster.local. udp 44 false 512" NOERROR qr,aa,rd 137 0.000133237s
    I1130 18:57:16.925011       1 log.go:184] [INFO] 169.254.96.16:50399 - 53206 "A IN gm.sedna.svc.cluster.local. udp 44 false 512" NOERROR qr,aa,rd 86 0.000696209s
    E1130 18:57:17.176109       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-cloud error: new stream between kube-cloud err: failed to find any peer in table"
    E1130 18:57:17.677357       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-cloud error: new stream between kube-cloud err: failed to find any peer in table"
    E1130 18:57:18.678885       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-cloud error: new stream between kube-cloud err: failed to find any peer in table"
    E1130 18:57:20.679552       1 loadbalancer.go:683] "Dial failed" err="get proxy stream from kube-cloud error: new stream between kube-cloud err: failed to find any peer in table"
    

    Environment:

    • EdgeMesh version:
      v1.12.0-28+0ced354dab726c-dirty

    • Kubernetes version (use kubectl version): Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.11", GitCommit:"27522a29febbcc4badac257763044d0d90c11abd", GitTreeState:"clean", BuildDate:"2021-09-15T19:21:44Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}

    • KubeEdge version(e.g. cloudcore --version and edgecore --version): KubeEdge v1.10.0

    • Cloud nodes Environment:
      • Hardware configuration (e.g. lscpu):
      • OS (e.g. cat /etc/os-release):
      • Kernel (e.g. uname -a):
      • Go version (e.g. go version):
      • Others:
    • Edge nodes Environment:
      • edgecore version (e.g. edgecore --version):
        KubeEdge v1.9.1
      • Hardware configuration (e.g. lscpu):
      • OS (e.g. cat /etc/os-release):
      • Kernel (e.g. uname -a):
      • Go version (e.g. go version):
      • Others:
    kind/bug 
    opened by yookacn 8
  • edgemesh throws NO_RESERVATION

    edgemesh throws NO_RESERVATION

    What happened:

    edit: image is not up to date. Both setups show the same error now.

    image

    I'm running the following setup. An edge node within the same LAN is provisioned in two ways:

    • as systemd service by starting the edgecore binary directly (GREEN)
    • edgecore running as a container on the edge node. The docker container spins up a new docker service (no docker.sock mounted) (RED).

    In the GREEN setup edgemesh is able to connect and everything it initially worked. But now throws the same NO_RESERVATION error as the RED one. I also tried running the edgecore container in host network without success.

    I1108 14:08:41.106857       1 server.go:55] Version: v1.12.0-dirty
    I1108 14:08:41.106926       1 server.go:89] [1] Prepare agent to run
    I1108 14:08:41.110793       1 server.go:93] edgemesh-agent running on EdgeMode
    I1108 14:08:41.110832       1 server.go:96] [2] New clients
    I1108 14:08:41.112352       1 server.go:103] [3] Register beehive modules
    I1108 14:08:41.115769       1 module.go:34] Module EdgeDNS registered successfully
    I1108 14:08:41.116723       1 server.go:66] Using userspace Proxier.
    I1108 14:08:41.223209       1 module.go:34] Module EdgeProxy registered successfully
    I1108 14:08:41.232010       1 module.go:159] I'm {12D3KooWJTb2opaHATFUNvcQSKceWpydVDPu54VumvLWaPbECkt3: [/ip4/192.168.1.116/tcp/20006 /ip4/127.0.0.1/tcp/20006]}
    I1108 14:08:41.232093       1 module.go:181] Bootstrapping the DHT
    I1108 14:08:41.232121       1 tunnel.go:387] [Bootstrap] bootstrapping to 12D3KooWCJ5iZ4vDnqy9eE7ZL68U1nyHqBawkZwvN4s5QBL4ddFN
    I1108 14:08:41.311821       1 tunnel.go:397] [Bootstrap] success bootstrapped with {12D3KooWCJ5iZ4vDnqy9eE7ZL68U1nyHqBawkZwvN4s5QBL4ddFN: [/ip4/192.168.1.42/tcp/20006]}
    I1108 14:08:41.312539       1 tunnel.go:63] Starting MDNS discovery service
    I1108 14:08:41.312559       1 tunnel.go:76] Starting DHT discovery service
    I1108 14:08:41.317683       1 module.go:34] Module EdgeTunnel registered successfully
    I1108 14:08:41.317941       1 server.go:109] [4] Start all modules
    I1108 14:08:41.318358       1 tunnel.go:447] Starting relay finder
    I1108 14:08:41.319333       1 core.go:24] Starting module EdgeDNS
    I1108 14:08:41.319651       1 core.go:24] Starting module EdgeProxy
    I1108 14:08:41.320896       1 dns.go:34] Runs CoreDNS v1.8.0 as a local dns
    I1108 14:08:41.321811       1 core.go:24] Starting module EdgeTunnel
    I1108 14:08:41.322002       1 config.go:317] "Starting service config controller"
    I1108 14:08:41.322097       1 shared_informer.go:240] Waiting for caches to sync for service config
    I1108 14:08:41.322167       1 config.go:135] "Starting endpoints config controller"
    I1108 14:08:41.322215       1 shared_informer.go:240] Waiting for caches to sync for endpoints config
    I1108 14:08:41.324327       1 loadbalancer.go:239] "Starting loadBalancer destinationRule controller"
    I1108 14:08:41.324355       1 shared_informer.go:240] Waiting for caches to sync for loadBalancer destinationRule
    I1108 14:08:41.327391       1 tunnel.go:118] [DHT] Discovery found peer: {12D3KooWCJ5iZ4vDnqy9eE7ZL68U1nyHqBawkZwvN4s5QBL4ddFN: [/ip4/192.168.1.42/tcp/20006 /ip4/10.5.0.2/tcp/20006 /ip4/127.0.0.1/tcp/20006]}
    I1108 14:08:41.327796       1 tunnel.go:130] [DHT] New stream between peer {12D3KooWCJ5iZ4vDnqy9eE7ZL68U1nyHqBawkZwvN4s5QBL4ddFN: [/ip4/10.5.0.2/tcp/20006 /ip4/127.0.0.1/tcp/20006]} success
    I1108 14:08:41.333734       1 tunnel.go:166] [DHT] Discovery to default-control-plane : {12D3KooWCJ5iZ4vDnqy9eE7ZL68U1nyHqBawkZwvN4s5QBL4ddFN: [/ip4/10.5.0.2/tcp/20006 /ip4/127.0.0.1/tcp/20006]}
    I1108 14:08:41.333846       1 tunnel.go:118] [DHT] Discovery found peer: {12D3KooWP6xc3WDcvWNT51M7vMQKvi4wtspKzMT2tEhgpmi7XjSw: [/ip4/127.0.0.1/tcp/20006 /ip4/192.168.1.42/tcp/20006/p2p/12D3KooWCJ5iZ4vDnqy9eE7ZL68U1nyHqBawkZwvN4s5QBL4ddFN/p2p-circuit /ip4/10.5.0.3/tcp/20006]}
    I1108 14:08:41.422735       1 shared_informer.go:247] Caches are synced for service config 
    I1108 14:08:41.422713       1 shared_informer.go:247] Caches are synced for endpoints config 
    I1108 14:08:41.425465       1 shared_informer.go:247] Caches are synced for loadBalancer destinationRule 
    .:53 on 169.254.96.16
    I1108 14:08:41.425876       1 log.go:184] [INFO] plugin/reload: Running configuration MD5 = ab8e188d63b1d1a5168d68e78fe4128d
    I1108 14:08:41.441890       1 log.go:184] [INFO] 169.254.96.16:45933 - 57079 "HINFO IN 5853975620265367216.543195330502524566. udp 56 false 512" NXDOMAIN qr,rd,ra,ad 131 0.015822593s
    I1108 14:08:41.617646       1 proxier.go:895] "Opened iptables from-containers public port for service" servicePortName="ingress-nginx/ingress-nginx-controller:http" protocol=TCP nodePort=30893
    I1108 14:08:41.622548       1 proxier.go:906] "Opened iptables from-host public port for service" servicePortName="ingress-nginx/ingress-nginx-controller:http" protocol=TCP nodePort=30893
    I1108 14:08:41.633509       1 proxier.go:916] "Opened iptables from-non-local public port for service" servicePortName="ingress-nginx/ingress-nginx-controller:http" protocol=TCP nodePort=30893
    I1108 14:08:41.702384       1 proxier.go:895] "Opened iptables from-containers public port for service" servicePortName="ingress-nginx/ingress-nginx-controller:https" protocol=TCP nodePort=30791
    I1108 14:08:41.709403       1 proxier.go:906] "Opened iptables from-host public port for service" servicePortName="ingress-nginx/ingress-nginx-controller:https" protocol=TCP nodePort=30791
    I1108 14:08:41.714655       1 proxier.go:916] "Opened iptables from-non-local public port for service" servicePortName="ingress-nginx/ingress-nginx-controller:https" protocol=TCP nodePort=30791
    E1108 14:08:46.322683       1 tunnel.go:121] [DHT] New stream between peer {12D3KooWP6xc3WDcvWNT51M7vMQKvi4wtspKzMT2tEhgpmi7XjSw: [/ip4/127.0.0.1/tcp/20006 /ip4/10.5.0.3/tcp/20006]} err: failed to dial 12D3KooWP6xc3WDcvWNT51M7vMQKvi4wtspKzMT2tEhgpmi7XjSw:
      * [/ip4/192.168.1.42/tcp/20006/p2p/12D3KooWCJ5iZ4vDnqy9eE7ZL68U1nyHqBawkZwvN4s5QBL4ddFN/p2p-circuit] error opening relay circuit: NO_RESERVATION (204)
      * [/ip4/10.5.0.3/tcp/20006] dial tcp4 10.5.0.3:20006: i/o timeout
    I1108 14:08:46.323055       1 tunnel.go:118] [DHT] Discovery found peer: {12D3KooWFW4E9fHHfuNXUMFSpvNiv7pfGtoJCTnZKesFYLqLU6PK: [/ip4/192.168.1.116/tcp/20006 /ip4/127.0.0.1/tcp/20006 /ip4/192.168.1.42/tcp/20006/p2p/12D3KooWCJ5iZ4vDnqy9eE7ZL68U1nyHqBawkZwvN4s5QBL4ddFN/p2p-circuit]}
    E1108 14:08:46.326587       1 tunnel.go:121] [DHT] New stream between peer {12D3KooWFW4E9fHHfuNXUMFSpvNiv7pfGtoJCTnZKesFYLqLU6PK: [/ip4/192.168.1.116/tcp/20006 /ip4/127.0.0.1/tcp/20006]} err: failed to dial 12D3KooWFW4E9fHHfuNXUMFSpvNiv7pfGtoJCTnZKesFYLqLU6PK:
      * [/ip4/192.168.1.42/tcp/20006/p2p/12D3KooWCJ5iZ4vDnqy9eE7ZL68U1nyHqBawkZwvN4s5QBL4ddFN/p2p-circuit] error opening relay circuit: NO_RESERVATION (204)
    
    
    kind/bug 
    opened by siredmar 4
Owner
KubeEdge
KubeEdge
K8s-network-config-operator - Kubernetes network config operator to push network config to switches

Kubernetes Network operator Will add more to the readme later :D Operations The

Daniel Hertzberg 6 May 16, 2022
Secure Edge Networking Based On Kubernetes And KubeEdge.

What is FabEdge FabEdge is an open source edge networking solution based on kubernetes and kubeedge. It solves the problems including complex network

FabEdge 465 Jan 3, 2023
Amazon Web Services (AWS) providerAmazon Web Services (AWS) provider

Amazon Web Services (AWS) provider The Amazon Web Services (AWS) resource provider for Pulumi lets you use AWS resources in your cloud programs. To us

William Garcia Jacobo 0 Nov 10, 2021
Managing your Kubernetes clusters (including public, private, edge, etc) as easily as visiting the Internet

Clusternet Managing Your Clusters (including public, private, hybrid, edge, etc) as easily as Visiting the Internet. Clusternet (Cluster Internet) is

Clusternet 1.1k Dec 30, 2022
a small form factor OpenShift/Kubernetes optimized for edge computing

Microshift Microshift is OpenShift1 Kubernetes in a small form factor and optimized for edge computing. Edge devices deployed out in the field pose ve

Red Hat Emerging Technologies 450 Dec 29, 2022
OpenYurt - Extending your native Kubernetes to edge(project under CNCF)

openyurtio/openyurt English | 简体中文 What is NEW! Latest Release: September 26th, 2021. OpenYurt v0.5.0. Please check the CHANGELOG for details. First R

OpenYurt 1.4k Jan 7, 2023
Edge Orchestration project is to implement distributed computing between Docker Container enabled devices.

Edge Orchestration Introduction The main purpose of Edge Orchestration project is to implement distributed computing between Docker Container enabled

null 1 Dec 17, 2021
Deploy, manage, and secure applications and resources across multiple clusters using CloudFormation and Shipa

CloudFormation provider Deploy, secure, and manage applications across multiple clusters using CloudFormation and Shipa. Development environment setup

Shipa 1 Feb 12, 2022
Flexible HTTP command line stress tester for websites and web services

Pewpew Pewpew is a flexible command line HTTP stress tester. Unlike other stress testers, it can hit multiple targets with multiple configurations, si

Ben Gadbois 365 Dec 27, 2022
A component for sync services between Nacos and Kubernetes.

简介 该项目用于同步Kubernetes和Nacos之间的服务信息。 目前该项目仅支持 Kubernetes Service -> Nacos Service 的同步 TODO 增加高性能zap的logger 增加 Nacos Service -> Kubernetes Service 的同步 监听

Nacos Group 6 May 16, 2022
The OCI Service Operator for Kubernetes (OSOK) makes it easy to connect and manage OCI services from a cloud native application running in a Kubernetes environment.

OCI Service Operator for Kubernetes Introduction The OCI Service Operator for Kubernetes (OSOK) makes it easy to create, manage, and connect to Oracle

Oracle 24 Sep 27, 2022
Starting and Stopping Services as Mage Targets

Starting and Stopping Services as Mage Targets Mage is a build tool that supports writing targets in Go. This package supports configuring local servi

Scott Dunlop 1 Sep 30, 2021
Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications

Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.

HashiCorp 13k Jan 5, 2023
Discover expired TLS certificates in the services of a kubernetes cluster

About verify-k8s-certs is a daemon (prometheus exporter) to discover expired TLS certificates in a kubernetes cluster. It exposes the informations as

Angelo Poerio 7 Feb 1, 2022
K8s controller implementing Multi-Cluster Services API based on AWS Cloud Map.

AWS Cloud Map MCS Controller for K8s Introduction AWS Cloud Map multi-cluster service discovery for Kubernetes (K8s) is a controller that implements e

Amazon Web Services 69 Dec 17, 2022
How to build production-level services in Go leveraging the power of Kubernetes

Ultimate Service Copyright 2018, 2019, 2020, 2021, Ardan Labs [email protected] Ultimate Service 3.0 Classes This class teaches how to build producti

null 0 Oct 22, 2021
A tool that allows you to manage Kubernetes manifests for your services in a Git repository

kuberpult Readme for users About Kuberpult is a tool that allows you to manage Kubernetes manifests for your services in a Git repository and manage t

freiheit.com technologies 16 Dec 16, 2022
Deploy https certificates non-interactively to CDN services

certdeploy Deploy https certificates non-interactively to CDN services. Environment Variables CERT_PATH - Certificate file path, should contain certif

三三 2 Nov 27, 2022
CoreDNS plugin implementing K8s multi-cluster services DNS spec.

corends-multicluster Name multicluster - implementation of Multicluster DNS Description This plugin implements the Kubernetes DNS-Based Multicluster S

Henri Yandell 33 Dec 3, 2022