Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【离线安装第五步失败】push image goodrain.me/builder failure error detail: Get https://goodrain.me/v2/: Unknown Host #793

Closed
weiliang-ms opened this issue Jul 17, 2020 · 14 comments
Labels
installation installation issue

Comments

@weiliang-ms
Copy link

【部署环境】

  • Rainbond版本(执行grctl version获取):
    最新
  • 操作系统类型和版本:
    CentOS7
  • 离线部署
    docker版本
    Docker version 19.03.1, build 74b1e89e8a

访问web界面,执行第五步【处理镜像】失败,异常信息
push image goodrain.me/builder failure error detail: Get https://goodrain.me/v2/: Unknown Host

/etc/hosts信息
192.168.1.98 goodrain.me 192.168.1.98 region.goodrain.me

hub容器日志
time="2020-07-17T03:38:18Z" level=warning msg="No HTTP secret provided - generated random secret. This may cause problems with uploads if multiple registries are behind a load-balancer. To provide a shared secret, fill in http.secret in the configuration file or set the REGISTRY_HTTP_SECRET environment variable." go.version=go1.7.6 instance.id=0022ffbf-33ce-443b-84e4-715bc9bef61f version=v2.6.2 time="2020-07-17T03:38:18Z" level=info msg="redis not configured" go.version=go1.7.6 instance.id=0022ffbf-33ce-443b-84e4-715bc9bef61f version=v2.6.2 time="2020-07-17T03:38:18Z" level=info msg="Starting upload purge in 8m0s" go.version=go1.7.6 instance.id=0022ffbf-33ce-443b-84e4-715bc9bef61f version=v2.6.2 time="2020-07-17T03:38:18Z" level=info msg="using inmemory blob descriptor cache" go.version=go1.7.6 instance.id=0022ffbf-33ce-443b-84e4-715bc9bef61f version=v2.6.2 time="2020-07-17T03:38:18Z" level=info msg="listening on [::]:5000" go.version=go1.7.6 instance.id=0022ffbf-33ce-443b-84e4-715bc9bef61f version=v2.6.2 time="2020-07-17T03:39:21Z" level=warning msg="error authorizing context: basic authentication challenge for realm \"Registry Realm\": invalid authorization credential" go.version=go1.7.6 http.request.host=goodrain.me http.request.id=9d16d93e-6ced-44fa-b840-911f1ee23f66 http.request.method=GET http.request.remoteaddr=172.20.0.11 http.request.uri="/v2/" http.request.useragent="Go-http-client/1.1" instance.id=0022ffbf-33ce-443b-84e4-715bc9bef61f version=v2.6.2 172.20.0.1 - - [17/Jul/2020:03:39:21 +0000] "GET /v2/ HTTP/1.1" 401 87 "" "Go-http-client/1.1" time="2020-07-17T03:46:18Z" level=info msg="PurgeUploads starting: olderThan=2020-07-10 03:46:18.514952883 +0000 UTC, actuallyDelete=true" time="2020-07-17T03:46:18Z" level=info msg="Purge uploads finished. Num deleted=0, num errors=1" time="2020-07-17T03:46:18Z" level=info msg="Starting upload purge in 24h0m0s" go.version=go1.7.6 instance.id=0022ffbf-33ce-443b-84e4-715bc9bef61f version=v2.6.2

@GLYASAI
Copy link
Contributor

GLYASAI commented Jul 17, 2020

是一个节点吗?

提供下 k8s 集群的信息:

kubectl get po -n kube-system

另外,到 rainbond-operator 容器里面 ping 一下 goodrain.me, 看认不认 goodrain.me.

进入 rainbond-operator 容器:

kubectl exec -it rainbond-operator-0 -n rbd-sytem sh

@weiliang-ms
Copy link
Author

是一个节点吗?

提供下 k8s 集群的信息:

kubectl get po -n kube-system

另外,到 rainbond-operator 容器里面 ping 一下 goodrain.me, 看认不认 goodrain.me.

进入 rainbond-operator 容器:

kubectl exec -it rainbond-operator-0 -n rbd-sytem sh
kubectl get po -n kube-system
NAME                              READY   STATUS    RESTARTS   AGE
coredns-68567cdb47-n45wr          1/1     Running   1          173m
coredns-68567cdb47-tjmrv          1/1     Running   1          173m
kube-flannel-ds-amd64-j6752       1/1     Running   1          173m
metrics-server-745cb4496f-jm7ws   1/1     Running   1          172m

ping不通,容器内DNS解析

nameserver 10.68.0.2
search rbd-system.svc.cluster.local. svc.cluster.local. cluster.local. localdomain

@GLYASAI
Copy link
Contributor

GLYASAI commented Jul 17, 2020

宿主机能 ping 同吗?

@GLYASAI
Copy link
Contributor

GLYASAI commented Jul 17, 2020

再提供两个信息:

resolve 文件:

cat /etc/resolve.conf

coredns 配置:

kubectl get cm coredns -n kube-system -o yaml

@weiliang-ms
Copy link
Author

是一个节点吗?
提供下 k8s 集群的信息:

kubectl get po -n kube-system

另外,到 rainbond-operator 容器里面 ping 一下 goodrain.me, 看认不认 goodrain.me.
进入 rainbond-operator 容器:

kubectl exec -it rainbond-operator-0 -n rbd-sytem sh
kubectl get po -n kube-system
NAME                              READY   STATUS    RESTARTS   AGE
coredns-68567cdb47-n45wr          1/1     Running   1          173m
coredns-68567cdb47-tjmrv          1/1     Running   1          173m
kube-flannel-ds-amd64-j6752       1/1     Running   1          173m
metrics-server-745cb4496f-jm7ws   1/1     Running   1          172m

ping不通,容器内DNS解析

nameserver 10.68.0.2
search rbd-system.svc.cluster.local. svc.cluster.local. cluster.local. localdomain

宿主机能 ping 同吗?

宿主机可以,下面为coredn的日志,不知道是否有影响

2020-07-17T03:38:20.617Z [ERROR] plugin/errors: 2 rbd-etcd.localdomain. AAAA: read udp 172.20.0.7:36000->114.114.114.114:53: i/o timeout
2020-07-17T03:38:23.616Z [ERROR] plugin/errors: 2 rbd-etcd.localdomain. A: read udp 172.20.0.7:57443->114.114.114.114:53: i/o timeout
2020-07-17T03:38:25.618Z [ERROR] plugin/errors: 2 rbd-etcd. A: read udp 172.20.0.7:34135->114.114.114.114:53: i/o timeout

@weiliang-ms weiliang-ms reopened this Jul 17, 2020
@weiliang-ms
Copy link
Author

再提供两个信息:

resolve 文件:

cat /etc/resolve.conf

宿主机

192.168.1.98 goodrain.me
192.168.1.98 region.goodrain.me

容器

nameserver 10.68.0.2
search rbd-system.svc.cluster.local. svc.cluster.local. cluster.local. localdomain

coredns 配置:

kubectl get cm coredns -n kube-system -o yaml
kubectl get cm coredns -n kube-system -o yaml
apiVersion: v1
data:
  Corefile: |
    .:53 {
        errors
        health
        ready
        kubernetes cluster.local. in-addr.arpa ip6.arpa {
          pods insecure
          fallthrough 114.114.114.114
        }
        prometheus :9153
        forward . 114.114.114.114
        cache 30
        reload
        loadbalance
    }
kind: ConfigMap
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","data":{"Corefile":".:53 {\n    errors\n    health\n    ready\n    kubernetes cluster.local. in-addr.arpa ip6.arpa {\n      pods insecure\n      fallthrough 114.114.114.114\n    }\n    prometheus :9153\n    forward . 114.114.114.114\n    cache 30\n    reload\n    loadbalance\n}\n"},"kind":"ConfigMap","metadata":{"annotations":{},"name":"coredns","namespace":"kube-system"}}
  creationTimestamp: "2020-07-17T03:29:46Z"
  name: coredns
  namespace: kube-system
  resourceVersion: "325"
  selfLink: /api/v1/namespaces/kube-system/configmaps/coredns
  uid: d033b4a5-b7fa-46fc-8148-00799e5c533c

@GLYASAI
Copy link
Contributor

GLYASAI commented Jul 17, 2020

我怀疑是 pod 用了 114.114.114.114,没有用 /etc/hosts。麻烦修改 coredns 的配置,然后重启 coredns。

配置如下:

apiVersion: v1
kind: ConfigMap
metadata:
  name: coredns
  namespace: kube-system
data:
  Corefile: |
    .:53 {
        errors
        health
        kubernetes cluster.local in-addr.arpa ip6.arpa {
           pods insecure
           upstream
           fallthrough in-addr.arpa ip6.arpa
        }
        prometheus :9153
        proxy ./etc/resolv.conf
        cache 30
        loop
        reload
        loadbalance
    }

@GLYASAI
Copy link
Contributor

GLYASAI commented Jul 17, 2020

记得提供下宿主机的 /etc/resolv.conf 文件

@weiliang-ms
Copy link
Author

更改CM重启coredns,异常如下

/etc/coredns/Corefile:10 - Error during parsing: Unknown directive 'proxy'

宿主机host文件如下:

192.168.1.98 goodrain.me
192.168.1.98 region.goodrain.me

@GLYASAI
Copy link
Contributor

GLYASAI commented Jul 17, 2020

不好意思,弄错配置了。用下面这个:

Corefile: |
    .:53 {
        errors
        health
        ready
        kubernetes cluster.local in-addr.arpa ip6.arpa {
           pods insecure
           fallthrough in-addr.arpa ip6.arpa
           ttl 30
        }
        prometheus :9153
        forward . /etc/resolv.conf
        cache 30
        loop
        reload
        loadbalance
    }

另外,我想看的是 /etc/resolv.conf。不是 /etc/hosts 喔。

@weiliang-ms
Copy link
Author

抱歉之前给错了
cat /etc/resolv.conf
search localdomain

@weiliang-ms
Copy link
Author

coredns cm

apiVersion: v1
data:
  Corefile: |
    .:53 {
        errors
        health
        ready
        kubernetes cluster.local in-addr.arpa ip6.arpa {
           pods insecure
           fallthrough in-addr.arpa ip6.arpa
           ttl 30
        }
        prometheus :9153
        forward . /etc/resolv.conf
        cache 30
        loop
        reload
        loadbalance
    }
kind: ConfigMap
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","data":{"Corefile":".:53 {\n    errors\n    health\n    ready\n    kubernetes cluster.local in-addr.arpa ip6.arpa {\n       pods insecure\n       fallthrough in-addr.arpa ip6.arpa\n       ttl 30\n    }\n    prometheus :9153\n    forward . /etc/resolv.conf\n    cache 30\n    loop\n    reload\n    loadbalance\n}\n"},"kind":"ConfigMap","metadata":{"annotations":{},"name":"coredns","namespace":"kube-system"}}
  creationTimestamp: "2020-07-17T07:25:05Z"
  name: coredns
  namespace: kube-system
  resourceVersion: "18361"
  selfLink: /api/v1/namespaces/kube-system/configmaps/coredns
  uid: e5ed6344-dd66-4d96-816e-60001e259d13

coredns pod日志

2020-07-17T07:25:25.508Z [INFO] plugin/reload: Running configuration MD5 = f64cb9b977c7dfca58c4fab108535a76
2020-07-17T07:25:25.508Z [INFO] CoreDNS-1.6.2
2020-07-17T07:25:25.508Z [INFO] linux/amd64, go1.12.8, 795a3eb
CoreDNS-1.6.2
linux/amd64, go1.12.8, 795a3eb
2020-07-17T07:25:25.508Z [ERROR] Recovered from panic in server: "dns://:53"

容器内ping

ping: bad address 'goodrain.me'

@GLYASAI
Copy link
Contributor

GLYASAI commented Jul 17, 2020

方便微信联系吗?我想远程看看,方便的话把微信发我邮箱 huangrh@goodrain.com.

@barnettZQG barnettZQG added the installation installation issue label Jul 18, 2020
@barnettZQG
Copy link
Contributor

没有进一步状态更新我将关闭这个问题,若还有使用问题请移步 https://t.goodrain.com 用户社区沟通。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation installation issue
Projects
None yet
Development

No branches or pull requests

3 participants