apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

can't connect etcd

Open backnero opened this issue 6 years ago • 9 comments

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • [ ] Question or discussion
  • [*] Bug
  • [ ] Requirements
  • [ ] Feature or performance improvement
  • [ ] Other

Question

  • What do you want to know?
{"level":"warn","ts":"2020-11-16T08:51:20.064Z","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-15ecf14a-d558-4821-94e2-9d034dd7a564/gateway-etcd.default.svc.cluster.local:2379","attempt":0,"error":"rpc error: code = Unimplemented desc = Not Found: HTTP status code 404; transport: received the unexpected content-type \"text/plain; charset=utf-8\""}
panic: etcd get failed: rpc error: code = Unimplemented desc = Not Found: HTTP status code 404; transport: received the unexpected content-type "text/plain; charset=utf-8"
goroutine 1 [running]:
main.main()
/usr/local/apisix-dashboard/api/main.go:40 +0x530
    conf:
      listen:
        host: 0.0.0.0
        port: 8080
      etcd:
        endpoints:
          - gateway-etcd.default.svc.cluster.local:2379
    authentication:
      secret: 
        secret
      expire_time: 3600
      users:
        - username: admin
          password: admin

Bug

  • Which version of Apache APISIX Dashboard, OS, and Browser? APISIX 2.0 CENTOS7 DOCKER DASHBOARD 2.0 CHROME ETCD 3.4.9
  • What happened? If possible, provide a way to reproduce the error.

Requirements or improvement

  • Please describe your requirements or improvement suggestions.

backnero avatar Nov 16 '20 08:11 backnero

cc @idbeta

LiteSun avatar Nov 16 '20 09:11 LiteSun

you should try service's cluster IP . I did this successfully.

ziyou434 avatar Nov 17 '20 00:11 ziyou434

I still get an error using the cluster ip

backnero avatar Nov 17 '20 01:11 backnero

I think you can search "retrying of unary invoker failed", there are many problems about this on internet.

ziyou434 avatar Nov 17 '20 01:11 ziyou434

@nic-chen could you help answer this question when you are free?

idbeta avatar Nov 17 '20 02:11 idbeta

In the rancher2.4 +K8S environment, success can be achieved by configuring the pod ip. The disadvantage is that when the ip changes, you need to modify the configuration and redeploy the dashboard. In the environment of rancher2.4+k8s+istio, it is not directly accessible through pod ip. I wonder if it is similar to the apisix.yaml configuration in the apisix project. You need to set dns or leave it blank to read from the system

backnero avatar Nov 17 '20 03:11 backnero

@backnero

Could you try to access gateway-etcd.default.svc.cluster.local:2379 or the cluster ip from the pod of the dashboard?

nic-chen avatar Nov 17 '20 03:11 nic-chen

Accessible through other pods

backnero avatar Nov 17 '20 06:11 backnero

Accessible through other pods

could you please use pod ip to start dashboard, so that you could try access(using etcdctl) to etcd from the pod of the dashboard. thanks.

nic-chen avatar Nov 17 '20 06:11 nic-chen